Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29

Thread: Linux I/O Scheduler Comparison On The Linux 3.4 Desktop

  1. #11
    Join Date
    Mar 2008
    Location
    Eire
    Posts
    58

    Default

    Quote Originally Posted by cyring View Post
    I'm using elevator=deadline (previously noop) because they have less writing side effects onto the SSD
    I've never heard this before, any links or references?

  2. #12
    Join Date
    Apr 2012
    Location
    Canada
    Posts
    42

    Default

    What I'm curious about is some watt/power use comparison benchmarks.

    I've been using deadline on my laptop for a while, as I've noticed less power use. TBH, I don't know if it actually gives me better battery life or it's just me thinking it does.

  3. #13
    Join Date
    Nov 2011
    Location
    France
    Posts
    52

    Default

    Quote Originally Posted by Sadako View Post
    I've never heard this before, any links or references?
    Bellow, some of my readings

    http://en.wikipedia.org/wiki/Noop_scheduler

    http://grzen.blogspot.fr/2009/05/ssd...-linux_18.html

    http://ubuntuforums.org/showthread.php?t=1178209

    According to Wikipedia :
    • " NOOP scheduler is best used with solid state devices such as flash memory or in general with devices that do not depend on mechanical movement ... "
    • Deadline: " The kernel documentation suggest this is the preferred scheduler for database systems ... "


    In Kernel doc /usr/src/linux/Documentation/block/cfq-iosched.txt says :
    " That means by default we idle on queues/service trees. This can be very helpful on highly seeky media like single spindle SATA/SAS disks ... "


    I'm looking for a way to specify the kernel which respective scheduler to use with SSD & HDD, using boot command such as : elevator-DEVICE=<scheduler> rather than dealing with /sys/block/DEVICE/queue/scheduler (which happens after boot, ie. rc.local)

  4. #14
    Join Date
    Oct 2011
    Location
    Toruń, Poland
    Posts
    160

    Default

    Quote Originally Posted by cyring View Post
    Bellow, some of my readings

    http://en.wikipedia.org/wiki/Noop_scheduler

    http://grzen.blogspot.fr/2009/05/ssd...-linux_18.html

    http://ubuntuforums.org/showthread.php?t=1178209

    According to Wikipedia :
    • " NOOP scheduler is best used with solid state devices such as flash memory or in general with devices that do not depend on mechanical movement ... "
    • Deadline: " The kernel documentation suggest this is the preferred scheduler for database systems ... "


    In Kernel doc /usr/src/linux/Documentation/block/cfq-iosched.txt says :
    " That means by default we idle on queues/service trees. This can be very helpful on highly seeky media like single spindle SATA/SAS disks ... "


    I'm looking for a way to specify the kernel which respective scheduler to use with SSD & HDD, using boot command such as : elevator-DEVICE=<scheduler> rather than dealing with /sys/block/DEVICE/queue/scheduler (which happens after boot, ie. rc.local)
    Thank you for this one. I also would like to know how to specify the scheduler at boot time. I don't want to recompile the whole kernel just to set other scheduler as default.

  5. #15
    Join Date
    Nov 2011
    Location
    France
    Posts
    52

    Default

    Quote Originally Posted by Hirager View Post
    Thank you for this one. I also would like to know how to specify the scheduler at boot time. I don't want to recompile the whole kernel just to set other scheduler as default.
    With elevator=scheduler where scheduler is noop Or deadline Or cfq

    In my Wiki, I post my Syslinux boot config file, check line #47

    If you are using Grub, it looks like this in the /boot/grub/menu.lst file

    Code:
    title  Arch Linux
    kernel /boot/vmlinuz-linux root=/dev/sdb2 ro vga=0xf01 rootdelay=0 quiet nomodeset elevator=deadline nmi_watchdog=0
    initrd /boot/initramfs-linux.img

  6. #16
    Join Date
    Nov 2011
    Location
    France
    Posts
    52

    Default

    Quote Originally Posted by Mystro256 View Post
    What I'm curious about is some watt/power use comparison benchmarks.

    I've been using deadline on my laptop for a while, as I've noticed less power use. TBH, I don't know if it actually gives me better battery life or it's just me thinking it does.
    I suggest using PowerTOP v2 and check the main reasons of kernel wakeups

    http://en.wikipedia.org/wiki/PowerTOP

  7. #17
    Join Date
    Jun 2010
    Location
    ฿ 16LDJ6Hrd1oN3nCoFL7BypHSEYL84ca1JR
    Posts
    1,020

    Default

    Quote Originally Posted by disi View Post
    I have one in my Laptop and if I copy a ~20GB file, I cannot watch a video next to it. It will hang for 3-4 seconds. (Fedora 17)
    I just got a new Sandisk extreme and I don't see these problems. Instead I now have the satisfying feeling of very rarely having to wait for my hard disk (biggest problem was the access time for many little files I think).


    Not really sure if I got it correctly aligned though, we really need a simple tool for that doesn't use these legacy cylinders and sector sizes and a consistent terminology to describe SSDs...
    Code:
     % sudo parted /dev/sda --list
    Passwort: 
    Modell: ATA SanDisk SDSSDX24 (scsi)
    Festplatte  /dev/sda:  240GB
    Sektorgröße (logisch/physisch): 512B/512B
    Partitionstabelle: msdos
    Disk Flags: 
    
    Nummer  Anfang  Ende   Größe  Typ      Dateisystem  Flags
     1      1049kB  215GB  215GB  primary  ext4         boot
    
    
     % dd if=/dev/zero of=zero.txt bs=50M count=20
    20+0 Datensätze ein
    20+0 Datensätze aus
    1048576000 Bytes (1,0 GB) kopiert, 2,72858 s, 384 MB/s
     % dd if=zero.txt of=zero2.txt bs=50M count=20
    20+0 Datensätze ein
    20+0 Datensätze aus
    1048576000 Bytes (1,0 GB) kopiert, 2,80263 s, 374 MB/s
    This is with noop.

  8. #18
    Join Date
    Nov 2011
    Location
    France
    Posts
    52

    Default

    If "Anfang" means first sector of partition ? 2049kB seems not aligned as not being a multiple of 512 (physical sector size)
    One easy way is to partition with Windows Seven startup DVD which cares about SSD then back during Linux installation, change part type to Ext FS
    However both fdisk and parted are today ready for SSD presenting the sector way rather than CHS

    Quote Originally Posted by ChrisXY View Post
    ...
    Not really sure if I got it correctly aligned though, ...
    Code:
     % sudo parted /dev/sda --list
    Passwort: 
    Modell: ATA SanDisk SDSSDX24 (scsi)
    Festplatte  /dev/sda:  240GB
    Sektorgröße (logisch/physisch): 512B/512B
    Partitionstabelle: msdos
    Disk Flags: 
    
    Nummer  Anfang  Ende   Größe  Typ      Dateisystem  Flags
     1      1049kB  215GB  215GB  primary  ext4         boot
    
    
     % dd if=/dev/zero of=zero.txt bs=50M count=20
    20+0 Datensätze ein
    20+0 Datensätze aus
    1048576000 Bytes (1,0 GB) kopiert, 2,72858 s, 384 MB/s
     % dd if=zero.txt of=zero2.txt bs=50M count=20
    20+0 Datensätze ein
    20+0 Datensätze aus
    1048576000 Bytes (1,0 GB) kopiert, 2,80263 s, 374 MB/s
    This is with noop.
    Last edited by cyring; 05-12-2012 at 06:38 AM. Reason: Need to go back to the english courses

  9. #19
    Join Date
    Jun 2010
    Location
    ฿ 16LDJ6Hrd1oN3nCoFL7BypHSEYL84ca1JR
    Posts
    1,020

    Default

    Quote Originally Posted by cyring View Post
    If "Anfang" means first sector of partition ? 2049kB seems not aligned as not being a multiple of 512 (physical sector size)
    One easy way is to partition with Windows Seven startup DVD which cares about SSD then back during Linux installation, change part type to Ext FS
    However both fdisk and parted are today ready for SSD presenting the sector way rather than CHS
    That's what I meant. What is a "physical sector" size in a SSD?

    Would resizing the beginning of the partition to the correct "sector" be the right thing to do or do I have to recreate the whole partition (and/or table)?


    Right, english is better:
    Code:
     ~ % sudo LC_ALL=C fdisk -u -l /dev/sda
    
    Disk /dev/sda: 240.1 GB, 240057409536 bytes
    64 heads, 32 sectors/track, 228936 cylinders, total 468862128 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x1d172924
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048   419432447   209715200   83  Linux
    
    
     % sudo LC_ALL=C parted --list
    Model: ATA SanDisk SDSSDX24 (scsi)
    Disk /dev/sda: 240GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    Disk Flags: 
    
    Number  Start   End    Size   Type     File system  Flags
     1      1049kB  215GB  215GB  primary  ext4         boot
    I have read that 64 heads and 32 sectors align to 1 MiB EBS blocks (64 * 32 * 512 = 1048576 byte = 1 MiB) so I tried that. I did this because the original default alignment of util linux fdisk 2.20 seemed to be wrong but it's more probable I only thought it was wrong when it was in fact correct.

    Hopefully 1049kB (not 2049) is actually 512 kbyte * 2.

    But it doesn't matter that much since I don't have too much bandwidth on this notebook anyway (will get replaced in the not so far future):
    Code:
     % sudo LC_ALL=C hdparm -t /dev/sda
    
    /dev/sda:
     Timing buffered disk reads: 776 MB in  3.00 seconds = 258.59 MB/sec

  10. #20
    Join Date
    Mar 2008
    Location
    Eire
    Posts
    58

    Default

    Quote Originally Posted by cyring View Post
    Bellow, some of my readings

    http://en.wikipedia.org/wiki/Noop_scheduler

    http://grzen.blogspot.fr/2009/05/ssd...-linux_18.html

    http://ubuntuforums.org/showthread.php?t=1178209

    According to Wikipedia :
    • " NOOP scheduler is best used with solid state devices such as flash memory or in general with devices that do not depend on mechanical movement ... "
    • Deadline: " The kernel documentation suggest this is the preferred scheduler for database systems ... "


    In Kernel doc /usr/src/linux/Documentation/block/cfq-iosched.txt says :
    " That means by default we idle on queues/service trees. This can be very helpful on highly seeky media like single spindle SATA/SAS disks ... "


    I'm looking for a way to specify the kernel which respective scheduler to use with SSD & HDD, using boot command such as : elevator-DEVICE=<scheduler> rather than dealing with /sys/block/DEVICE/queue/scheduler (which happens after boot, ie. rc.local)
    TYVM for the links, I didn't really come across anything sugesting that deadline or noop would result in less writes, and the reason I'm so curious is because I've seen suggestions that noop can actually increase the number of writes, because it doesn't delay writes to "group" them like deadline and especially cfq, meaning more smaller writes, possibly being less efficient on SSDs with relatively large write block sizes.

    Don't have any links for this though, but it does kind of make sense to me...

    Also, somewhat off topic, but I'm adding an SSD to my desktop and considering putting the journal for the SSD's ext4 filesystem on a partition at the very start of a hard disk in the system, should reduce writes somewhat, with hopefully not much of a performance impact, any thoughts?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •