[Y-devel] Periodic exec* to reduce memory fragmentation

T. Alexander Popiel popiel at wolfskeep.com
Thu Feb 19 21:20:49 GMT 2004


I skimmed through the mailing list archives, but didn't
see anything related to this, so here goes:

The single largest complaint that I have with X server
implementations is that over their (long) execution
lifespans, they end up severely fragmenting memory and
thus degrading performance of the entire machine that
they're running on (not to mention any applications
actually being displayed).

I was wondering if you had any plans for incorporating
the ability to periodically re-image the server process
via execl or one of its brethren, without losing state
or disconnecting clients.  In order to accomplish this,
you'd likely have to serialize any widget/client state
stored in the server, mark all your sockets for retention,
then execl(), re-read all the state info, and resume.
Going through this process would have significant benefits:
it would defragment any memory you were using (by reallocating
it all in neighboring blocks), lower the memory break known
to the OS (so that the OS can actually reclaim any memory
that was no longer being used), and generally reduce the
amount of paging needed to manipulate related objects.

Also, as a fringe benefit, you'd get the ability to load
a new server binary (with fixes, new features, whatever)
without disturbing your desktop (as long as the temporary
file format for the saved state info remained the same).

I've done this sort of thing with other long-running
server processes (PennMUSH, in particular), and it really
is a boon to usability and upgradability.  I have not yet
had a chance to poke around in the Y source, so I don't
know how easy it would be to do for this project... but
I do know that the sooner you think about this sort of
thing, the less painful it is to implement.

- Alex, putting in his two cents before jumping in headlong



More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved