Oliver Welter wrote:
Now I want to achive that in times of heavy load the individual Servers get a minimum percentage of CPU time. So for example I will force that my very important Server A alwasy gets at least 50% CPU time when needed while A to D need only 10%. If Server A does not need so much CPU time, the other ones are allowed to take as much as available.

Try this;

/etc/vservers/A/schedule:
1
2
500
0
1000
dummy

/etc/vservers/[BCDE]/schedule
1
10
100
0
200
dummy

/etc/vservers/[A-E]/flags
...
sched_prio
...

This gives server A 50% of one CPU in your system, and servers B to D 10%. If you have 2 way systems, change the first line of each “schedule” file to “2”.

This doesn't guarantee to real-time measurement that each server will get a level of allocation, but it does have the net effect; depending on how large you set the bucket.

The bucket size is the third number. This should be thought of in proportion to the number of tokens you are allocating per second. In the first server, this is set to 1000, or 2 seconds of 50% CPU activity. (assuming HZ=1000).

In the other servers, this is set to 200, or 2 seconds of 10% CPU activity.

Often the scheduler is mistaken as not working when individual contexts get imbalanced levels of CPU time allocated to them. This is fine; the one getting "more" than their fair share is simply using the CPU more, and the CPU has nothing higher priority to do. The context getting the additional time will appear with a much lower priority in vtop, and once the system gets busier, the contexts apparently "hard done by" will get more (relative) priority, so their performance is more reliable.

HTH,
Sam.
_______________________________________________
Vserver mailing list
[email protected]
http://list.linux-vserver.org/mailman/listinfo/vserver

Reply via email to