Re: shared memory usage tool - exmap



On 04 Oct 2005 20:58:59 +0200, Soeren Sandmann <sandmann daimi au dk> wrote:
> John Berthels <jjberthels gmail com> writes:
>
> > I guess I'm saying it may be worth a second look :-)
>
> Well, it locks up my system hard (2.6.12-1.1446_FC5, ie. Fedora
> rawhide from a while back which might explain it), but if it does what
> you say it does it would certainly be a very useful tool to have.

Yikes. I'll try and reproduce, (if I can easily set up an Fedora
system) At what point did it lock? Running 'exmap.pl'? Could you try a
'make test' with the module loaded and see if you get any failures?

Did you get a kernel lock/panic or just very high system load?

There can be a short (few seconds) delay on startup, as it scans
process and pages - I don't suppose it was that? Were you running a
locally built GNOME with unstripped binaries by any chance? Its
possible that the Elf symbol loading code is still active (but not
currently displayed) and consuming a lot of CPU in that case - I'll
take a look.

> Since I haven't seen it running, this may be irrelevant, but have you
> considered the approach of having the kernel module export an
> interface that would map any given pfn to a list of all its mappings?
> This would give an overview of how the physical RAM is actually shared
> by applications, rather than showing how an individual application is
> using physical RAM. (I think both ways of looking at memory would be
> useful).

That is the sort of approach taken. All readable processes are
examined, and the pfns correlated between them.

> For a given vma it might even be possible to tell whether the page had
> actually been added to the pagetable, or whether it was in the
> mapping, but not present in the pagetable.  (I am possibly revealing
> my limited understanding of virtual memory here).
>
> Having that information would allow us to do things like quantify the
> cost of having applications still using GtkCList: if only one
> application used GtkCList, you'd see the physical GtkCList pages
> mapped into all gtk2 applications, but only present in the pagetable
> for the CList-using application. Same thing for other rarely-used
> code, of course.

That is certainly within the remit of this tool. I'm working on
displaying symbols from shared libraries which are mapped (hence the
Elf code mentioned above) I've had that working in a previous version
and hope to add it back into the newer exmap version soon, hopefully
without the excessive CPU usage.

Thanks for trying things out. I'll try and reproduce your problems and
any further information gratefully received.

regards,

jb



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]