Configuring for benchmarking

QNX SDP8.0Performance Tuning User GuideUser

Disabling source port randomization

Many high-performance network interfaces support Receive Side Scaling, which efficiently distributes traffic flows to different queues using a hashed value. This value is usually based on a combination of the source and destination addresses and their port numbers.

By default, io-sock uses a random, ephemeral source port when it creates a new traffic flow, which makes carrying out a spoofing attack more difficult.

However, when you are benchmarking an interface and the way its traffic flow is distributed is based in part on a random source port, each run may use different traffic distributions across the multiple queues and, therefore, generate different results from run to run.

The use of a random source port is controlled by the sysctl variable net.inet.ip.portrange.randomized, which defaults to 1 (enabled). If you set it to 0 (disabled), io-sock assigns the ephemeral source ports in sequential order, which helps ensure that the hashing of different flows to different queues is done in a consistent manner.

Because it reduces security, disabling source port randomization should only be done during benchmarking and never in a production system.

Note:

Performance may be different when source port randomization is disabled. How different depends on the exact hashing algorithm implemented in the network interface hardware and the mixture of traffic used in the benchmark. Although disabling randomization can help you maintain consistency from run to run, especially when experimenting with other performance changes, it is not in itself a method for improving performance.

Page updated: