Hmmm....
Mitch's mail (attached) brings up an interesting point.
When flash was small, it clearly made sense to defer GC of flash blocks
pretty much as long as possible; it reduced flash wear, and the memory
usage wasn't excessive.
However, it looks like on our system, with much larger flash but
relatively less memory, that we may want to start garbage collecting on
flash to retrieve RAM sooner.
Dave, what do you think? (and yes, we've raised getting /tmp
and /var/log off of flash to blocker priority, but we could have similar
issues with "normal" applications).
Regards,
- Jim
--
Jim Gettys
One Laptop Per Child
--- Begin Message ---
Start with a jffs2 image from build 131. Mount it under OFW, scanning
the summary and loading abbreviated versions of all the summary nodes
into memory. The data summary nodes take up about 1.4 MiB (87K data
summary nodes at 16 bytes per). (JFFS2 calls them inodes, but that name
gives the wrong idea if you think of conventional Unix inodes).
Now leave Linux running for a couple of hours or so, with the mouse
unplugged so X keeps bouncing up and down.
Shut down the system cleanly, reboot, and mount it under OFW again.
Now the data summary nodes take up 8 MB. Yes, Virginia, the data
summary area has grown by a factor of 5.7 *while the system is basically
not being used*.
Where is it all coming from?
For starters, there are 2547 junk entries in /tmp, mostly of the form:
.X0-lock
.tX0-lock
sh-thd-1149890225 (lots of different values for this number)
But that doesn't explain the data node explosion, because those /tmp
things are mostly directory entry nodes.
Another hotspot is /var/log, which contains 768 entries, nearly all
copies of
Xorg.0.log
Xorg.0.log.old
That is the directory nodes. Let's look at the data nodes for a typical
copy of Xorg.0.log. Here's one with inum=5ce2. Oh look, there are 1036
separate data nodes for that log file. I'll bet it makes a separate
node for every line that is appended. ... Yep, that's what is in the
nodes, one line per node. And there are over 200 superseded copies of
that file in /var/log
If we poke around in the summary node array we see that the last 6+ MiB
is mostly just copies of /var/log/Xorg.0.log .
--- End Message ---
_______________________________________________
Devel mailing list
[email protected]
http://mailman.laptop.org/mailman/listinfo/devel