Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm using looking in the system monitor I see both CPUs but nothing seems to make the #2 do anything. Is there something I need to enable on this to allow that to be made use of or is this just how it goes?
Hi
How did you get to the conclusion that only 1 core/cpu seems to be used? Did you run multiple concurrent loops?
So, if you issue a "cat /proc/cpuinfo" you only see 1 core/cpu or do you see 2?
Greetings.
When you say the system monitor, what do you mean (ksysguard, top, gnome system monitor or something else)? And if you mean top, did you have it in the correct mode?
I note that you have quite an old kernel, which probably shouldn't be a problem, but you never know...
Did you have a reasonable level of loading, say pushing up the loading beyond 50% on the one core that you are using?
But, in general, you should be using both cores. You have an SMP kernel, which should be a good start.
I'm not sure about Cool 'n Quiet (the AMD power saving mechanism - I've got more experience with Intel), but you would expect both cores to be used even at a low level. However, if the throughput requirements can be met with one core still in a power saving state, it may be more economical to do that, so you may have to get beyond a certain level of loading to bring the second core into life.
May not be sufficient to drive both CPUs - single-threaded maybe.
Quote:
but wait, apparently I'm blind! There IS movement on the other line (and both the CPU percents change too).
As suggested, try some loopers - something as simple as several of something like "while true; do a=1; done" in the background. Easily setup, easily cancelled, proves the point. I use similar when I need to drive a subset of the CPUs on test machines.
The linux scheduler is notorious for scheduling as much as it can to a single core. Even with multi threaded apps the threads get bounced around and often end up on a single core, leaving your others completely vacant. I have seen this after parallelizing a few simple algorithms with OpenMP and rather than a speed up I got a slow down. Why? Because of something which is known as "thread cpu affinity", it tells the scheduler which cpu/core the thread is bound to (if any). If a thread is not bound to any cpu, then the scheduler is free to move the thread around as *it* sees fit.
There have been a number of recent discussions on this topic on various hpc lists. Check this thread out http://www-unix.mcs.anl.gov/web-mail.../msg00053.html
Long story short, taskset and numactl are command line apps that give you control over the cpu and memory affinity.
Interesting. Last time I looked at (a small piece of) the scheduler, it was at pains to attempt to redispatch on the same processor - cache/TLB concerns. I wouldn't expect to see them "bouncing around" significantly unless that processor went busy with something else, and the ready task(s) got dispatched on another engine. But I play with "multi-process" not (hugely) "multi-threaded". If I need to constrain workloads I use cpusets (now containers/cgroups) - but that is the opposite requirement to the OP here.
@santana, what kernel (i.e. scheduler code) are you using ?. Ingo has asserted the CFS he shipped a little while back (2.6.20 ???) resolves many ailments of old. Was aimed in large part at the desktop latency problems, but seems to have general benefit.
The linux scheduler is notorious for scheduling as much as it can to a single core. .. Why? Because of something which is known as "thread cpu affinity", ... There have been a number of recent discussions on this topic on various hpc lists. Check this thread out http://www-unix.mcs.anl.gov/web-mail.../msg00053.html
by 'serious apps' I was meaning running Oracle 10g on it and getting it to sort some tables (with no indexes) from different logins.
but as I mentioned it's working I was just not reading the graphs right.
by "system monitor" I mean the Gnome app that comes with system tools.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.