Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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 8:02

1 Answer 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.