All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Andersen <anddan@linux-user.net>
To: Dan Maas <dmaas@maasdigital.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Distinguish real vs. virtual CPUs?
Date: Tue, 22 Mar 2005 03:01:01 +0100	[thread overview]
Message-ID: <423F7C5D.4000203@linux-user.net> (raw)
In-Reply-To: <20050321202726.A7630@morpheus>

Dan Maas wrote:
> Is there a canonical way for user-space software to determine how many
> real CPUs are present in a system (as opposed to HyperThreaded or
> otherwise virtual CPUs)?
> 
> We have an application that for performance reasons wants to run one
> process per CPU. However, on a HyperThreaded system /proc/cpuinfo
> lists two CPUs, and running two processes in this case is the wrong
> thing to do. (Hyperthreading ends up degrading our performance,
> perhaps due to cache or bus contention).
> 
> Please CC replies.
> 
> Thanks,
> Dan Maas
> -

The simplest thing to do would be to boot with the "noht" parameter.

Or you can use "schedtool" (google or freshmeat) to set the CPU-affinity 
at runtime to avoid HyperThreading the processes.

Daniel Andersen

-- 

  parent reply	other threads:[~2005-03-22  2:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-22  1:27 Distinguish real vs. virtual CPUs? Dan Maas
2005-03-22  1:56 ` Dave Jones
2005-03-22 11:55   ` Dr. David Alan Gilbert
2005-03-22 15:02   ` not for amd " Tom Vier
2005-03-22  2:01 ` Daniel Andersen [this message]
2005-03-22  2:12 ` J.A. Magallon
  -- strict thread matches above, loose matches on Subject: below --
2005-03-22  4:29 Pallipadi, Venkatesh
2005-03-22 21:26 ` Bill Davidsen
2005-03-22 21:38   ` Jan Engelhardt
2005-03-23 17:52   ` Tom Vier
2005-03-23 21:32     ` Bill Davidsen

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=423F7C5D.4000203@linux-user.net \
    --to=anddan@linux-user.net \
    --cc=dmaas@maasdigital.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.