Skip to contentSkip to conversation

Cachefiles question

DISCUSSION Lukas Hejtmanek 2 participants 2 messages May 8, 2009 VFS

lore
Share & tools
lore
#0 lore raw

Hello,

what is fscache newly added into mainline supposed to do?

I thought it is used as writeback cache and read cache for network file systems. But it appears that it does not do any writeback and it seems it caches only few reads.

I put whole Linux kernel sources on my NFS volume, mounted with fcs option, have cachefilesd running. I did: make defconfig, make -j4. I put my caching files into /opt/fscache:
cat /etc/cachefilesd.conf
dir /opt/fscache

however, after the build is complete:
/opt/fscache# du -sm
2 .

so it looks like only 2MB of total 572MB is cached. I'm I something missing or the fscache should not be better than this?

/opt is 491GB and uses XFS.

even after taring whole kernel sources, fscache does not consume more free space.

Signature · 1 line
Lukáš Hejtmánek
#1 lore raw
Quoted 5 lines · Lukas Hejtmanek

what is fscache newly added into mainline supposed to do?

I thought it is used as writeback cache and read cache for network file systems. But it appears that it does not do any writeback and it seems it caches only few reads.

It only caches files on NFS that are opened for reading at the moment due to coherency issues.

Quoted 3 lines

however, after the build is complete:
/opt/fscache# du -sm
2 .

Is there anything in dmesg?

And can you check /proc/fs/fscache/stats?

David