0

On 8-core server, 0-3 are configured as isolcpus and remaining cores (4-7) are available for system and user processes to run. My application has multiple processes which will run on any one of the mentioned non-isolcpu cores (4-7).

I need to find the total CPU utilization of the application (all processes combined) to determine the right isolcpus range to be configured for the system.

I'm quite confused about this way of calculating CPU utilization for a process or group of processes. Can somebody enlighten me in laymen terms? Thanks!

Went through related questions as well, none of them helped: How are CPU time and CPU usage the same?

surya
  • 101

1 Answers1

0

How to you start the application?

If you use systemd you may use CPUAccounting= setting in the unit file and systemd will collect some CPU metrics. If you don't use systemd, you may still put your application into cgroup with enabled accounting manually.

Finally, I'd take a step back and re-consider the approach to the problem you are trying to solve. There is a lot of nuance in CPU so just looking at CPU time may not be helpful. If you don't know already how many dedicated cores do you need, you may not want to use them at all. Dedicated cores are often used for very latency-sensitive applications which extensively use spin-locks and tightly control number of threads they have. Think of a things like low-latency user-space network drivers which want to avoid context switches and interrupts.

What are you trying to optimize for? Is the workload latency-sensitive? Would it be better to setting cpu limits other than dedicated cores?

rvs
  • 4,125
  • 1
  • 27
  • 31