LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   kernel scheduler (https://www.linuxquestions.org/questions/linux-general-1/kernel-scheduler-726813/)

robzane 05-18-2009 11:11 AM

kernel scheduler
 
I use a ramdisk. I would like to set scheduler elevator=noop for the ramdisk but I want to use another scheduler for the hard disks.
I can't understand if it is possible and how to do
Thank You

Please correct my English because I'm Italian

unSpawn 05-18-2009 07:10 PM

As far as I read /usr/src/kernels/${KERNELVERSION}/Documentation/scheduler/ only one scheduler can be selected and it only "works" on CPU's/groups/cgroups.

Tinkster 05-18-2009 09:00 PM

Quote:

Originally Posted by robzane (Post 3544808)
I use a ramdisk. I would like to set scheduler elevator=noop for the ramdisk but I want to use another scheduler for the hard disks.

That's actually not a scheduler, but an io-scheduler. Slightly
different beast.

Quote:

Originally Posted by robzane (Post 3544808)
I can't understand if it is possible and how to do
Thank You

Yes, it can.
Assuming you have sysfs enabled, with SCHEDNAME="your scheduler of
choice" and DEV is the name of the device you want to set an IO-
Scheduler for:
echo SCHEDNAME > /sys/block/DEV/queue/scheduler


Quote:

Originally Posted by robzane (Post 3544808)
Please correct my English because I'm Italian

Your English is ultimately superior to my Italian ;}

In the second block you'd use whether instead of if.


Ciao,
Tink

unSpawn 05-19-2009 02:22 AM

Awesome. Learnt something new. Thanks Tink.

robzane 05-20-2009 12:23 AM

there is no queue/scheduler entry in /sys/block/ram0/

Tinkster 05-20-2009 01:40 AM

Goes to show I never looked at ram-disks, huh. I'd need to
start digging through kernel-doco to see WHY ram (and loop,
for that matter) devices don't have I/O schedulers attached.

But I guess you're out of luck with elevator and RAM disks
then. Sorry mate.

I'm still curious - what are you trying to do with that RAM
disk, and why the need for a different scheduler?



Cheers,
Tink

robzane 05-21-2009 12:51 AM

A different scheduler (=a direct io scheduler) reduce power consumption in ram and it is faster
I use 2gb ram disk for torrent


All times are GMT -5. The time now is 02:47 PM.