* Filling RAM
@ 2008-02-05 17:33 DMcLeod
2008-02-06 7:48 ` Ricard Wanderlof
0 siblings, 1 reply; 2+ messages in thread
From: DMcLeod @ 2008-02-05 17:33 UTC (permalink / raw)
To: linux-mtd, uClinux development list
Hi,
I am seeing that as files are created, their approximate size is
subtracted from the available memory. For example, assume I have /home
mounted from /dev/mtdblock2, which is a jffs2 filesystem on NOR flash.
The following procedure reproduces the problem consistently:
[code]
]# cat /proc/mounts
rootfs / rootfs rw 0 0
/proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
/dev/mtdblock2 /home jffs2 rw,sync 0 0
]# cd /home
]# grep MemFree /proc/meminfo
22588 kB
]# dd if=/dev/zero of=1M.dat bs=1M count=1
...
]# grep MemFree /proc/meminfo
21522 kB
]# rm 1M.dat
]# grep MemFree /proc/meminfo
22576 kB
[/code]
I'm fairly certain the file does get written to flash as it is
noticeably slower than creating a file of the same size in ramfs. So it
seems like the file is stored in RAM as well, how/why would this happen?
ps - XATTRS is off, JFFS2_SUMMARY is off, JFFS2_VERBOSITY = 0,
Any help is greatly appreciated.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Filling RAM
2008-02-05 17:33 Filling RAM DMcLeod
@ 2008-02-06 7:48 ` Ricard Wanderlof
0 siblings, 0 replies; 2+ messages in thread
From: Ricard Wanderlof @ 2008-02-06 7:48 UTC (permalink / raw)
To: DMcLeod; +Cc: linux-mtd, uClinux development list
On Tue, 5 Feb 2008, DMcLeod wrote:
> I am seeing that as files are created, their approximate size is
> subtracted from the available memory. For example, assume I have /home
> mounted from /dev/mtdblock2, which is a jffs2 filesystem on NOR flash.
> ...
> ]# cd /home
> ]# grep MemFree /proc/meminfo
> 22588 kB
> ...
MemFree in /proc/meminfo is not a good indicator of how much available
memory there is to the system. Linux tends to gobble up memory for file
buffers etc, freeing them on an as-needed basis. IIUC MemFree principally
indicates how much memory has never been touched, not how much is actually
available.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-06 7:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-05 17:33 Filling RAM DMcLeod
2008-02-06 7:48 ` Ricard Wanderlof
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox