Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Does emerge take advantage of multiple cpu's?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Asmod
n00b
n00b


Joined: 11 Jan 2003
Posts: 24

PostPosted: Tue May 04, 2004 6:15 pm    Post subject: Does emerge take advantage of multiple cpu's? Reply with quote

I've just got gentoo 2004.1 up and running. I've got SMP enabled, if I do a cat /proc/cpuinfo I see this

Code:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 1
model name      : Pentium Pro
stepping        : 9
cpu MHz         : 199.012
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov
bogomips        : 388.09

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 1
model name      : Pentium Pro
stepping        : 9
cpu MHz         : 199.012
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov
bogomips        : 396.28

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 1
model name      : Pentium Pro
stepping        : 9
cpu MHz         : 199.012
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov
bogomips        : 396.28


If I emerge something and then run top I see this

Code:

top - 19:13:14 up 49 min,  4 users,  load average: 1.11, 1.41, 1.34
Tasks:  59 total,   2 running,  57 sleeping,   0 stopped,   0 zombie
 Cpu0 :  5.9% us, 11.1% sy,  0.0% ni, 82.6% id,  0.0% wa,  0.3% hi,  0.0% si
 Cpu1 :  0.3% us,  2.0% sy,  0.0% ni, 94.1% id,  3.6% wa,  0.0% hi,  0.0% si
 Cpu2 : 68.5% us, 17.7% sy,  0.0% ni, 13.1% id,  0.7% wa,  0.0% hi,  0.0% si
Mem:    189392k total,   164504k used,    24888k free,    28256k buffers
Swap:   498004k total,        0k used,   498004k free,    48380k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 6267 root      25   0  8480 6372 4256 R 19.0  3.4   0:01.74 cc1
 6179 root      19   0  2608 1532 1868 S  6.5  0.8   0:00.59 sh
25472 root      16   0  1944  996 1740 S  0.4  0.5   0:17.56 top
27205 root      16   0  1944 1004 1740 R  0.4  0.5   0:14.75 top
26603 root      16   0  6504 1932 5876 S  0.2  1.0   0:03.08 sshd
 6266 root      19   0  1788  748 1360 S  0.2  0.4   0:00.02 gcc
   17 root      15   0     0    0    0 S  0.1  0.0   0:03.40 pdflush
    1 root      16   0  1408  468 1256 S  0.0  0.2   0:04.46 init
    2 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.01 ksoftirqd/0
    4 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/1
    5 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/1
    6 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/2
    7 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/2
    8 root       5 -10     0    0    0 S  0.0  0.0   0:00.12 events/0
    9 root       5 -10     0    0    0 S  0.0  0.0   0:00.00 events/1
   10 root      10 -10     0    0    0 S  0.0  0.0   0:00.00 events/2
   11 root       5 -10     0    0    0 S  0.0  0.0   0:00.01 kblockd/0
   12 root       5 -10     0    0    0 S  0.0  0.0   0:00.00 kblockd/1
   13 root       5 -10     0    0    0 S  0.0  0.0   0:00.00 kblockd/2
   14 root      25   0     0    0    0 S  0.0  0.0   0:00.00 khubd
   15 root      15   0     0    0    0 S  0.0  0.0   0:00.00 kirqd
   16 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pdflush
   18 root      15   0     0    0    0 S  0.0  0.0   0:01.98 kswapd0
   19 root       7 -10     0    0    0 S  0.0  0.0   0:00.00 aio/0
   20 root       8 -10     0    0    0 S  0.0  0.0   0:00.00 aio/1
   21 root       9 -10     0    0    0 S  0.0  0.0   0:00.00 aio/2
   22 root      25   0     0    0    0 S  0.0  0.0   0:00.32 kseriod
   23 root      25   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_0
   24 root      25   0     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_1
   25 root      15   0     0    0    0 S  0.0  0.0   0:00.00 khpsbpkt
   26 root       6 -10     0    0    0 S  0.0  0.0   0:00.00 reiserfs/0
   27 root       7 -10     0    0    0 S  0.0  0.0   0:00.00 reiserfs/1
   28 root       8 -10     0    0    0 S  0.0  0.0   0:00.00 reiserfs/2
  140 root      16   0  1756  896 1440 S  0.0  0.5   0:00.09 devfsd
 5155 root      15   0  1652  668 1476 S  0.0  0.4   0:00.08 syslog-ng
 5359 root      16   0  1708  636 1416 S  0.0  0.3   0:00.00 cron
 5374 root      17   0  2196  980 1764 S  0.0  0.5   0:00.07 login
 5375 root      16   0  2196  980 1764 S  0.0  0.5   0:00.05 login
 5376 root      16   0  2196  980 1764 S  0.0  0.5   0:00.04 login
 5377 root      16   0  1452  564 1280 S  0.0  0.3   0:00.00 agetty
 5378 root      16   0  1452  564 1280 S  0.0  0.3   0:00.01 agetty
 5379 root      16   0  1452  564 1280 S  0.0  0.3   0:00.00 agetty
 5380 root      16   0  2196 1252 1996 S  0.0  0.7   0:00.18 bash
 5583 root      15   0  2196 1224 1996 S  0.0  0.6   0:00.04 bash
 6752 root      16   0 10952 7572 5600 S  0.0  4.0   0:05.39 emerge
 7873 root      18   0  1612  604 1432 S  0.0  0.3   0:00.03 sandbox
 7874 root      16   0  2496 1460 1868 S  0.0  0.8   0:00.71 ebuild.sh
15406 root      18   0  2072 1048 1868 S  0.0  0.6   0:00.02 emake
15407 root      18   0  2128  876 1484 S  0.0  0.5   0:00.03 make
15408 root      17   0  2060  992 1868 S  0.0  0.5   0:00.02 sh
25468 root      15   0  2196 1224 1996 S  0.0  0.6   0:00.03 bash
26536 root      16   0  3508 1432 3136 S  0.0  0.8   0:00.00 sshd
26606 root      15   0  2196 1244 1996 S  0.0  0.7   0:00.04 bash
  608 root      17   0  2060 1004 1868 S  0.0  0.5   0:00.00 sh
  609 root      20   0  2132  884 1484 S  0.0  0.5   0:00.03 make
  610 root      17   0  2060  992 1868 S  0.0  0.5   0:00.02 sh


This doesn't look like emerge is making use of my 2 other cpu's. I have MAKEOPTS="-j4" in /etc/make.conf.

Is this the norm or is there something else I can enable?

Thanks
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Tue May 04, 2004 7:41 pm    Post subject: Reply with quote

Depends on the way the compile process is set up for each application. Some insist on building sequentially, or make refuses to parallelize the build process for some reason. MAKEOPTS="-j3" usually works like a charm for my workstation - dual Pentium 3.
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
Rainmaker
Veteran
Veteran


Joined: 12 Feb 2004
Posts: 1650
Location: /home/NL/ehv/

PostPosted: Tue May 04, 2004 11:02 pm    Post subject: Reply with quote

true, things like gcc, glibc and kernels (and many, many others) refuse to be build by distcc / multiple processors, because the compiled program would be instable / not as good as it could be...

If you really want to try, set MAKEOPTS to -j, without a number... This will use ALL available processor power (excluding `nice` values)
_________________
If you can't dazzle them with brilliance, baffle them with bullshit.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum