Skip to contentSkip to conversation

Read cache contents cleared on boot?

DISCUSSION Larkin Lowrey 3 participants 3 messages Nov 6, 2013 – Dec 10, 2013 bcache (block layer cache)

lore
Share & tools
lore
#0 lore raw

When I boot my cache usage returns to 1.3GB even when it was nearly full at shutdown (as reported by bcache-status). Are the read cache contents not retained across a reboot?

I'm running fedora 19 w/ kernel-3.11.6-201.fc19.x86_64 and bcache-tools built from git yesterday afternoon.

The machine in question is a backup server that boots nightly (via WOL) runs all backup jobs then shuts down. The backup process spends most of its time seeking (probably inodes) and I was hoping that the cache would be warm on boot so those random reads would come from cache.

The cache device is a 48GB LVM LV on top of a 2 disk raid1 (60GB SSDs). The backing devices are two 16 drive md raid6 arrays which act as LVM PVs.

Backup run time has not improved which supports the idea that the read cache is empty on boot.

--Larkin

#1 lore raw
Quoted 3 lines · Larkin Lowrey

When I boot my cache usage returns to 1.3GB even when it was nearly full at shutdown (as reported by bcache-status). Are the read cache contents not retained across a reboot?

Same here: After running for a while bcache-status reports a Total Cache Used of 2.1GB. After reboot it's back to 910MB all the time. Did you get an explanation for this?

#2 lore raw
Quoted 7 lines · Rolf Fokkens
Quoted 3 lines · Larkin Lowrey

When I boot my cache usage returns to 1.3GB even when it was nearly full at shutdown (as reported by bcache-status). Are the read cache contents not retained across a reboot?

Same here: After running for a while bcache-status reports a Total Cache Used of 2.1GB. After reboot it's back to 910MB all the time. Did you get an explanation for this?

I never got an explanation but I have a theory. My cache has started booting with much more total cache used reported. My theory is that garbage collection is occurring on boot and that my pre-shutdown numbers contain a lot of dirty pages. I plan to verify this, when I get a chance, by forcing a garbage collection before shutdown and comparing the post GC numbers to the post boot numbers.

--Larkin