On 2015-01-12 10:11, Patrik Lundquist wrote: > On 12 January 2015 at 15:54, Austin S Hemmelgarn wrote: >> >> Another thing to consider is that the kernel's default I/O scheduler and the default parameters for that I/O scheduler are almost always suboptimal for SSD's, and this tends to show far more with BTRFS than anything else. Personally I've found that using the CFQ I/O scheduler with the following parameters works best for a majority of SSD's: >> 1. slice_idle=0 >> 2. back_seek_penalty=1 >> 3. back_seek_max set equal to the size in sectors of the device >> 4. nr_requests and quantum set to the hardware command queue depth >> >> You can easily set these persistently for a given device with a udev rule like this: >> KERNEL=='sda', SUBSYSTEM=='block', ACTION=='add', ATTR{queue/scheduler}='cfq', ATTR{queue/iosched/back_seek_penalty}='1', ATTR{queue/iosched/back_seek_max}='', ATTR{queue/iosched/quantum}='128', ATTR{queue/iosched/slice_idle}='0', ATTR{queue/nr_requests}='128' >> >> Make sure to replace '128' in the rule with whatever the command queue depth is for the device in question (It's usually 128 or 256, occasionally more), and with the size of the device in kibibytes. >> > > So is it "size in sectors of the device" or "size of the device in > kibibytes" for back_seek_max? :-) > size in kibibytes, sorry about the confusion, I forgot to correct every instance of saying it was size in sectors after I reread the documentation.