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.

Kentzo
  • 131
  • 1
  • 10

2 Answers2

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.

Tux_DEV_NULL
  • 1,083
  • 7
  • 11
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.

Dmitri T
  • 531
  • 2
  • 2