Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Tuning the System

This chapter contains recommendations on how to tune a Paragon Active Assurance system for optimum performance.

CPU

BIOS

Processors typically provide settings to enable, disable, and tune processor-level features. Today's systems usually provide maximum performance by default and do not need to be adjusted. However, we recommend that you ensure Turbo Boost is enabled in order to achieve slightly higher performance.

Scaling Governors

Linux supports different CPU scaling profiles (powersave, performance) that control the CPU clock frequencies via the kernel. Use the performance profile to achieve the best performance. To ensure that the maximum clock frequency is always used, you need to set this for all CPUs. You can find out the number of CPUs with the nproc command. Then run the following for each CPU X:

Note that setting the CPUs to run at maximum frequency is applicable to hardware systems only and may come with added costs.

Memory

The swappiness Linux kernel parameter controls how much (and how often) the Linux kernel will copy RAM contents to the swap space.

We recommend setting the amount of swapping to a minimum, without disabling it entirely, so that the memory pages are kept in physical memory:

(The sysctl command is omitted from the kernel parameter settings that follow below.)

Storage

Partitions and File Systems

This is addressed in the Installation Guide, chapter Installing Required OS and Software.

In addition, page cache flushing may be tuned to provide a more even behavior: background flush earlier, aggressive flush later.

Read-ahead Size

The tunable read_ahead_kb parameter for storage block devices defines the maximum number of kilobytes that the operating system may read ahead during a sequential read operation. As a result, the likely-needed information is already present within the kernel page cache for the next sequential read, which improves read I/O performance.

We recommend setting this parameter to 4096 KB for all block devices:

Network

Socket and TCP Buffers

The maximum socket buffer size (in bytes) should be set as follows for all protocol types and for both reads and writes to support full-duplex 10GbE connections:

To improve TCP throughput, set the auto-tuning parameters for the TCP read and write buffers: the minimum, default, and maximum number of bytes to use. We recommend the settings below. Increasing the minimum and default will consume more memory per connection, which may not be necessary.

TCP Backlog

The following TCP settings should be increased from their defaults to better handle bursts of load.

TCP backlog queue for half-open connections:

TCP backlog queue for passing connections to accept:

Device Backlog

The length of the network device backlog queue per CPU should be increased from the default:

Local Port Range

Extend the range of IP ports that are allowed for TCP and UDP connections to provide enough ephemeral ports for the anticipated workload:

Apache

Performance

The following settings are recommended in /etc/apache2/conf-available/performance.conf:

Event Multi-processing

The following settings are recommended in /etc/apache2/mods-enabled/mpm_event.conf:

Security

The following settings are recommended in /etc/apache2/conf-available/security.conf:

Enabling the Configurations

Make sure that all Apache configurations above are saved, then enable them as follows:

OpenVPN

Transmit Queue Length

To improve OpenVPN performance and throughput, it is advisable to adjust the transmit queue length for the tun interface:

PostgreSQL

The following settings are recommended in /etc/postgresql/10/main/postgresql.conf for best performance:

Unattended Software Upgrades

To avoid automatically installing software packages, we advise you to disable the unattended-upgrades service or to remove it entirely from the system:

Control Center

Finally, a number of Control Center parameters can be tuned according to the available resources and the system load. These include:

  • /etc/netrounds/netrounds.conf
    • CALL_EXECUTER_MAX_CHILDREN: This configures how many background jobs can run in parallel. The default is 20. Each test and monitor (not each task) will periodically run as a background job. If you have many tests or monitors, you might want to set this value to match the number of running tests and monitors to prevent those jobs from queuing up and delaying the collecting of data. The current queue length can be seen as the scheduled_call_latency parameter returned by the ncc status command.
  • /etc/apache2/sites-available/netrounds-ssl.conf
    • WSGIDaemonProcess netrounds ... processes: This configures how many HTTP requests to the Control Center GUI can be handled at the same time. The default is 10. If you have many or slow requests, you might need to increase this number. If no worker is available to start processing a request, a 504 Gateway Timeout response will be returned.