Author Topic: SSD config: how to change default scheduler from cfq to deadline  (Read 1319 times)

Offline gsbsexzual

  • Jr. Member
  • **
  • Posts: 13
I'm running pclos kde 2012 on my thinkpad w500.  I'm trying to optimize my system for use with the ssd linux is installed on.  I've configured swap and tmp, system alignment, and filesystem layer.  The only thing i can't figure out is how to change the scheduler to deadline on boot.  I can change it via the terminal while the system is running, but i want it to be persistent.  Can someone help me out?  I hope this is in the right place....

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #1 on: August 17, 2012, 02:25:16 PM »
Please check also if in /etc/fstab, that your SSD is configured with noatime instead of relatime (no access times written to disk when opening a file)...


Your question:
http://www.pclinuxos.com/forum/index.php?topic=89569.65
Quote
I'm using the vanilla 2.6.38.2 kernel.  I've been using the deadline scheduler.  I've read this is the right thing to use with an ssd.  I include elevator=deadline in my grub kernel options.

=> you have to change that in grub.conf to change it to a persistent check... (if I remember that correctly - can't find my post about it anymore - from about a year ago)....


Offline gsbsexzual

  • Jr. Member
  • **
  • Posts: 13
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #2 on: August 17, 2012, 02:53:02 PM »
UUID=d075a62b-7e6c-4d1e-ba26-8feb8df2bf70 / ext4 noatime,discard 1 1

that's part of my /ect/fstab  is there anything else i should include there?

and as far as changing the grub.conf, where do i find that?  i've done a search, and looked in the places where i thought it may be with no luck...

thanks for the help thus far and sorry for the noob questions
« Last Edit: August 17, 2012, 02:55:08 PM by gsbsexzual »

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #3 on: August 17, 2012, 02:56:05 PM »
Sorry, my mistake.....

Please look in /boot/grub/menu.lst
=> there you can make the appropiate changes  ;)

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #4 on: August 17, 2012, 02:56:51 PM »
UUID=d075a62b-7e6c-4d1e-ba26-8feb8df2bf70 / ext4 noatime,discard 1 1

that's part of my /ect/fstab  is there anything else i should include there?

and as far as changing the grub.conf, where do i find that?  i've done a search, and looked in the places where i thought it may be with no luck...

thanks for the help thus far and sorry for the noob questions

Looks OK to me  :) (if I can remember it, that looks +/- the same as on my pc (with SSD))

Offline gsbsexzual

  • Jr. Member
  • **
  • Posts: 13
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #5 on: August 17, 2012, 03:00:40 PM »
ok thanks again.  here is the relevant line of menu.lst  :title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=d075a62b-7e6c-4d1e-ba26-8feb8df2bf70 quiet nokmsboot vmalloc=256M acpi=on vga=791
initrd (hd0,0)/boot/initrd.img

where do i go about adding the line elevator=deadline  ?

Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3800
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #6 on: August 17, 2012, 03:05:40 PM »
Right after "vga=791" like this:
Code: [Select]
vga=791 elevator=deadline
Galen

Offline gsbsexzual

  • Jr. Member
  • **
  • Posts: 13
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #7 on: August 17, 2012, 03:08:44 PM »
awesome.  thanks.  i'll test it out

Offline gsbsexzual

  • Jr. Member
  • **
  • Posts: 13
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #8 on: August 17, 2012, 03:21:37 PM »
THANKS GUYS!  rebooted and it's now default.  love pclos and love this forum and the support.  i don't feel like making another thread, but will if anyone suggests i do.  but i'm also having a problem where my system can only access 3gb of ram although i have 4gb installed and soon plan to upgrade to 8gb.  i could have sworn i had read somewhere that as of a fairly current kernel, i should be able to access at least the 4gb.  i also read somewhere about updating the kernel to an i686 pae to gain access to above 3gb of ram?  I guess i'm a little bit confused.  what should i be doing to be able to access 4/8gb of ram?

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #9 on: August 17, 2012, 03:26:16 PM »
Open Synaptic, search for kernel....

