I am using Ubuntu 12.04 and XFS (kernel 3.2.0-38-generic). Because XFS inode cache use too much memory, I want to limit the number of objects used to cache XFS inode.
According to the manual, I can limit the number by writing limit to /proc/slabinfo. But I cannot write to /proc/slabinfo even with superuser privileges.
$ echo "xfs_inode 1024 0 0" | sudo tee /proc/slabinfo xfs_inode 1024 0 0 tee: /proc/slabinfo: Input/output error
What is the problem? Are there any way to limit the number of object in slab cache?