[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: AMD64 X2 questions



On Thu, Aug 23, 2007 at 05:08:49PM +0200, Hans-J. Ullrich wrote:
> I have an AMD64 dual-core cpu running debian-amd64. Now I have heard, that it 
> might be possible, to run applications on different cpus. One app is running 
> on cpu1 , the other on cpu2 at the same time. Or just using only one of the 
> two cpu-cores. Is that right ???
> 
> (I know, that in M$-Windows this is possible.)
> 
> I always thought, the kernel is scheduling the processes without the 
> possibility to change this by users. If I am wrong, how can I manage it ?

With an SMP kernel (all current debian x86/x86_64 kernels are SMP as far
as I know), you get access to both CPUs and the kernel scheduler by
default will try to keep both busy.  The scheduler will by default try
to keep a process running on the same CPU all the time to avoid cache
flush penalties and such, but of course if the load gets too unbalanced
it will move something.

I imagine it is possible to lock a task to a specific CPU although
unless you are running some server with a very specialized task, you
probably don't have any good reason to.  The scheduler does a great job
in general at trying to run all your programs as quickly as possible.

So both cores will be in use as long as there are at least two threads
that want CPU time.

Run 'top' and hit '1' I think, and it will show the cpu load per core
rather than a summary.

--
Len Sorensen



Reply to: