Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dual Xeon w/ HT only compiles at 25% per cpu
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
xanc
n00b
n00b


Joined: 29 Oct 2004
Posts: 13

PostPosted: Sun Oct 09, 2005 12:32 pm    Post subject: Dual Xeon w/ HT only compiles at 25% per cpu Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54831
Location: 56N 3W

PostPosted: Sun Oct 09, 2005 12:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
xanc
n00b
n00b


Joined: 29 Oct 2004
Posts: 13

PostPosted: Sun Oct 09, 2005 12:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54831
Location: 56N 3W

PostPosted: Sun Oct 09, 2005 1:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
bollucks
l33t
l33t


Joined: 27 Oct 2004
Posts: 606

PostPosted: Sun Oct 09, 2005 2:10 pm    Post subject: Reply with quote

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
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