From: Peter Dyballa <Peter_Dyballa@Web.DE>
To: Dieter Wilhelm <dieter@duenenhof-wilhelm.de>
Cc: help-gnu-emacs@gnu.org, Nordlöw <per.nordlow@gmail.com>
Subject: Re: Getting Number of CPU(-core)s and giving it as the --jobs argument to GNU Make
Date: Tue, 11 Sep 2007 23:52:58 +0200 [thread overview]
Message-ID: <0E646A4F-3738-4141-9E2F-4CD80927FB00@Web.DE> (raw)
In-Reply-To: <877imxc5sp.fsf@debby.local.net>
Am 11.09.2007 um 22:20 schrieb Dieter Wilhelm:
> That's a bit confusing, I thought I had *one* processor with *two*
> cores and the content in /proc/cpuinfo claims two processor, 0 and 1
> with two cores, respectively, where am I wrong?
HT – hyper-threading (parallel pipelines and parallel memory buses).
Many modern intel CPUs claim they are two (Xeons are four, or even
eight, I think). They are right, somehow: mostly you can assume that
in your case four commands are (can be) executed at the same time.
For your PC 'make -j 4' will improve compilation time. So doing in bash
cores=`grep cores /proc/cpuinfo | wc -l`
if [ $cores -eq 0 ]; then cores=1; fi
procs=`grep processor /proc/cpuinfo | wc -l`
thrds=`expr $cores \* $procs`
or in (t)csh
set cores=`grep cores /proc/cpuinfo | wc -l`
if ($cores == 0) set cores=1
set procs=`grep processor /proc/cpuinfo | wc -l`
set thrds=`expr $cores \* $procs`
would determine how many compilation threads can be executed in
$thrds. And it should also work when the CPU has no core ... Solaris,
AIX, HP-UX, IRIX ... have their own commands.
Anyway, a modern GNU make is able to determine by itself what's best.
This is done via 'make -j' without a limiting number.
--
Mit friedvollen Grüßen
Pete
Der Bezug einer Zeitung oder der Kauf eines Buches gibt niemand das
Recht, an die Verfasserinnen von Artikeln oder Büchern dreiste Briefe
zu schreiben.
(Friedrich Sieburg)
next prev parent reply other threads:[~2007-09-11 21:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-11 14:53 Getting Number of CPU(-core)s and giving it as the --jobs argument to GNU Make Nordlöw
2007-09-11 17:16 ` Peter Dyballa
2007-09-11 20:20 ` Dieter Wilhelm
2007-09-11 21:52 ` Peter Dyballa [this message]
2007-09-11 22:11 ` Dieter Wilhelm
2007-09-11 22:29 ` Peter Dyballa
[not found] ` <mailman.725.1189541941.18990.help-gnu-emacs@gnu.org>
2007-09-12 6:30 ` Unknown
2007-09-12 8:20 ` Nordlöw
2007-09-12 9:38 ` Peter Dyballa
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0E646A4F-3738-4141-9E2F-4CD80927FB00@Web.DE \
--to=peter_dyballa@web.de \
--cc=dieter@duenenhof-wilhelm.de \
--cc=help-gnu-emacs@gnu.org \
--cc=per.nordlow@gmail.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).