|
|
@@ -154,38 +154,38 @@ ldbm_back_start( Slapi_PBlock *pb )
|
|
|
int zone_pages, db_pages, entry_pages, import_pages;
|
|
|
Object *inst_obj;
|
|
|
ldbm_instance *inst;
|
|
|
- size_t cache_size;
|
|
|
- size_t db_size;
|
|
|
- size_t total_cache_size = 0;
|
|
|
- size_t memsize = pages * pagesize;
|
|
|
- size_t extra = 0; /* e.g., dncache size */
|
|
|
+ PRUint64 cache_size;
|
|
|
+ PRUint64 db_size;
|
|
|
+ PRUint64 total_cache_size = 0;
|
|
|
+ PRUint64 memsize = pages * pagesize;
|
|
|
+ PRUint64 extra = 0; /* e.g., dncache size */
|
|
|
|
|
|
for (inst_obj = objset_first_obj(li->li_instance_set); inst_obj;
|
|
|
inst_obj = objset_next_obj(li->li_instance_set, inst_obj)) {
|
|
|
inst = (ldbm_instance *)object_get_data(inst_obj);
|
|
|
- cache_size = cache_get_max_size(&(inst->inst_cache));
|
|
|
+ cache_size = (PRUint64)cache_get_max_size(&(inst->inst_cache));
|
|
|
db_size = dblayer_get_id2entry_size(inst);
|
|
|
if (cache_size < db_size) {
|
|
|
LDAPDebug(LDAP_DEBUG_ANY,
|
|
|
- "WARNING: %s: entry cache size %luB is "
|
|
|
- "less than db size %luB; "
|
|
|
+ "WARNING: %s: entry cache size %" NSPRIu64 "B is "
|
|
|
+ "less than db size %" NSPRIu64 "B; "
|
|
|
"We recommend to increase the entry cache size "
|
|
|
"nsslapd-cachememsize.\n",
|
|
|
inst->inst_name, cache_size, db_size);
|
|
|
} else {
|
|
|
LDAPDebug(LDAP_DEBUG_BACKLDBM,
|
|
|
- "%s: entry cache size: %luB; db size: %luB\n",
|
|
|
+ "%s: entry cache size: %" NSPRIu64 "B; db size: %" NSPRIu64 "B\n",
|
|
|
inst->inst_name, cache_size, db_size);
|
|
|
}
|
|
|
total_cache_size += cache_size;
|
|
|
/* estimated overhead: dncache size * 2 */
|
|
|
- extra += cache_get_max_size(&(inst->inst_dncache)) * 2;
|
|
|
+ extra += (PRUint64)cache_get_max_size(&(inst->inst_dncache)) * 2;
|
|
|
}
|
|
|
LDAPDebug(LDAP_DEBUG_BACKLDBM,
|
|
|
- "Total entry cache size: %luB; "
|
|
|
- "dbcache size: %luB; "
|
|
|
- "available memory size: %luB\n",
|
|
|
- total_cache_size, li->li_dbcachesize, memsize - extra);
|
|
|
+ "Total entry cache size: %" NSPRIu64 "B; "
|
|
|
+ "dbcache size: %" NSPRIu64 "B; "
|
|
|
+ "available memory size: %" NSPRIu64 "B\n",
|
|
|
+ total_cache_size, (PRUint32)li->li_dbcachesize, memsize - extra);
|
|
|
/* autosizing dbCache and entryCache */
|
|
|
if (li->li_cache_autosize > 0) {
|
|
|
zone_pages = (li->li_cache_autosize * pages) / 100;
|