Re: Overscheduling DOES happen with high web server load.

Andrea Arcangeli (andrea@e-mind.com)
Thu, 6 May 1999 17:39:35 +0200 (CEST)


On Wed, 5 May 1999, Phillip Ezolt wrote:

>Hi all,
>
>In doing some performance work with SPECWeb96 on ALpha/Linux with apache,
>it looks like "schedule" is the main bottleneck.

Alt. Alpha uses HZ at 1024 so you get a scheduling rate by default 10
times higher than in all other archs.

>Is it necessary to calculate the goodness of every process at every schedule?

I think what we should do is to reschedule _only_ if a different process
will be scheduled. What I consider oversheduling is to schedule() and then
not switch to another task. Could you apply the patch below and run vmstat
1 again and see the rate of the overscheduling?

Index: kernel//sched.c
===================================================================
RCS file: /var/cvs/linux/kernel/sched.c,v
retrieving revision 1.1.2.33
diff -u -r1.1.2.33 sched.c
--- sched.c 1999/05/05 11:26:37 1.1.2.33
+++ sched.c 1999/05/06 15:37:16
@@ -764,12 +764,12 @@
#ifdef __SMP__
sched_data->prev = prev;
#endif
- kstat.context_swtch++;
get_mmu_context(next);
switch_to(prev,next);

__schedule_tail();
}
+ kstat.context_swtch++;

reacquire_kernel_lock(current);
return;

If the rate is low there is no overscheduling and you should simply
decrease HZ to spend less time in the scheduler.

Andrea Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/