Install a "kernel-x.x.xx.x-pclosx.pae" kernel (I'd even suggest the .pae.bfs)
=> don't remove other kernels, it doesn't hurt to have more than one installed

Thus, install, then reboot, and select the new kernel to boot in the GRUB menu... please have some minutes patience (that new kernel will initialize some things for the first time)
If such a new kernel doesn't work, reboot in the "old" one, and test another  ;) (you may remove that not-working one then of course / report it here)...
=> normally, they all work well

But remember to change the /boot/grub/menu.lst again for that kernel (I don't think the adjusted settings are auto copied over - if it's the case, that's perfect of course  :)) (for your deadline-scheduler)

Offline kaptain_zero

  • Full Member
  • ***
  • Posts: 146
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #10 on: August 17, 2012, 03:35:03 PM »
Sorry, I came in the back door on this topic, but I've recently installed a couple of SSDs in my system and now use them as default boot disks.  As I understood it, current Linux kernels were SSD aware and no further efforts on my part were required?!?!? I can't fault the throughput on these disks.... 

I use a 128G SSD as / as well as /home, and added a 500G conventional disk mounted as /home/username/Desktop/Storage. I have a second set of disks, set up the same way, and simply clone to them on a weekly basis to serve as a backup.

If adding stuff to Grub is required, I'll be happy to do it.... but I wasn't aware it was required, and everything seems to be running fine?!?!?


Regards

Christian
Asus M4A78-EM, AMD Phenom II X4 940 Quad Core, GeForce 8800 GT, 4Gb ram

Asus F2A85-M, AMD A8-5600 Quad Core APU (Radeon HD 7560D graphics built in), 8Gb ram

Samsung SCX-4623F all in one monochrome laser

Offline gsbsexzual

  • Jr. Member
  • **
  • Posts: 13
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #11 on: August 17, 2012, 03:37:04 PM »
it's just to further enhance the performance of the ssd, as to my understanding

Offline gsbsexzual

  • Jr. Member
  • **
  • Posts: 13
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #12 on: August 17, 2012, 03:41:33 PM »
downloading and going to try the new kernel soon and report back.  i'm going with the .pae.bfs one.  should i switch to bfs as my default scheduler?  or is deadline more where i want to be?  i've just read up on bfs and theoretically it seems nice, but it sounds like in practice is doesn't work as good as deadline does?   

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #13 on: August 17, 2012, 03:46:27 PM »
downloading and going to try the new kernel soon and report back.  i'm going with the .pae.bfs one.  should i switch to bfs as my default scheduler?  or is deadline more where i want to be?  i've just read up on bfs and theoretically it seems nice, but it sounds like in practice is doesn't work as good as deadline does?   

No, for SSD, deadline is the right scheduler in my opinion....
BFS in  .pae.bfs is not a disk scheduler, but a series of patches to adjust the kernel to perform better (by Con Kolivas)... In PCLinuxOS, we recommend it for use (it's also the stock choice)... but you may choose yourself of course (BFS is a task scheduler, an alternative to CFQ - what's standard delivered with the Linux kernel)

Offline kaptain_zero

  • Full Member
  • ***
  • Posts: 146
Re: SSD config: how to change default scheduler from cfq to deadline
« Reply #14 on: August 17, 2012, 03:49:19 PM »
what should i be doing to be able to access 4/8gb of ram?
Install the following kernel: 3.2.18-pclos1.pae.bfs

pae kernals can access above 3.xG of ram... (I think up to 16G but don't quote me on that). It works here as I have 4 1G sticks and Gkrellm reports 4049M total memory.

Regards

Christian
« Last Edit: August 17, 2012, 03:50:54 PM by kaptain_zero »
Asus M4A78-EM, AMD Phenom II X4 940 Quad Core, GeForce 8800 GT, 4Gb ram

Asus F2A85-M, AMD A8-5600 Quad Core APU (Radeon HD 7560D graphics built in), 8Gb ram

Samsung SCX-4623F all in one monochrome laser