1

I'm trying to measure efficiency of the networking system and looking for a tool that either allows to limit max bandwidth for each test or, ideally, limit cpu utilization. At the end I need to have an answer like "for 10% CPU bandwidth is 10Gbit/s".

Natural choice to test bandwidth alone would be the iperf tool, but it seems to always utilize 100% CPU making it useless for this.

2 Answers 2

1

I am guessing you have multiple CPUs. Then look into cpusets and cpushares. With cpuset you can pin specific process to specific cpu. Then with cpushares you can limit the cpu utilization.

2
  • In other hand the idea is to bind iperf to a given core and then measure load on the rest?
    – Kentzo
    Oct 10, 2017 at 19:38
  • yes, that should be ok to do. iperf also has a cpu affinity option. Oct 11, 2017 at 7:19
1
  1. You can consider Apache JMeter tool which can throttle its connections to the defined throughput value which you can set via manipulating the following properties:

    httpclient.socket.http.cps=0
    httpclient.socket.https.cps=0
    

    where cps stands for characters per second

    References:

  2. For limiting CPU usage per process you can use taskset and cpulimit commands combination, check out Restricting process CPU usage using nice, cpulimit, and cgroups article for more details.

Not the answer you're looking for? Browse other questions tagged .