LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Limiting RAMFS usage (https://www.linuxquestions.org/questions/debian-26/limiting-ramfs-usage-623051/)

sathiyamoorthy 02-22-2008 09:20 AM

Limiting RAMFS usage
 
I created a RAMFS of size 5 MB, and started filling data into that.

When it exceeds 5 MB there is no alert / error.

It is going up to the size of RAM available. So it makes the system to hang.

How to identify when the RAMFS got filled ?? I want to stop writing when the RAMFS got filled.

johnsfine 02-23-2008 06:47 PM

I was curious myself and surprised I have no documentation of ramfs anywhere that I can find on my own Linux system, so I tried google and the first hit was

http://www.mjmwired.net/kernel/Docum...-initramfs.txt

which explains it very well, including the answer to your question and alternatives. I think the file
Documentation/filesystems/ramfs-rootfs-initramfs.txt
containing that explanation is a common Linux file (not something special to that website). I just don't happen to have a copy on my system.

Edit, now there is a copy of it on my system. The file is actually
ramfs-rootfs-initramfs.txt.gz
and it landed in the directory
/usr/share/doc/linux-doc-2.6.22/Documentation/filesystems
when I installed the package linux-doc-2.6.22

But for your purposes, I think all that file tells you is to use tmpfs instead. See tmpfs.txt.gz in the same directory.

sathiyamoorthy 02-25-2008 03:16 AM

thanks and tmpfs info
 
hi john,

A very great thanks for you.

I searched this for a long time, but unable to find.

With the documentation URL you had given i seen the solution, and experimented, and now am able to create SIZE limited tmpfs.

I gone through the another URL from the URL you gave

TMPFS
http://www.mjmwired.net/kernel/Docum...tems/tmpfs.txt

i came to know RAMFS will dynamically grow, TMPFS is fixed size.

THANKS....

sathiyamoorthy 04-02-2009 09:04 AM

Hi,

Finally i wrote out an article about the tmpfs & ramfs which is available [MODERATED]

unSpawn 04-03-2009 01:28 AM

Sathiyamoorthy, please do not post in threads older than say 4 to 6 months. If you feel the information you provide is unique and therefore should be known, please create your own thread in the same forum and add a link to the original thread. As you might have noticed by now also most of your traffic-driving links have been removed. LQ is provided to you for free and you will not abuse it for advertising in any form, not even to drive traffic to your own web log.

Thread and case closed.


All times are GMT -5. The time now is 07:06 AM.