Often need to take tariff and a large amount of NetFlow flow to the router. To ensure that packages are not destroyed when filling receiver buffer should be in the configuration file utm5.cfg increase the size of the buffer:
nfbuffer_bufsize = 10485760
This directive sets the size of the receiver buffer equal to 10 MB. However, when you start the core billing system in debug.log should be listed a string of successful growth receiver buffer:
? Debug: Jan 29 19:39:30 NFBuffer: Setting SO_RCVBUF to bytes
In some cases, will need
increase the maximum allowable size of receiver buffer in the operating room
system. Perform the operation on Linux, you can command:
sysctl-w net.core.rmem_max = 10485760
under FreeBSD:
kern.ipc.maxsockbuf = 10485760
net.inet.udp.recvspace = 10485760
net.local.dgram.recvspace = 10485760
net.inet.udp.maxdgram = 100000
As a result of these settings billing system will be able to take large volumes of NetFlow packets. In particular, no packet loss will occur in times of peak loads.
To reduce the load on the CPU and reduce occupied by
hard disk location to use the new storage mechanism detailed
data traffic. Detailed data represent a complete copy of all NetFlow flow of the billing system. To activate a new mechanism should be in the center section «Settings» add option:
raw_storage_file = 1
after adding this
setting, you need to restart the core billing system.
In this detailed data will be
recorded in the files ending in. utm. File format
Created by NetAP. For further analysis of the data available
Utility get_nf_direct. Example:
/ netup/utm5/bin/get_nf_direct-b / netup/utm5/db/iptraffic_raw_1138443603.utm-u
The work will be concluded
Data stored in the file / netup/utm5/db/iptraffic_raw_1138443603.utm.
The core billing system
writes detailed data to file for 1 hour. Then search
closing the file and opening a new one. Once the file has been closed is called
external program / netup/utm5/bin/raw_fd_script, whose parameters passed
the path to a closed file. This program produces the necessary steps --
archiving, backups, etc.
Example programs / netup/utm5/bin/raw_fd_script
in the language of shell:
#! / bin / sh
gzip $ *
As a result of these settings
billing system would be the optimum utilization of CPU and disk subsystems.
There were companies NetAP
made test performance billing system at large
volume statistics. To test was used the next server
configuration:
CPU: Intel Pentium 4 frequency of 3.00 GHz
RAM: 2 GB
Hard disk: Serial ATA 250 GB
The network card: Intel 100 Mbit / sec
Operating system: Gentoo Linux
To create the test flow used NetFlow
a separate server. As a generator of Netflow packets used utility utm5_flowgen. Loading recorded utility top. In order to maximize the conditions were closer to reality, NetFlow flow by 100% contains statistics belonging to registered in the billing system test subscribers. The correctness of charging admission and controlled according to a report on traffic and data from the section «More» - «Statistics».
The test results are given in
schedule.
Figure 1 Loading
CPU, depending on the intensity of NetFlow - Flow
In a real network, based on satellite company NetAP, on average, fully loaded channel bandwidth of 100 Mbit / sec generates
NetFlow statistics in 100 packets per second. It is estimated that 3000 NetFlow packets per second will correspond fully loaded channel 3
Gbit / sec.