On Sun, 8 Nov 1998 [EMAIL PROTECTED] wrote:
> On Sun, Nov 08, 1998 at 11:59:40AM +0100, Matthias W�chter wrote:
> ...
> > Running a single 100%-usage-application (i.e. BladeEnc to compress MP3
> > files) this application not runs on one of the two processors the whole
> > time, but hops between the two processors. This happens between 0.1 and 3
> > times per second (i.e., sometimes it changes 3 times per second, sometimes
> > it keeps one processor for 10 seconds and longer.) xosview shows this: At
> > one time, CPU0 has 100% and CPU1 has 0%, then this changes to see CPU0 at
> > 0% and CPU1 at 100%.
> Switching CPU is bad for cache utilization. But the scheduler has some
> bias that makes the kernel favour keeping a process on the same cpu. You
> can try to increase the value in ...linux/include/asm/smp.h:
> #define PROC_CHANGE_PENALTY 20 /* Schedule penalty */
Interesting thing is that NT4SP3 shows exactly the same behaviour, except
it shows constantly about 50% (+/- 10%) for each CPU.
I think, this behaviour is intended to always test different utilization
schemes to find the optimum. Think of 2 processes, each at 50% CPU
utilization. Fine, for an optimum, they should use one CPU each. But then,
think of a third task started which needs 100% CPU. Now, the optimum is:
Task 3: CPU1 alone, the other tasks on the other CPU. Do you think the
scheduler is intelligent enough to find out how the tasks are swapped best
from one CPU to the other?
> Setting this to eg. 100 should make the process less prone to switching CPU.
I see. Is there any way to see process-hopping f.e. in 2x100%-utilization
szenarios? `top` and `ps` don't show the currently used CPU for each
process - is there something in /proc to find out how many
process-CPU-hops occur(ed)?
Winschdawos,
- Matthias
--
Der Wein mit der Pille ist in dem Becher mit dem F�cher.
-----------------------------------------------------------------------------