Gentoo Archives: gentoo-amd64

From: Enrico Weigelt <weigelt@×××××.de>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: Memory usage; 32 bit vs 64 bit.
Date: Thu, 06 Jan 2011 23:14:55
Message-Id: 20110106222845.GC13292@nibiru.local
In Reply to: Re: [gentoo-amd64] Re: Memory usage; 32 bit vs 64 bit. by Volker Armin Hemmann
* Volker Armin Hemmann <volkerarmin@××××××××××.com> wrote:

> > Is there anything userland apps could do to improve it ? > > eg. memory pools based on usage patterns ? > > sure, they can try to mlock themselves. But that is a nother bucket of > worms...
Wouldn't that defeat the purpose of swapping ? I was thinking about something different: trying to design applications in a more swap-friendly way, eg. keeping data thats used together in a relatively closed set of pages. Or separate heavily used data from seldomly used ones. For example, an web browser could use an own pool per window. If some window is minimized, it shouldn't have to be repainted (in theory ;-)), and everything belonging to it could potentially be swapped out together, while other (active) windows dont need data from these pages. OTOH closing an window would free the whole pool - if it's an anonymous mmap()ed region, the kernel could simply throw the pages away. cu -- ---------------------------------------------------------------------- Enrico Weigelt, metux IT service -- phone: +49 36207 519931 email: weigelt@×××××.de mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 ---------------------------------------------------------------------- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme ----------------------------------------------------------------------