All IO uncached when caching a partition #43
Comments
I think the alignment is the issue. Because the start is misaligned, off a 4K If you look at the IO histogram reported by dmsetup table, you can see the sizes Can you try and force the alignment of sdb1 at a 4K boundary and retest ? From: cachemonger To: Mohan Srinivasan mohan_srinivasan@yahoo.com Hi, I am trying to use flashcache to cache a partition (/dev/sdb1) using an SSD I see IO going through the flashcache driver when I watch the stats in Everything works fine if I use the underlying /dev/sdb device instead (no The only thing I can think of is that sdb1 starts on the 63rd sector of sdb, and Thanks! Reply to this email directly or view it on GitHub: |
Hi Mohans, I'm not sure what you're asking. Do you want me to move the partition? |
Can you paste the output of 'dmsetup table' ? If you see sub-4K IOs coming in, From: cachemonger To: Mohan Srinivasan mohan_srinivasan@yahoo.com Hi Mohans, I'm not sure what you're asking. Do you want me to move the partition? Reply to this email directly or view it on GitHub: |
Hi all, # dmsetup table
fc-md: 0 2147481328 flashcache conf:
ssd dev (/dev/sda), disk dev (/dev/disk/by-uuid/a6e4f3d2-12d1-41ae-b2f4-2f6782dab2c8) cache mode(WRITE_BACK)
capacity(112640M), associativity(512), data block size(2048K) metadata block size(4096b)
skip sequential thresh(0K)
total blocks(56320), cached blocks(0), cache percent(0)
dirty blocks(0), dirty percent(0)
nr_queued(0)
Size Hist: 1024:1 4096:210445 8192:2165 12288:518 16384:2102
# cat /proc/flashcache/flashcache_version
Flashcache Version : flashcache-1.0
git commit: 1.0-139-g46eb0a330bcd
# dmsetup status
fc-md: 0 2147481328 flashcache stats:
reads(34015), writes(169867)
read hits(0), read hit percent(0)
write hits(0) write hit percent(0)
dirty write hits(0) dirty write hit percent(0)
replacement(0), write replacement(0)
write invalidates(0), read invalidates(0)
pending enqueues(0), pending inval(0)
metadata dirties(0), metadata cleans(0)
metadata batch(0) metadata ssd writes(0)
cleanings(0) fallow cleanings(0)
no room(0) front merge(0) back merge(0)
disk reads(34022), disk writes(169893) ssd reads(0) ssd writes(0)
uncached reads(34022), uncached writes(169893), uncached IO requeue(0)
uncached sequential reads(0), uncached sequential writes(0)
pid_adds(0), pid_dels(0), pid_drops(0) pid_expiry(0) |
Why have you configured flashcache with a 2048K blocksize ?
A 2MB blocksize, according to dmsetup status. This will certainly lead to all Can you configure flashcache with the default 4KB block size ? From: Mikhail Sayapin To: Mohan Srinivasan mohan_srinivasan@yahoo.com Hi all, # dmsetup table
fc-md: 0 2147481328 flashcache conf:
ssd dev (/dev/sda), disk dev
(/dev/disk/by-uuid/a6e4f3d2-12d1-41ae-b2f4-2f6782dab2c8) cache mode(WRITE_BACK)
capacity(112640M), associativity(512), data block size(2048K) metadata
block size(4096b)
skip sequential thresh(0K)
total blocks(56320), cached blocks(0), cache percent(0)
dirty blocks(0), dirty percent(0)
nr_queued(0)
Size Hist: 1024:1 4096:210445 8192:2165 12288:518 16384:2102
# cat /proc/flashcache/flashcache_version
Flashcache Version : flashcache-1.0
git commit: 1.0-139-g46eb0a330bcd
# dmsetup status
fc-md: 0 2147481328 flashcache stats:
reads(34015), writes(169867)
read hits(0), read hit percent(0)
write hits(0) write hit percent(0)
dirty write hits(0) dirty write hit percent(0)
replacement(0), write replacement(0)
write invalidates(0), read invalidates(0)
pending enqueues(0), pending inval(0)
metadata dirties(0), metadata cleans(0)
metadata batch(0) metadata ssd writes(0)
cleanings(0) fallow cleanings(0)
no room(0) front merge(0) back merge(0)
disk reads(34022), disk writes(169893) ssd reads(0) ssd writes(0)
uncached reads(34022), uncached writes(169893), uncached IO requeue(0)
uncached sequential reads(0), uncached sequential writes(0)
pid_adds(0), pid_dels(0), pid_drops(0) pid_expiry(0) Reply to this email directly or view it on GitHub: |
Hello, |
Hmm may be a parsing bug in the utility. Need to fix it. Sent from my iPhone On Mar 12, 2012, at 9:20 PM, Mikhail Sayapin reply@reply.github.com wrote:
|
It worked. So, when creating device with |
Hi,
I am trying to use flashcache to cache a partition (/dev/sdb1) using an SSD (/dev/sdd). Creating the cache works just fine, and I mount the new /dev/mapper/flashcache device in place of the original partition (instead of "mount /dev/sdb1 /mnt/target" I use "mount /dev/mapper/flashcache /mnt/target").
I see IO going through the flashcache driver when I watch the stats in /proc/flashcache/../flashcache_stats, but everything is listed as "uncached". I've double checked that I have cache_all enabled, and it is not set to filter sequential IO.
Everything works fine if I use the underlying /dev/sdb device instead (no partitions; create ext4 filesystem on /dev/sdb). If I do this, I see that IO is being cached.
The only thing I can think of is that sdb1 starts on the 63rd sector of sdb, and this is not 4K-aligned. Is this an unsupported configuration, or am I doing something else wrong?
Thanks!
The text was updated successfully, but these errors were encountered: