lkml.org 
[lkml]   [2005]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: CPU utilization and hyperthreading
Date
On Sunday 06 November 2005 16:13, erezz@techunix.technion.ac.il wrote:
> Hi,
>
> I'm using a 2.6.4-52 (Suse 9.1 pro distribution) kernel on a 3.2 dual
> XEON machine (with hyperthreading).
>
> I'm trying to analyze the performance of a kernel module that contains
> 4 kernel threads (3 of them are more active). Also, some of the work is
> done in a tasklet. The CPU load (as shown in vmstat) doesn't reach more
> than 50%. When trying to artificially stress the system with some
> useless loops, the CPU load reaches 65% (but I cannot reach 100%). Also, the
> interrupts count in vmstat is around 20000 (1000 when idle).
>
> My questions are:
> 1. Why can't I reach 100%?

You can.

# while true; do true; done &
# while true; do true; done &
# while true; do true; done &
# while true; do true; done &

> 2. I guess that since I have 4 virtual CPUs (as shown in /proc/cpuinfo), not all
> of them are stressed. Is there a way to see the CPU utilization for each CPU
> (vmstat doesn't allow that)?

top

> 3. When I load a module with a kernel thread that runs an infinite loop, I get
> 25% CPU utilization (50% if I run 2 threads). Is it because I'm using 100% of a
> single CPU (out of 4)?
> 4. How is the time spent in interrupt context estimated? Is it possible to view
> it somehow?
--
vda
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-06 15:34    [W:0.400 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site