Subject: Re: further vm adventures
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: None <jiho@postal.c-zone.net>
List: tech-kern
Date: 04/26/1998 20:03:33
On 26-Apr-98 Jason Thorpe wrote:
 
>> The X server gains 8K in its RSS across each interation.  No other programs
>> undergo any change.  The net result is that about 320K (give or take a 4K
>> page)
>
> ...I believe chuck posted an analysis of a problem like this a while ago...
>
> Basically, the problem seemed to be evil applications and the way they
> handle colors... their behavior was causing the X server to allocate
> and fragment memory...

Do you mean the 8K in the server's RSS, or the 320K unaccounted for?

Note the following in my message:

"The net result is that about 320K (give or take a 4K page) is being lost from
the free list to the active list on each iteration....I call this a leak because
the client has exited, and the memory at issue cannot be found associated with
any other program."

This is what had me suggesting a while back that perhaps shared library code
wasn't being shared.  Once Chuck put me onto ddb, which proved otherwise, I was
back without an explanation again.  Then using ddb, I was able to account for
everything in the character-mode case by taking fork/vfork into account; but the
character-mode case doesn't have THIS problem.  (And of course, the X case
still does, but I can't use ddb with the X enviornment.)

> If you kill the X server, and restart, is your memory reclaimed?

I believe most or all of it is.  But since it can't be associated with the
server (or any other program, for that matter), program allocations per se
don't seem to explain it.

Please note that, in any case, the situation with UVM might be very different.
All of this is with the old Mach vm.  So you could argue that it's a problem
for the truly bored and curious.  I've been wrestling with it so long, though,
I'd really like to close the book on it.


--Jim Howard  <jiho@mail.c-zone.net>


----------------------------------
E-Mail: jiho@mail.c-zone.net
Date: 26-Apr-98
Time: 20:03:38

This message was sent by XFMail
----------------------------------