8

I'm not quite sure if stackoverflow or serverfault is the forum to use for this question, but ill try here.

Is there some command I can use or a file I can check in order to find out which process scheduler I'm using on my Linux system? I am not looking for the I/O scheduler, but the process scheduler, and please, do not refer to guides or howtos for what a scheduler is, what I'm simply asking is if there is a command or file I can run/check to see this. I could check the doc for my kernel but again I'm just wondering if there is a command or file i can check.

I might have been a little redundant above but that's because the posts I've seen people seem to confuse process scheduler with the i/o scheduler, and they don't seem to answer the actual question, just provide links to what a scheduler is which is not what I'm after here, so apologies if the above comments sounded rude.

  • 2
    Your implying that Linux somehow must have different scheduler algorithms that one can choose amongst. What makes you think that it's the case? – Stéphane Chazelas Apr 29 '14 at 14:34
  • possible duplicate of How can you determine which process scheduler is being used? – Zan Lynx Apr 29 '14 at 14:42
  • I dont, and i dont think you can change the process scheduler in real time. What im asking is if there is a command to check or a file to read the contents of to be able to see which one is active. But if you wanted i think you could choose O(1) or O(n) if you really wanted to. – exceed Apr 29 '14 at 14:43
  • 1
    AFAIK in Linux kernel 2.6.23 we change process scheduler from O(1) to CFS, and we don't have any other scheduler for processes that an be dynamically changed as for block I/O scheduler. – Artur Szymczak Apr 29 '14 at 14:44
  • 2
    @ZanLynx Suggest closing the older question as a duplicate of this one instead, because the question is getting better treatment here already. – goldilocks Apr 29 '14 at 14:53
7

Is there some command i can use or a file i can check in order to find out which process scheduler im using on my linux system ?

No, because unlike WRT to the I/O scheduler, there is only one possibility: the CFS ("Completely Fair Scheduler"), which includes real-time capabilities. The CFS is named partly to distinguish it from the "O(1)" scheduler, which as noted in that article was superseded in version 2.6.23.

So if you have a kernel where you are not sure, just check the version number.

  • Thanks for your answer, then i guess there is no file i could check either to find this out without consulting the documenation, it would be handy to be able to quicly find out the scheduler used to have a better overview of the details of the parameters being used in the kernel the system is using. – exceed Apr 29 '14 at 14:53
  • 1
    I don't think there is such a thing because it doesn't reflect any kind of configuration option or "parameter being used" etc. There's only one possible scheduler, the scheduler; currently, it's called the "completely fair scheduler", and this is an abstract design issue, one of many that contribute to the kernel. Generally they are documented in the source, etc. So the question is redundant of uname -r. – goldilocks Apr 29 '14 at 15:08
0

Try:

cat /proc/config.gz | gunzip > ~/running.config
nano -w ~/running.config
CTRL + W SCHEDULE

See here: Chapter 14: Tuning

  • I dont have the kernel configuration file, then i could check it like that. I'm using a redhat system with a binary rpm that installs the kernel. – exceed Apr 29 '14 at 14:46
  • 1
    When searching through it the only variables related to process schedulers seems to be CONFIG_SCHED_SMT=y, CONFIG_SCHED_MC=y and CONFIG_NET_SCHED=y which doesnt really tell me much – exceed Apr 29 '14 at 14:51
  • 1
    CONFIG_SCHED_SMT=y Hyperthreading Scheduler is ON, CONFIG_SCHED_MC=y MultiCore Support is ON, CONFIG_NET_SCHED=y QoS/FairQueing is ON for Networking. As Goldilocks Alluded to his answer is correct. – eyoung100 Apr 29 '14 at 14:57
  • 2
    Why not just zgrep SCHEDULE /proc/config.gz? – terdon Apr 29 '14 at 15:12
  • 1
    I realize, my point was that you were using an unnecessarily convoluted approach. – terdon Apr 29 '14 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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