Christian Hammers writes:

Hi

On Thu, Oct 17, 2002 at 07:34:09PM +0200, Christian Hammers wrote:
It takes me 30s to read an Inbox of 200 mails on an AMD Athlon XP 2100+
with RAID1 and almost no load. This can't be. There's almost no data
transfer via ethernet but a strange disc IO.
I found out that the reason for this is the calling of if (dbobj_store(&tmpdb, recnamebuf, strlen(recnamebuf),
rec, strlen(rec), "R"))
enomem();
free(rec);

in the function maildir_saveinfo(MSGINFO *m). Each call of this function
needs about 0.1s.
It seems to me that caching could easily be disabled - just commenting
out the function though did not work for me :)
Can anybody help me to improve this thing?
It's come to my attention that some versions of GDBM default to flushing the file descriptor after every write. Perhaps a flush is a rather expensive process on your RAID box.

The fix is trivial. Add:

int foo=FALSE;

gdbm_setopt(obj->dbf, GDBM_SYNCMODE, &foo, sizeof(foo));

to gdbmobj_open() in gdbmobj/gdbmobj.c




Reply via email to