This may seem like a no-brainer to some... -
11-21-2005
, 07:29 AM
But I'm astounded at the performance difference I achieved just by
utilizing DB->set_cachesize(). I was attempting to construct a test
database w/ small keys (less than 64 bytes) and data sizes of varying
24-100 bytes or so w/ about 4 million entries (BTREE + DUP + DUPSORT)
and was dumbfounded as to why the process was utilizing 1-5% CPU with
most of it's time spent in uninterruptible sleep.
The second I upped the cache size to 32 megs (from it's default 256k)
the process spent much more useful time actually constructing the
database rather than spinning my disks wheels.
For other BDB novices (like myself) it can be a very useful, but still
overlooked, avenue to explore when trying to profile why things are
taking so long. |