facebook/flashcache — Issue #42: I/O should be concurrent, to avoid half-speed writes (enhancement request)
Author: jimav
Created: 2011-12-19 10:14:35+00:00
State: open

When a write request requires writing to both SSD and backing disk (e.g. in write-thru or write-back with a full cache),
those two writes should be executed concurrently. It -appears- that they are happening sequentially, which cuts sequential-write performance to about half the speed of the hard disk by itself.

I say the writes "appear" to be sequential because measured performance implies this, but I have not examined the code (so the slowness might be unrelated to flashcache, e.g. a hardware limitation on concurrency between SATA channels).

Here are some numbers from my system (ubuntu 11.10, kernel 3.0.0-14, Intel i7, hard drive on first SATA channel=sda, ssd on 2nd SATA channel=sdb):

Sequential writes to regular partition on hard drive: 102 MByte/sec
Sequential writes to regular partition on SSD: 228 MByte/sec
Sequential writes to write-thru cache or write-back cache when full, backed by the same hard drive: 56 MByte/sec

I was expecting sequential write thruput of a write-thru cache to approach the speed of the hard drive (102 MB/sec in the above example). Flashcache should get there if it writes to ssd & hd concurrently (hardware permitting).

P.S. To eliminate kernel caching effects, each timing test was preceded by: sync; echo 3 > /proc/sys/vm/drop_caches