[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
2.3 back-bdb, cachesize, idlcachesize, and real memory usage
This has been asked before, but I didn't find any answers on it.
I'm trying to find a good way to predict the size of a slapd process
based on cachesize and idlcachesize. (db_stat -m already gives me
info on the DB_CONFIG part of memory usage).
I was hoping to come up with a formula based on the <average text size
of an entry in my database> * <SOMESTUFF> * <(idl)cachesize setting>=
XXX bytes.
Do I just figure out the "sizeof" the structs below?
Any tips are appreciated.
In back-bdb.h, I found this:
/* for the in-core cache of entries */
typedef struct bdb_cache {
int c_maxsize;
int c_cursize;
int c_minfree;
int c_eiused; /* EntryInfo's in use */
int c_leaves; /* EntryInfo leaf nodes */
EntryInfo c_dntree;
EntryInfo *c_eifree; /* free list */
Avlnode *c_idtree;
EntryInfo *c_lruhead; /* lru - add accessed entries here */
EntryInfo *c_lrutail; /* lru - rem lru entries from here */
ldap_pvt_thread_rdwr_t c_rwlock;
ldap_pvt_thread_mutex_t lru_head_mutex;
ldap_pvt_thread_mutex_t lru_tail_mutex;
u_int32_t c_locker; /* used by lru cleaner */
#ifdef SLAP_ZONE_ALLOC
void *c_zctx;
#endif
} Cache;
typedef struct bdb_idl_cache_entry_s {
struct berval kstr;
ldap_pvt_thread_rdwr_t idl_entry_rwlock;
ID *idl;
DB *db;
struct bdb_idl_cache_entry_s* idl_lru_prev;
struct bdb_idl_cache_entry_s* idl_lru_next;
} bdb_idl_cache_entry_t;
When I looked at an old core file with strings, I found a lot of dn's,
so I assume this was part of the cache.