1

Could please somebody help me with my question about The Completely Fair Scheduler in Linux kernel?

I wonder what does it mean - "CFS uses nanosecond granularity accounting and does not rely on any jiffies or other HZ detail. Thus the CFS scheduler has no notion of 'timeslices' and has no heuristics whatsoever." CFS.

So is there any sense now with HZ change while compiling custom kernel? Thank you in advance.

user16669
  • 11
  • 1
  • I leave questions of this type to Linux kernel hackers. You need to know a lot about scheduling and about your own use of Linux before you can tell how differences in scheduling algorithm will affect its performance for you. You can of course try out the scheduler on a non-critical Linux system. – reinierpost Sep 14 '09 at 08:02

1 Answers1

1

If I understand your question right, you are basically asking this:

does it affect to change the HZ setting when compiling my own kernel when using the CFS?

If that is your question, I would say - but forgive if I'm wrong about this - you are making this way too complicated. The CFS algorithm was designed to give all application an equal (fair) amount of runtime on the CPU. This equal amount has to be measured somehow - and I am not able to explain in detail how this works - but apparently the CFS "does not not rely on any jiffies or other HZ detail" for it. Which is all we need to know to answer your question, I think.

Since the CFS is completely fair and designed with that sole purpose in mind, adjusting the amount of HZ when compiling your own kernel can never make the CFS any more or less 'fair'. Hence, I would say that changing the amount of HZ when compiling your kernel to any arbitrary amount will not affect the performance of the CFS.

That said, there are other reasons why one would tune the amount of HZ when compiling a kernel. Power management is one reason that comes to mind, fixing time keeping in some brands of virtual machines is another, but I'm sure there are many more.

So, all together, my answer would be: no, with regard to the CFS it probably does not make sense for (i.e. affect the performance of) the CFS, but yes it does make sense for a host of other possible reasons. Otoh, a tickless kernel might mitigate all this again and I'm not sure about in how far the moment kernels were able to be tickless coincided with the moment the CFS was introduced.

wzzrd
  • 10,409
  • 2
  • 35
  • 47