Skip to content

CPU affinity #4

@oberstet

Description

@oberstet

When running multi-threaded (or also with a single thread and with testee on same machine), it seems important for performance (absolulte and consistency) to set the CPU core affinity of each thread.

E.g. I have now implemented that in the Autobahn testee and was able to bring down (essential more than half!) Median and Q90 latencies:

     Min:       1.5 ms
      SD:      21.0 ms
     Avg:      24.8 ms
  Median:      16.7 ms
  q90   :      42.9 ms
  q95   :      75.1 ms
  q99   :     105.3 ms
  q99.9 :     122.6 ms
  q99.99:     129.0 ms
     Max:     132.6 ms

When running on e.g. a 8 core machine, having the option to start 'wsperf` like this would be ideal:

 wsperf --workers 0,1,2,3 ...

This would then allow to start the testee

testee --workers 4,5,6,7 ...

With Python, there is the psutil package, which relies on the sched_setaffinity system call on Linux.

The feature (setting thread/process CPU affinity) should be available on other platforms as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions