It's nice to see, that this topic has still a scientific relevance. Unfortunately most of the results don't find the way to us :/
The paper about the "Selective Timeout Bundling" scheduler for example was very exciting to me.
Seungyup Kang, Hyunchan Park, Chuck Yoo, "Performance Enhancements of I/O Schedulers for Solid State Drive", 2011 IEEE International Conference on Consumer Electronics (ICCE), Jan. 2011.(PDF)
I'm using now the deadline I/O scheduler for my Samsung 830 SSD.
Announcement
Collapse
No announcement yet.
Linux I/O Scheduler Comparison On The Linux 3.4 Desktop
Collapse
X
-
Re: Responsiveness
Originally posted by talvik View PostFor years I've had problems using the desktop while a intensive IO operation is running. Even when simply transferring file to pendrive.
https://bugzilla.kernel.org/show_bug.cgi?id=12309
I don't think we will see anything like it on Phoronix, but framejitter and uneven load is fairly important issues.
Leave a comment:
-
Originally posted by ChrisXY View PostI don't really know, but I have read this:
Beside package management, I don't do so much writings on the SSD, throwing much of them on a ram fs. I also keep around 18% of unused space for wear leveling.
I have followed ArchLinux's template for SSD benchmarking and here are my published results, selecting noop as an I/O scheduler.
Leave a comment:
-
I don't really know, but I have read this:
Originally posted by https://wiki.archlinux.org/index.php/SSD#SSD_Memory_Cell_ClearingOn occasion, users may wish to completely reset an SSD's cells to the same virgin state they were at the time he/she installed the device thus restoring it to its factory default write performance. Write performance is known to degrade over time even on SSDs with native TRIM support. TRIM only safeguards against file deletes, not replacements such as an incremental save.
Leave a comment:
-
Originally posted by ChrisXY View PostOk, thanks. I'll leave it this way until I can at least test with SATA3.
And sorry for hijacking the article thread.
Your benchmarks seem so random. It seems to be coincidence what data it writes fast and what it writes slow. Was your SSD used much before these benchmarks and have you tried a "factory reset" (however unhealthy it may be)?
I wonder if the fstrim command is enough to keep it in a good state ?
Whenever I enter this it replies immediately with a
Code:$ sudo fstrim -v / /: 17685495808 bytes were trimmed
Leave a comment:
-
Originally posted by cyring View PostYour alignment sounds OK
And sorry for hijacking the article thread.
Your benchmarks seem so random. It seems to be coincidence what data it writes fast and what it writes slow. Was your SSD used much before these benchmarks and have you tried a "factory reset" (however unhealthy it may be)?
Leave a comment:
-
Originally posted by ChrisXY View PostThat output doesn't really match up. Fdisk says my sector size is 512 byte and the partition 1 begins at sector 2048. And 512 * 2048 / (1024*1024) = 1.
How does parted think that this is at 1049 kB? And why does it still think it is optimally aligned?
Code:% sudo parted /dev/sda align-check opt 1 1 aligned
Code:$ sudo parted --list Model: ATA CORSAIR CMFSSD-6 (scsi) Disk /dev/sdb: 64.0GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 [COLOR="#FF0000"]1049kB[/COLOR] 25.8GB 25.8GB primary ntfs 2 25.8GB 52.2GB 26.4GB primary ext4 boot
I mainly use fdisk and don't bother with parted.
Your alignment sounds OK
Leave a comment:
-
hdparm -I should give you more detail information.
for instance , mine (sdb) which is a Corsair 64GB SSD with a Samsung firmware, outputs the following :
Code:$ sudo hdparm -I /dev/sdb /dev/sdb: ATA device, with non-removable media Model Number: CORSAIR CMFSSD-64GBG2D ... Firmware Revision: VBM19C1Q Standards: Used: ATA/ATAPI-7 T13 1532D revision 1 Supported: 7 6 5 4 Configuration: Logical max current cylinders 16383 16383 heads 16 16 sectors/track 63 63 -- CHS current addressable sectors: 16514064 LBA user addressable sectors: 125045424 LBA48 user addressable sectors: 125045424 [COLOR="#0000FF"]Logical/Physical Sector size: 512 bytes[/COLOR] device size with M = 1024*1024: 61057 MBytes device size with M = 1000*1000: 64023 MBytes (64 GB) cache/buffer size = unknown Nominal Media Rotation Rate: [COLOR="#0000FF"]Solid State Device[/COLOR] ...
Using fdisk -l /dev/sdb gives the same. May come from the same source that hdparm.
Code:$ sudo fdisk -l /dev/sdb Disk /dev/sdb: 64.0 GB, 64023257088 bytes 255 heads, 63 sectors/track, 7783 cylinders, total 125045424 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/[COLOR="#0000FF"]physical[/COLOR]): 512 bytes / [COLOR="#0000FF"]512[/COLOR] bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x1687aa3a Device Boot Start End Blocks Id System /dev/sdb1 [COLOR="#008000"]2048[/COLOR] 50333695 25165824 7 HPFS/NTFS/exFAT /dev/sdb2 * [COLOR="#008000"]50333696[/COLOR] 101963775 25815040 83 [COLOR="#0000FF"]Linux[/COLOR] $ sudo fdisk -l /dev/sda Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0xca100020 Device Boot Start End Blocks Id System /dev/sda1 2048 100665343 50331648 7 HPFS/NTFS/exFAT /dev/sda2 100665344 257039999 78187328 83 Linux /dev/sda3 257040000 1953525167 848242584 5 Extended /dev/sda5 257040063 484681049 113820493+ 83 Linux /dev/sda6 484681113 1953525167 734422027+ 83 Linux $ df -h Filesystem Size Used Avail Use% Mounted on [COLOR="#0000FF"]rootfs 25G 8.1G 16G 35% /[/COLOR] /dev 3.0G 0 3.0G 0% /dev run 3.0G 316K 3.0G 1% /run /dev/sdb2 25G 8.1G 16G 35% / shm 3.0G 76K 3.0G 1% /dev/shm tmpfs 2.0G 105M 1.9G 6% /tmp tmpfs 64M 412K 64M 1% /var/log /dev/sda2 75G 45G 27G 63% /vm /dev/sda5 109G 71G 33G 69% /users /dev/sda6 700G 441G 225G 67% /data tmpfs 1.0G 1.1M 1023M 1% /home/cyril/tmp
Because I had doubts about Linux alignment, I did this way :- Backup my root FS with the tar command ( as show above my root FS is onto the SSD, the others on the HDD )
- Prepared all partition with Seven but without formatting them, at least for the Linux one
- Tagged the Linux part as Extended FS using fdisk
- Formatted it with mkfs.ext4 , because Ext4 seems to be the only one to offer the discard option to trim SSD
- Restored the root FS from the tar.gz backup
Btw, I'm also doing I/O Scheduler benchmark and I have eratic results with the SSD !
They change all the time whatever the scheduler is noop , deadline or cfq
Fyi, I'm simply benchmarking with the dd command
Code:dd if=/dev/zero of=./outfile bs=[I]NNNNN[/I] count=100000 oflag=noatime,direct
Code:noop = 51 MB/s [COLOR="#008000"]deadline[/COLOR] = [COLOR="#008000"]83[/COLOR] MB/s cfq = 55 MB/s
Code:fstrim -v /
Code:noop = 132 MB/s [COLOR="#008000"]deadline[/COLOR] = [COLOR="#008000"]143[/COLOR] MB/s cfq = 96 MB/s
Code:noop = 99 MB/s deadline = 79 MB/s [COLOR="#008000"]cfq[/COLOR] = [COLOR="#008000"]102[/COLOR] MB/s
Code:[COLOR="#008000"]noop[/COLOR] = [COLOR="#008000"]104[/COLOR] MB/s deadline = 94 MB/s cfq = 78 MB/s
with a bs=8192 and 'nocache' rather than 'direct' in oflag
Code:noop = 164 MB/s deadline = 153 MB/s [COLOR="#008000"]cfq[/COLOR] = [COLOR="#008000"]170[/COLOR] MB/s
while the HDD is constant with a bs=32768
Code:noop = 107 MB/s [30.5302s] deadline = 107 MB/s [30.7194s] cfq = 107 MB/s [[COLOR="#008000"]30.5122s[/COLOR]]
for now I choose noop for the SSD and cfq for the HDD
Originally posted by ChrisXY View PostThat'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
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:
-
Originally posted by ChrisXY View PostCode: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 ..... Number Start End Size Type File system Flags 1 1049kB 215GB 215GB primary ext4 boot
How does parted think that this is at 1049 kB? And why does it still think it is optimally aligned?
Code:% sudo parted /dev/sda align-check opt 1 1 aligned
Leave a comment:
-
Originally posted by cyring View PostBellow, 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)
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?
Leave a comment:
Leave a comment: