June 2001
Intermediate to advanced
688 pages
19h 18m
English
#include <db.h> int DBENV→set_mp_mmapsize(DB_ENV *dbenv, size_t mp_mmapsize);
Files that are opened read-only in the pool (and that satisfy a few other criteria) are, by default, mapped into the process address space instead of being copied into the local cache.
This can result in better-than-usual performance because available virtual memory is normally much larger than the local cache, and page faults are faster than page copying on many systems. However, it can cause resource starvation in the presence of limited virtual memory, and it can result in immense process sizes in the presence of large databases.
Set the maximum file size, in bytes, for a file to be mapped into the process address space. If no ...