huge init footprint
Bernardo Innocenti
bernie at codewiz.org
Tue Jan 29 05:20:24 EST 2008
James Cameron wrote:
> I'm at a conference where anyone with an XO gets urgently questioned
> about their version management, so I've not got one with me right
> now ... what does lsof(1) say this init process has open, and what
> does /proc/1/stat* say about the memory cost?
It has no open files, but /proc/1/maps reveals that we're
keeping much of the initrd still mapped into memory. And
without swap, it's not going to be paged out.
> I do recall there was a really good reason why our init
> is in Python ... activation and so forth. Does it
> deserve recoding just to save 5Mb?
Maybe we can save these 5MB by just refactoring it a bit.
For example, the python part could be run only in the
activation case. This would also reduce boot time by some
extent.
Alternatively, we could exec() the regular init from the
OS as the last thing. C.Scott may have some better ideas.
I filed #6246 so we don't forget.
BTW: a similar issue is that olpc-hardware-manager costs
about 4MB. All it does is being a dbus service for writing
a few sysfs files. It could be rewritten in C very quickly
and even folded into ohm.
So far, reducing the number of Python processes seems to be
the easiest way to free up some memory for the activities
and reduce startup time.
--
\___/
|___| Bernardo Innocenti - http://www.codewiz.org/
\___\ One Laptop Per Child - http://www.laptop.org/
More information about the Devel
mailing list