The instantaneous vector size - in the stats segment, per-thread - is the best 
measure of how hard vpp is working.



It's not a linear function of the offered load, but for any given offered load 
/ feature set you can model it with three segments:



  *   Dead asleep: vector size < 3, offered load up to maybe 1 mpps’ worth of 
simple forwarding
  *   Linear region: vector size increases smoothly as offered load increases, 
up a vector size of maybe 128 or so
  *   Hit the wall: a slight increate in offered load causes a huge jump in the 
vector size, traffic loss, etc.



HTH... Dave



-----Original Message-----
From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Prashant Upadhyaya
Sent: Friday, June 7, 2019 5:41 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] Approximate effective CPU utilization of VPP worker



Hi,



I understand that VPP workers poll so they are always at 100 % CPU.

However, I want to get an estimate of what is the effective CPU utilization 
i.e. the amount which was spent in doing the work for packet processing.



In the native applications, the crude way I used to employ was to take a time 
window of say 1 second and I already know how many cpu cycles it is worth, this 
acted as the denominator. Then in every packet poll, I used to count the cycles 
spent when the packet was actually brought in and processed. So empty polls 
were not counted in the used cycles.

This acted like the numerator.  When the window was exhausted, I used the 
numerator/denominator to get an approximation of effective CPU utilization of 
the worker.



Is something like this already possible in VPP, I need to constantly monitor 
the effective CPU utilization of the worker at runtime to take some decisions 
and inform the system peers eg. to reduce sending traffic etc.



Regards

-Prashant
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13240): https://lists.fd.io/g/vpp-dev/message/13240
Mute This Topic: https://lists.fd.io/mt/31973018/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to