Re: Behavior of snmp_clone_pdu
On 07/05/18 09:39, Ramki wrote: It is on Linux and I have already tried valgrind. It is not reporting any leaks or reachable memory during exit. Hello Ramki, Please do not reply at the top of an e-mail the previous reply was at the bottom. See also https://en.wikipedia.org/wiki/Posting_style. Regarding the issue that you reported: how did you conclude that process memory did not come down after the traps were cleared? Did you perhaps inspect the RES number reported by the top utility or something similar? Bart. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Behavior of snmp_clone_pdu
Thanks for the reply. It is on Linux and I have already tried valgrind. It is not reporting any leaks or reachable memory during exit. Thanks Ramki On Thu, Jul 5, 2018 at 7:24 PM Bart Van Assche wrote: > On 07/05/18 01:21, Ramki wrote: > > We are implementing a SNMP agent using the NET SNMP library (C). > > As part of the agent we need to handle the trap burst scenario (1250 > > traps per second for 75 seconds). We have added a memory based queue > > that reads SNMP from the netsnmp_session callback function and > > calls snmp_clone_pdu. > > We see a very strange behavior. When there are around 10 traps are > > stored after calling snmp_clone_pdu, we see the process memory growth > > up to 3 GB. > > The memory does not come down even after clearing the traps. > > > > Can somebody throw light on the net snmp memory handling? > > Are you developing for a platform that supports Valgrind? If so, have > you tried to analyze the memory leaks with valgrind --leak-check=...? > > Bart. > -- Ramki "SAVE PAPER - THINK BEFORE YOU PRINT!" -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Behavior of snmp_clone_pdu
On 07/05/18 01:21, Ramki wrote: > We are implementing a SNMP agent using the NET SNMP library (C). > As part of the agent we need to handle the trap burst scenario (1250 > traps per second for 75 seconds). We have added a memory based queue > that reads SNMP from the netsnmp_session callback function and > calls snmp_clone_pdu. > We see a very strange behavior. When there are around 10 traps are > stored after calling snmp_clone_pdu, we see the process memory growth > up to 3 GB. > The memory does not come down even after clearing the traps. > > Can somebody throw light on the net snmp memory handling? Are you developing for a platform that supports Valgrind? If so, have you tried to analyze the memory leaks with valgrind --leak-check=...? Bart. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders