I have an ubuntu linux virtual machine here and I think there is no disk cache.
For example this is the output from
total used free shared buffers cached Mem: 512 98 413 0 0 0 -/+ buffers/cache: 98 413 Swap: 0 0 0
If I create large files, read large files, read all the files in my home directory (2.2GB of files), I always see 0 for 'buffers', 'cached' and the "buffers/cache" line is always the same as the line above it.
Likewise top and htop both show no disk cache being used.
I tried to drop all the caches with:
echo 3 > /proc/sys/vm/drop_caches
and I get an error of
echo: write error: Operation not permitted (even when running as root).
So it looks like the cache is disabled, however I thought it wasn't possible to do that. Is it possible to disable the disk cache? Is there anyway to confirm if I have disk cache or not? Maybe I've just been unlucky and haven't seen any disk cache usage yet.
Note: This is a hosted VPS / virtual machine. Some things are disabled, like swap (that's right I can't swapon, the swapon system call returns EPERM). Is it possible to do that with the disk cache? Is there some way to see if that has been done?