I''ve got a system running Debian kernel 3.2.0-4-amd64 with root on a SSD that identifies itself as "INTEL SSDSC2CT12 300i" (it''s an Intel 120G device). Here is the /proc/mounts entry which shows that ssd and discard options are enabled. /dev/disk/by-uuid/7939c405-c656-4e85-a6a0-29f17be09585 / btrfs rw,seclabel,nodev,noatime,ssd,discard,space_cache 0 0 Here is the "expert mode" output of fdisk which shows that /dev/sda3 (the root filesystem) is aligned to a multiple of 4096 sectors (surely 2MB is larger than the erase block size although a quick Google search didn''t turn up the number for that device). Disk /dev/sda: 255 heads, 63 sectors, 14593 cylinders Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID 1 80 32 33 0 53 55 62 2048 997376 83 2 00 53 56 62 211 28 183 999424 1953792 82 3 00 211 29 183 254 63 1023 2953216 231487488 83 4 00 0 0 0 0 0 0 0 0 00 But I''m seeing very poor write performance, the system will block on disk IO when iostat is reporting a few hundred KB/s in writes. Below is some output of "iostat -x 10": Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util sda 0.00 0.00 0.00 100.00 0.00 50.00 1.00 1.00 10.00 0.00 10.00 10.00 100.00 avg-cpu: %user %nice %system %iowait %steal %idle 27.04 0.00 3.10 0.00 0.00 69.86 Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util sda 0.00 0.80 0.00 107.70 0.00 116.75 2.17 1.04 9.66 0.00 9.66 9.28 99.96 avg-cpu: %user %nice %system %iowait %steal %idle 18.31 0.00 1.82 0.00 0.00 79.87 Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util sda 0.00 0.00 0.00 100.80 0.00 55.60 1.10 1.00 9.95 0.00 9.95 9.92 100.00 Any suggestions for how to debug or improve things? -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/ -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sat, Dec 15, 2012 at 5:23 PM, Russell Coker <russell+btrfs@coker.com.au> wrote:> I''ve got a system running Debian kernel 3.2.0-4-amd64 with root on a SSD that > identifies itself as "INTEL SSDSC2CT12 300i" (it''s an Intel 120G device).3.2 is massively old in btrfs terms, with lots of fun little stability and performance bugs.> Here is the /proc/mounts entry which shows that ssd and discard options are > enabled. > > /dev/disk/by-uuid/7939c405-c656-4e85-a6a0-29f17be09585 / btrfs > rw,seclabel,nodev,noatime,ssd,discard,space_cache 0 0Don''t use discard; it''s a non-queuing command, which means your performance will suck unless your device is _really_ terrible at garbage collection (in which case, it''s just the lesser of two evils). -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Russell Coker
2012-Dec-16 11:32 UTC
Re: Intel 120G SSD write performance with 3.2.0-4-amd64
On Sun, 16 Dec 2012, cwillu <cwillu@cwillu.com> wrote:> 3.2 is massively old in btrfs terms, with lots of fun little stability > and performance bugs. > > > Here is the /proc/mounts entry which shows that ssd and discard options > > are enabled. > > > > /dev/disk/by-uuid/7939c405-c656-4e85-a6a0-29f17be09585 / btrfs > > rw,seclabel,nodev,noatime,ssd,discard,space_cache 0 0 > > Don''t use discard; it''s a non-queuing command, which means your > performance will suck unless your device is really terrible at > garbage collection (in which case, it''s just the lesser of two evils).Thanks for the advice. On one of my systems a reinstall of the linux- image-3.6-trunk-amd64 package went from almost 4 minutes to only 29 seconds when I removed the discard option. When I then booted the 3.6.9 kernel in question the package install time dropped to 27 seconds (of which more than half was CPU time). I only did one test run of each, so 27s vs 29s could be within the range of random variation but 4 minutes vs <30s is an obvious and massive improvement. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/ -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html