Re: [Evolution-hackers] mmaping addressbook database

There is actually, i saw your question on irc but i couldn't remember why ...

If you don't specify DB_PRIVATE then it causes libdb to setup the database for multiple-process access.  This is much more complex/slower/uses more resources than a private database.

Specify that the environment will only be accessed by a single process (although that process may be multithreaded). This flag has two effects on the Berkeley DB environment. First, all underlying data structures are allocated from per-process memory instead of from shared memory that is potentially accessible to more than a single process. Second, mutexes are only configured to work between threads.

On Fri, 2005-05-13 at 11:11 +0100, Ross Burton wrote:

Whilst investigating the memory usage of the addressbook I noticed that
libdb is using malloc() to store pages from the database.  This is
caused by use of the DB_PRIVATE flag to the env->open call.  Removing
this flag causes libdb to mmap the database into memory.

Personally I can't see a problem with removing the DB_PRIVATE flag, but
I'm not exactly a libdb expert.  Is there a good reason not to remove
this flag?


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