Hi Kirill,
Kirill Korotaev wrote:
- AFAIK, "load" is very rough estimation for scheduler, since processes
can fall asleep and awake in such a moments that they won't be accounted
in timer interrupt. We had examples of such loads even in real life.
I mean how much "fair" is such a scheduler with timeslice-based class
management? Do you have any data on this?
Probably my explanation confused you. Our CPU controller calculate per
class CPU load by own, and it is not equivalent to the load average,
which is an average length of runqueue.
Anyway, the following is a sample results to show how much fair
in terms of CPU proportional ratio. I chose Himeno Benchmark, which is
a CPU intensive work load. It is easy to run benchmark to estimate CPU
MFLOPS. I also run several dhrystone benchmark in background
in order to let the dhrystone eat the all free CPU slots. Otherwise,
Himeno Benchmark uses all CPU resource without regard to the CPU
guarantee.
CPU guarantee Result of Himeno Benchmark Ratio Error
----------------------------------------------------------------------
10% MFLOPS measured : 29.643173 1.0 (Baseline) N/A
20% MFLOPS measured : 64.873545 2.1 +0.1
30% MFLOPS measured : 85.331164 2.9 -0.1
40% MFLOPS measured : 112.614102 3.8 -0.2
50% MFLOPS measured : 141.274826 4.8 -0.2
60% MFLOPS measured : 165.777944 5.6 -0.4
70% MFLOPS measured : 194.094210 6.6 -0.4
80% MFLOPS measured : 248.031517 8.4 +0.4
90% MFLOPS measured : 273.594037 9.2 +0.2
100% MFLOPS measured : 304.113874 10.3 +0.3
There is a trade-off between "fairness" and "scheduling overhead".
I think it is resonably fair, but I'm not sure you think it is fair.
- another problem with class-based scheduling is preemption of one class
by another like in usual CPU scheduler. I mean the situation when a task
from higher prio class is awaken while a low prio task is running.
Without such "special" preemtion different nasty things can easily
happen - low prio class can consume much more CPU than high prio one.
Does CKRM have any kind of preemption for handling this situation?
If I understand the issue correctly, isn't it a 2 level scheduling
specific problem? Our CPU controller is not the one.
= Volano benchmark =
- vanilla 2.4.16
probably you mean 2.6.14 kernel I hope?
Oops. I meam 2.6.14 kernel.
- Is CKRM CPU scheduler SMP-scalable? Do you have any benchmark results
available?
Due to hardware availability, I've only tested it on a 2CPU machine.
Only place liner algorithm is used is to add up class load average for
each cpu. It might be a cache unfriendly loop, but it just happen once
in a second for each task on refilling a timeslice. It is OK for small
number of cpus, but it would be a bottleneck on large number of cpus.
i.e. it's O(n), where n is number of tasks?
'n' is the number of online CPUs in the system. As I said, our CPU
controller calculate per class CPU load, but it is adding up to CPU
counter to avoid introducing a new lock in a critical path.
The per CPU (for per class) load is aggregated only at some period of
time, but aggregating per CPU load is O(n). It would be a problem
on a big SMP machine.
I also wonder why you use hierachical structures in CKRM especially for
CPU controlling. Our own experiments with CPU schedulers revealed that
every level of hierachy degrades performance quite noticably on hot pathes.
Since CKRM uses hierarchical class model, the CPU resource controller
also adopt hierarchical model in order to calculate effective guarantee
from class's guarantee with CKRM manner. However, after calculating
effective guarantees for each class, the CPU controller acts as flat
scheduling.
In the following example, Class A has 50% guarantee and its children
Class A1 has 20% and Class A2 has 50%. In CKRM, the effective guarantee
of A1 is 20% of 50%(parent's guarantee) = 10%, A2 is 50% of 50% = 25%,
and A is own guarantee (50%) minus sum of children's effective
guarantees = 15% (50% - 10% - 25%)
/A 50%
+---+------+
/A1 20% /A2 50%
Therefore the above hierarchical class structure with guarantee can be
converted to the following float class structure with effective guarantee.
/A 15% /A1 10% /A2 25%
It is what the CPU controller do. We don't do hierachcal scheduling.
Thanks,
MAEDA Naoaki
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
ckrm-tech mailing list
https://lists.sourceforge.net/lists/listinfo/ckrm-tech