View previous topic :: View next topic |
Author |
Message |
xanc n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 29 Oct 2004 Posts: 13
|
Posted: Sun Oct 09, 2005 12:32 pm Post subject: Dual Xeon w/ HT only compiles at 25% per cpu |
|
|
I have a dual Xeon setup, with hyperthreading and SMP enabled in the kernel. Doing things like running Folding@home I can max out all 4 cpu's when monitoring it with htop. When i emerge, it will max out while doing things like unpacking the source, but when it actually starts compiling, each virtual CPU only loads to about 25-30%. I use make_opts="-j4". I noticed that when emerge runs the make command it runs it as "make -j4 -j1 ...." appending that -j1 to the command. Does anyone know why each virtual CPU will only load to 25-30% while compiling? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54831 Location: 56N 3W
|
Posted: Sun Oct 09, 2005 12:47 pm Post subject: |
|
|
xanc,
-j1 stops parallel makes. Its only used in ebuilds when parallel makes are know to fail. Your -j4 should be used for most things. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
xanc n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 29 Oct 2004 Posts: 13
|
Posted: Sun Oct 09, 2005 12:49 pm Post subject: |
|
|
is there possibly a bug in htop that makes it look like all 4 cpus are running at 25% when really its 25% of my total cpu power? Would it be advantageous for me to disable HT then, so that at least a full 50% of my CPU can be used for single threaded compiles? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54831 Location: 56N 3W
|
Posted: Sun Oct 09, 2005 1:43 pm Post subject: |
|
|
xanc,
I'm not a htop user but in top (the text one) 25% CPU load on a four CPU box is one CPU fully loaded, which is what -j1 will get you. HyperThreading, makes your two CPUs appear as four.
Turning off HT will make top report 50% CPU load but thats still 1 CPU fully loaded, so it only changes the reporting, not what is actually happening.
Your htop report sounds about right when you emerge things that enforce MAKEOPTS="-j1" _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bollucks l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 27 Oct 2004 Posts: 606
|
Posted: Sun Oct 09, 2005 2:10 pm Post subject: |
|
|
You're seeing the effect of hyperthread smart nice balancing. If you run things at nice 19 they will use less cpu if something else is on the sibling cpu as sibling cpus arean't real cpus so they only give you 25% more power instead of an extra cpu. Try running everything nice 0 instead. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|