Announcement

Collapse
No announcement yet.

Linux I/O Scheduler Comparison On The Linux 3.4 Desktop

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ChrisXY
    replied
    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

    Leave a comment:


  • cyring
    replied
    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

    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; 12 May 2012, 06:38 AM. Reason: Need to go back to the english courses

    Leave a comment:


  • ChrisXY
    replied
    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.

    Leave a comment:


  • cyring
    replied
    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

    Leave a comment:


  • cyring
    replied
    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 [COLOR="#0000FF"]elevator=deadline[/COLOR] nmi_watchdog=0
    initrd /boot/initramfs-linux.img

    Leave a comment:


  • Hirager
    replied
    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.

    Leave a comment:


  • cyring
    replied
    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)

    Leave a comment:


  • Mystro256
    replied
    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.

    Leave a comment:


  • Sadako
    replied
    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?

    Leave a comment:


  • cyring
    replied
    NOOP or Deadline for SSD

    I'm using elevator=deadline (previously noop) because they have less writing side effects onto the SSD

    I wrote some SSD tweaks in my blog

    Leave a comment:

Working...
X