#2030 NORM Trial-3: Activity wedge memory footprint representation
Zarro Boogs per Child
bugtracker at laptop.org
Tue Aug 21 10:55:41 EDT 2007
#2030: Activity wedge memory footprint representation
---------------------+------------------------------------------------------
Reporter: Eben | Owner: marco
Type: defect | Status: reopened
Priority: normal | Milestone: Trial-3
Component: sugar | Version:
Resolution: | Keywords:
Verified: 0 |
---------------------+------------------------------------------------------
Comment (by danw):
Replying to [comment:21 Eben]:
> I've just tried this out in the latest build, and it doesn't appear to
be representing things accurately. It appears as though it's using some
kind of relative scale, because the size of each wedge decreases by a
significant amount every time a new activity is opened.
Hm... OK, it's not *intentionally* relative, but yeah. The problem is:
1. The ring doesn't represent "all RAM", it represents "all RAM that is
either free, or used by an activity". (ie, RAM used by non-Activity
processes doesn't show up *anywhere*, so we can't just say that the ring
represents 256M of RAM).
2. We're consistently overestimating the amount of RAM used by
activities.
Since we don't know a priori how much RAM the whole ring represents, we
have to calculate it as being the sum of all RAM used by activities, plus
the amount of free RAM. But since we're overestimating the RAM used by
activities, that means each time you start a new activity, the estimate of
total RAM ends up increasing, meaning the percentage of the ring used by
each activity decreases.
I think we can fix the overestimate by reading the detailed memory map
(/proc/PID/smaps) for each process, and adding up only the private
mappings, plus a percentage of any shared mappings (depending on how many
activities they were shared between). And anything that was mapped by the
sugar shell wouldn't count at all against any activity, because it would
be in use whether or not the activities were using it.
--
Ticket URL: <http://dev.laptop.org/ticket/2030#comment:22>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list