mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: erezz@techunix.technion.ac.il
To: linux-kernel@vger.kernel.org
Subject: CPU utilization and hyperthreading
Date: Sun,  6 Nov 2005 16:13:59 +0200	[thread overview]
Message-ID: <1131286439.436e0fa79e228@webmail.technion.ac.il> (raw)

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%? 
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)? 
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?

Thanks
Erez




             reply	other threads:[~2005-11-06 14:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-06 14:13 erezz [this message]
2005-11-06 14:26 ` Denis Vlasenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1131286439.436e0fa79e228@webmail.technion.ac.il \
    --to=erezz@techunix.technion.ac.il \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®