#4399 NORM Never A: oatc (anti-theft daemon) burns RAM unnecessarily
Zarro Boogs per Child
bugtracker at laptop.org
Mon Oct 22 22:38:06 EDT 2007
#4399: oatc (anti-theft daemon) burns RAM unnecessarily
-------------------------+--------------------------------------------------
Reporter: gnu | Owner: krstic
Type: defect | Status: new
Priority: normal | Milestone: Never Assigned
Component: security | Version:
Keywords: performance | Verified: 0
-------------------------+--------------------------------------------------
The anti-theft daemon is what is left from the activation, security, and
anti-theft code that runs in a RAMdisk when the kernel first boots. It
runs as PID 1 in a running XO. Examining /proc/1/smaps reveals that it
occupies roughly 5MB (either as pageable RAM, and/or as ramdisk contents
that can't be deleted because they are in use).
Since RAM is precious and can't be swapped or otherwise reclaimed, this is
a pretty serious performance problem. Jim Gettys suggests two obvious
improvements:
(1) When anti-theft is not in use, exec something tiny instead of this
(perhaps /etc/init, I gamely suggest).
(2) 5 megs is huge for a process that sits idle most of the time and
talks on the net a little bit and bricks the machine when told to.
Rewrite that little piece in C?
I also suggest:
(3) The python executable and libraries in pid 1 are not sharing physical
RAM with the other python executables currently running, because they are
remnants left from the initial RAMdisk, rather than files from the normal
root filesystem. Probably large parts of the heap can also be discarded
by exec-ing a new python interpreter with just the antitheft script, after
the rest of the ramdisk has run.
--
Ticket URL: <https://dev.laptop.org/ticket/4399>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list