Re: GUADEC Hacking
- From: Jamie McCracken <jamiemcc blueyonder co uk>
- To: Matthias Clasen <mclasen redhat com>
- Cc: Nat Friedman <nat novell com>, Glynn Foster Sun COM, desktop-devel-list gnome org
- Subject: Re: GUADEC Hacking
- Date: Mon, 11 Apr 2005 19:13:55 +0100
Matthias Clasen wrote:
On Mon, 2005-04-11 at 18:21 +0100, Jamie McCracken wrote:
The culprit is pretty obviously GConf which is why I'm glad DConf is
considering having a DB backend to address this. The short term fixes
which Havoc has already suggested (moving the schema crap sideways and
possibly mmap'ing some things) should cut some of that down but only a
properly indexed database will give you both speed and memory efficiency
(mmap'ing stuff is obviously wasteful memory wise).
mmapping normally saves memory, since you can share the map between all
apps, and only actually needed pages are in ram. The only thing wasted
by a big mmap cache is address space, which is cheap.
Not really comparable to a DB which is designed for the cases where you
need good random access performance but cant afford to bung it all in
memory.
EG if you have a million records in GConf you will end up with a pretty
large mutli megagbyte chunk of memory being allocated.
With a DB, random access to indexed keys is really quick and for most
DBs you can tell it how much memory to use to cache the pages. The
result is the most frequently used keys end up in the cache rather than
all the keys if you mmap. The performance difference between the two is
mostly neglible (assuming you will get a 90% cache hit ratio on your DB
which should be possible if you allocate the right amount of cache)
jamie.
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]