public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] Fair-user scheduler
@ 2007-01-26  6:01 Srivatsa Vaddagiri
  2007-01-26  6:03 ` [PATCH 1/2] core scheduler changes Srivatsa Vaddagiri
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Srivatsa Vaddagiri @ 2007-01-26  6:01 UTC (permalink / raw)
  To: riel, Ingo Molnar, Nick Piggin, Andrew Morton; +Cc: linux-kernel

Current Linux CPU scheduler doesnt recognize process aggregates while
allocating bandwidth. As a result of this, an user could simply spawn large 
number of processes and get more bandwidth than others.

Here's a patch that provides fair allocation for all users in a system.

Some benchmark numbers with and without the patch applied follows:


		 	user "vatsa"		    user "guest"
		    (make -s -j4 bzImage)      (make -s -j20 bzImage)

2.6.20-rc5		472.07s (real)		   257.48s (real)
2.6.20-rc5+fairsched	766.74s (real)		   766.73s (real)


(Numbers taken on a 2way Intel x86_64 box)

Eventually something like this can be extended to do weighted fair share
scheduling for:

	- KVM
	- containers
	- resource management

Salient features of the patch:

	- Based on Ingo's RTLIMIT_RT_CPU patch [1]. Primary difference between 
	  RTLIMIT_RT_CPU patch and this one is that this patch handles 
	  starvation of lower priority tasks in a group and also accounting
	  is token based (rather than decaying avg).

	- Retains existing one-runqueue-per-cpu design

	- breaks O(1) (ouch!)
		Best way to avoid this is to split runqueue to be per-user and
		per-cpu, which I have not implemented to keep the patch simple.

	- Fairsched aware SMP load balance NOT addressed (yet)

Comments/flames wellcome!


References:

1. http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11-rc2/2.6.11-rc2-mm2/broken-out/rlimit_rt_cpu.patch

-- 
Regards,
vatsa

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-01-31 15:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-26  6:01 [RFC] Fair-user scheduler Srivatsa Vaddagiri
2007-01-26  6:03 ` [PATCH 1/2] core scheduler changes Srivatsa Vaddagiri
2007-01-31 15:01   ` Srivatsa Vaddagiri
2007-01-26  6:05 ` [PATCH 2/2] Track number of users in the system Srivatsa Vaddagiri
2007-01-26 14:09 ` [RFC] Fair-user scheduler Kirill Korotaev
2007-01-26 18:52   ` Eric Piel
2007-01-31 15:10     ` Srivatsa Vaddagiri
2007-01-26 18:41 ` Chris Friesen
2007-01-31 15:16   ` Srivatsa Vaddagiri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox