[Date Prev][Date Next]
Re: Memory consumption when increasing BDB_IDL_LOGN
Meike Stone wrote:
how does the memory usage increase if I increase the BDB_IDL_LOGN?
I tried to discover and understand this by searching in the mailing
list (Is there is a good guide to understand all of this?).
It sounds like you've already got a good grasp of it.
After a search, each returned up ID from bdb is located in one slot in
the IDL list. On a x86_64 system, each slot is 8Byte. Each search
stack in each thread (threads in slapd.conf) gets his own IDL slots.
The default value for the threads are 16.
With 16 bit BDB_IDL_LOGN (default) on x86_64 with default threads, we
need 64k*8*16 = 1024KB memory?
If I increase the BDB_IDL_LOGN to 20 we need 512k*8*16 = 8MB?
1) Are my assumptions above correct?
2) How do I increase LDAP_PVT_THREAD_STACK_SIZE? In my tests I used
"4 * 1024 * 1024 * sizeof(void *)" and all tests where running well.
3) Are there other variables to increase before compiling?
4) Here we talk about 8MB memory, did I miss something, that is not
the problem today or are there other things I did not catch (other
caches in memory e.g. cachesize, dncachesize, idlcachesize or shared
As far as compile-time options, that's all there is to worry about.
5) What is the amount overall I have to expect for memory consumption?
I understand, that after adding and deleting entires, the IDs "sparse
out" for one index and we loose precision (if we have after search
more IDs than BDB_IDL_LOGN), because using ranges. This Problem will
increase as older the database becomes.
But if I increase the BDB_IDL_LOGN to my needed size (max expected
returned IDs from during search a indexed attibute), the problem with
"getting older" is not important for me?
Thanks a lot,
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/