Skip to contentSkip to conversation

Kernel CPU Utilization

DISCUSSION Stephen Brennan 4 participants 4 messages Apr 21, 2017 – Apr 25, 2017

lore
Share & tools
lore
#0 lore raw

Hello all,

I was wondering if anyone had some information on how CPU time used by the kernel is accounted for, e.g. in top or htop. I would imagine that kernel code running in process code would be "billed" toward that process. What about kernel worker threads (for example, work_structs queued for later)?

My overall goal is that I'm doing some large-scale network emulation, and I want to ensure that the kernel is not using too much CPU time, otherwise the CPU overhead may be messing with the results.

Thanks,
Stephen

#1 lore raw

21.04.2017, 19:19, "Stephen Brennan" <[email protected]>:

Quoted 1 line

Hello all,

Hello,

Quoted 8 lines

I was wondering if anyone had some information on how CPU time used by the kernel is accounted for, e.g. in top or htop. I would imagine that kernel code running in process code would be "billed" toward that process. What about kernel worker threads (for example, work_structs queued for later)?

My overall goal is that I'm doing some large-scale network emulation, and I want to ensure that the kernel is not using too much CPU time, otherwise the CPU overhead may be messing with the results.

I written to the code for myself, you can use and develop this code (open source).

https://github.com/mueddib/cpustat

Quoted 2 lines

Thanks,
Stephen

Regards,

Ozgur

#2 lore raw
Quoted 4 lines

21.04.2017, 19:19, "Stephen Brennan" <[email protected]>:
?Hello all,

Hello,

Quoted 8 lines

?I was wondering if anyone had some information on how CPU time used by the ?kernel is accounted for, e.g. in top or htop. I would imagine that kernel code ?running in process code would be "billed" toward that process. What about kernel ?worker threads (for example, work_structs queued for later)?

?My overall goal is that I'm doing some large-scale network emulation, and I want ?to ensure that the kernel is not using too much CPU time, otherwise the CPU ?overhead may be messing with the results.

I written to the code for myself, you can use and develop this code (open source).

https://github.com/mueddib/cpustat

Quoted 2 lines

?Thanks,
?Stephen

Regards,

Ozgur

#3 lore raw
Quoted 25 lines · Ozgur Karatas
Quoted 5 lines

21.04.2017, 19:19, "Stephen Brennan" <[email protected] <javascript:;> :
Hello all,

Hello,

Quoted 1 line

I was wondering if anyone had some information on how CPU time used by

the

Quoted 1 line

kernel is accounted for, e.g. in top or htop. I would imagine that

kernel code

Quoted 1 line

running in process code would be "billed" toward that process. What

about kernel

Quoted 3 lines

worker threads (for example, work_structs queued for later)?

My overall goal is that I'm doing some large-scale network emulation,

and I want

Quoted 1 line

to ensure that the kernel is not using too much CPU time, otherwise the

CPU

Quoted 1 line

overhead may be messing with the results.

I written to the code for myself, you can use and develop this code (open source).

Quoted 10 lines

https://github.com/mueddib/cpustat

Quoted 2 lines

Thanks,
Stephen

Regards,

Ozgur

Hi

Very likely it is accounted for soft interrupt, hard interrupt and system time

If vm involved, steal time shall be accounted to

_______________________________________________

Quoted 4 lines

Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org <javascript:;>
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Signature · 10 lines
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20170425/f87ec7d1/attachment.html