--0-1644073040-1233052012=:88983 Content-Type: text/plain; charset=us-ascii
Howard,
Initially the search behaves normally but after some time something changes and memory starts to be consumed again until it reaches another stable condition, even very large(around 2G) and the search get stuck as before.
Once search get stuck even I stop both searches and start a new one it get stuck. So in my test I stopped my 2 searches and started a new one. Then I saw the new search with only 240 returns and then get stuck entering in the same model as before with 16 entrances in bursts in order of minutes to enter in these bursts.
As I tried to explain this appears to happen when the seconds ldapsearch, started at a later time than the first ldapsearch, reaches the dn cachesize. This is what appears to happen.
I beleive for you to reproduce you need to have a DB large enough and a slapd.conf where dn cachesize will overpass the memory boundary imposed. Then after the second ldapsearch memory boundary is reached the issue should appear.
The commands I runned were :
time ldapsearch -LLL -x -D "cn=admin,ou=INDEXES,o=alcatel,c=fr" -w secret -b "ou=INDEXES,o=alcatel,c=fr" -H ldap://10.142.15.42:389 'pnnumber=*' > /backup/temp.ldif
and
time ldapsearch -LLL -x -D "cn=admin,ou=INDEXES,o=alcatel,c=fr" -w secret -b "ou=INDEXES,o=alcatel,c=fr" -H ldap://10.142.15.42:389 'pnnumber=*'| egrep -e '^pnnumber*' |wc -l
With the first command, redirecting to a file, I can tail or wc and see it's progress. After the second ldapsearch process starts to make slapd consume memory in large chunks until the new 2G boundary is reached. Once this happen the search get stuck as before with the single process returning 16 records per minute(s).
Once this condition is reached even stopping the old searches and starting new ones the rate will be very slow, like 16 reports per minute(s). It get stuck as before.
Please see attached a single entrance in my DB where you can change DB keys and load it as needed.
Thanks,
Rodrigo.
--- On Mon, 1/26/09, Howard Chu hyc@symas.com wrote:
From: Howard Chu hyc@symas.com Subject: Re: (ITS#5860) slapd memeory leak under openldap 2.4 To: rlvcosta@yahoo.com Cc: openldap-its@openldap.org Date: Monday, January 26, 2009, 11:16 PM rlvcosta@yahoo.com wrote:
Quanah,
In this specific test I reported in my previous e-mail
it was used glibc.
Now I tested with tcmalloc and the memory again was
much more consumed and never released.
PID USER PR NI VIRT RES SHR S %CPU %MEM
TIME+ COMMAND
10652 ldap 18 0 2006m 1.8g 68m S 100 15.8
8:36.75 slapd
Once it get this much memory it then stabilize but it
is much more than before that was 385m.
We may need to have sample data from you to reproduce this situation. I haven't seen anything like it on my tests. Running two searches simultaneously still behaves normally for me.
The scenario was :
Likewise, the exact commands and arguments will be needed...
- Start a full ldapsearch for one specific dn(the DB
has 4 dn's);
- After sometime start a new full ldapsearch to
behave as queries to DB when replication for LDIF backup is being done;
- Export one of the queries to a file so speed
verification can be done with grep and wc.
After sometime the memory starts to be consumed in
large chunks until it stopped in around 2G.
Since one of the queries is being redirect to a file I
can tail to have a visual rate of the entrances being returned by slapd. As the issue before after sometime the rate appears to get stuck and come in small 16 entrances chunks but only after some minutes.
This behavior above appears to happen after the second
ldapsearch fills its own dn cache even monitor always shows only one information as I could see.
[root@brtldp11 ~]# date; grep -e '^pnnum*'
/backup/temp.ldif |wc -l
Mon Jan 26 21:43:31 BRST 2009 482432 [root@brtldp11 ~]# date; grep -e '^pnnum*'
/backup/temp.ldif |wc -l
Mon Jan 26 21:44:56 BRST 2009 482448
This behavior is similar as before with the initial
issue with a single process.
I just notice when slapd starts there are these
threads :
[root@brtldp12 ~]# ps -mu ldap PID TTY TIME CMD 10638 pts/2 00:00:00 slapd - - 00:00:00 - - - 00:00:00 -
Then after the 2 queries are started I have :
[root@brtldp12 ~]# ps -mu ldap PID TTY TIME CMD 10195 pts/2 00:44:22 slapd - - 00:00:00 - - - 00:00:00 - - - 00:26:09 - - - 00:18:13 - - - 00:00:00 -
So 3 new threads. Looks like for some reason with
multiples queries the issue with response getting stuck repeats.
Even one ldapsearch is stopped the number of threads
continues the same, memory continues allocated and the other search get with this slow rate.
These outputs are using now tcmalloc but similar as
with glibc.
-- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
--0-1644073040-1233052012=:88983 Content-Type: text/plain; name="one_INDEXES_entrance.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; fil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VyDQpvYmplY3RDbGFzczogaW5kZXhub2RlDQpy ZWZkbjogdWlkPTEyMTk4NDM3OTY2NTdcMkI1NTQxODQwMTE0OTYsb3U9UkVQ T1NJVE9SWSxvdT1DT05URU5ULG89YWxjYXRlbCxjPWYNCiByDQpjbjogKzU1 NDE4NDAxMTQ5Ng0KDQpkbjogbWFpbGxvZ2luPVwyQjU1NDE4NDAxMTQ5Ni90 eXBlXDNEUExNTkBtbXMuYnJhc2lsdGVsZWNvbS5jb20uYnIsb3U9cmFuZ2U4 NCwNCiBvdT1pbWFwbG9naW4sb3U9SU5ERVhFUyxvPWFsY2F0ZWwsYz1mcg0K c3VibXhpZDogMA0KbWFpbGxvZ2luOiArNTU0MTg0MDExNDk2L3R5cGU9UExN TkBtbXMuYnJhc2lsdGVsZWNvbS5jb20uYnINCmhvc3Q6IGJydGxkcDEyZQ0K b2JqZWN0Q2xhc3M6IGNvbW1vbm1haWxib3gNCm9iamVjdENsYXNzOiBpbmRl eG5vZGUNCnJlZmRuOiB1aWQ9MTIxOTg0Mzc5NjY1N1wyQjU1NDE4NDAxMTQ5 NixvdT1SRVBPU0lUT1JZLG91PUNPTlRFTlQsbz1hbGNhdGVsLGM9Zg0KIHIN Cg==
--0-1644073040-1233052012=:88983 Content-Type: application/x-zip; name="index_simplex.zip" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="index_simplex.zip"
UEsDBBQAAgAIAC9DOzrp93S+DBEAADUEAQASABUAaW5kZXhfc2ltcGxleC5s ZGlmVVQJAAMa4X5JGuF+SVV4BADuAwEC7Z1tb+JIFoW/8yv4PlEPVS6/pRVp e9IZKVJ3Opukd2dWI43AdtKeBZsF0y+z2f++NraBlE+RgA+ku4eWZkNwcc71 fVy36jrAhslxN52dnF+8Pvvl7PooPekPg34WDY+Ck9tJJx38EQVZMOxPp/mw yV0/if/sZ3Ga9IfvkzjrpLPjbvXSTicspd68fnV5+u7i56MWsqvHh2F/PJ0N psEkHhdjptXh0/LwNM6iOLlN57H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