ramfs maxsize limit
I'd like to create a little FS in ram. Just to use there a little SQLite3 database.
I know ramfs size grows dynamically, so I tried this "maxsize" option and I got no error: Code:
# mount -t ramfs -o size=128k,maxsize=256k ramfs ./ramfs/ I know tmpfs can use limit (doesn't grow dynamically) but as fas as I know tmpfs uses swap space, and what I want to do is avoiding use of hard disk, so ramfs is the one which best fits my needs. Does anybody know if a limit can be set to ramfs filesystem? I didn't find very much documentation. Thanks in advance. |
Quote:
|
Nope.
Have a read of this. |
Thanks for your advices folks.
I wouldn't like disabling swap space. Thanks for the documentation! After reading the document I just have a doubt I couldn't find the answer: tmpfs by default uses swap space? Or first it uses RAM and in case of necessity swap? Regards, Matías |
tmpfs uses kernel cache (RAM).
Unless you are under heavy memory pressure, it is (extremely) unusual to see it swap. I haven't used anything else for years where tmpfs is an option. |
Cool SygOO. Then tmpfs is definitely my choice!
Thanks a lot for the info. |
Quote:
but if the OP doesn't want to disable swap, then that doesn't matter. however, the OP does not mention why he wishes not to swap. if it is for security reasons, then encrypting swap is always another layer of protection. also, as to the original question: I believe there is work going on to patch the kernel to support the use of user quotas (like disk space usage) on tmpfs, but it is not a clean solution (yet). |
All times are GMT -5. The time now is 06:40 PM. |