I'm wondering if there is any way to specify the size of RAM cache used to store ramfs
, tmpfs
?
When I look at /proc/
, I can't find anything about ramfs
size.
linuxmemorytmpfs
I'm wondering if there is any way to specify the size of RAM cache used to store ramfs
, tmpfs
?
When I look at /proc/
, I can't find anything about ramfs
size.
Best Answer
From http://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt:
So simply use
df
ordu
(you can also use them for ramfs):so 1136 KB is in use.
so 1416 KB is in use.
Thats's interesting...
df
anddu
report different sizes. What is happening here and which one is right?/run
has a subfolder called/run/shm
, which is itself a separate tmpfs filesytem (although shown asnone
):Adding both amounts you get the size reported by
du
:So the whole story is that 2 tmpfs filesystems use 1416 KB.
(Here's another reason why
du
anddf
outputs may differ.)