I am having a problem in which casing the df results unreliable. I'm using the xfs files system on sles 11 sp3.
Basically there is a big difference (a few GBs) between the free size before and after I clear the disk cache. Anyone know why the diskcache using extra storage.
For example:
VideoEdge:/ # df
Filesystem 1K-blocks Used Available Use% Mounted on
...
/dev/sdb2 870942208 824794856 46147352 95% /mediadb
/dev/sdc1 975746564 924536548 51210016 95% /mediadb1
/dev/sdd1 975746564 153177500 822569064 16% /mediadb2
VideoEdge:/ # echo 3 > /proc/sys/vm/drop_caches
VideoEdge:/ # df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb2 870942208 822225756 48716452 95% /mediadb
/dev/sdc1 975746564 923374888 52371676 95% /mediadb1
/dev/sdd1 975746564 148323524 827423040 16% /mediadb2
VideoEdge:/ # df
Seeing from the above, there is more available space after clear the disk space.
We use the df to estimate how much space can be used and trying to remove old data when df says stporage is 95% full. Because the disk cache taking unpredictable storage space, it's causing problem.
Any one knows why the disk cache would consume storage temporately? Is there a way to calculate how much is taken by the disk cache or the maximum that may be taken by the disk cache?
We don't want to clear disk cache which may hit performace from time to time.
VideoEdge:/ # df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 8259484 5592116 2247724 72% /
udev 2021220 228 2020992 1% /dev
tmpfs 2021220 144 2021076 1% /dev/shm
/dev/sda1 8259484 5592116 2247724 72% /
/dev/sda3 463282160 75389072 387893088 17% /var
/dev/sdb1 104804356 32928 104771428 1% /var/opt/americandynamics/venvr/clipexport
/dev/sdb2 870942208 821370196 49572012 95% /mediadb
/dev/sdc1 975746564 923423496 52323068 95% /mediadb1
/dev/sdd1 975746564 148299180 827447384 16% /mediadb2
/dev/sdb2 on /mediadb type xfs (rw,noatime,nodiratime,attr2,nobarrier,inode64,allocsize=4096k,noquota)
/dev/sdc1 on /mediadb1 type xfs (rw,noatime,nodiratime,attr2,nobarrier,inode64,allocsize=4096k,noquota)
/dev/sdd1 on /mediadb2 type xfs (rw,noatime,nodiratime,attr2,nobarrier,inode64,allocsize=4096k,noquota)