[collectd] python memleaks?
Hi.. I want to make a python based module for pinging multiple devices and store it to db.. I've compiled collectd-4.10.0 with python plugin.. I've wrote very basic 'write do /dev/null' module in python, and memory usage over time grows.. When I load only the python plugin, with no modules, it's ok, when I load my devnull.py, memory usage grows.. Where's my error if any? This devnull.py is only write plugin used in my tests.. Here's the devnull's code: - import collectd def devnull_config(conf): return 0 def devnull_write(vl, data=None): collectd.info(devnull: %s % (vl.values[0])) return 0 collectd.register_config(devnull_config) collectd.register_write(devnull_write) - Here's my test: http://v.kstech.pl/collectd/mem1.png When there's only python loaded, memory is stable (17:40-18:20) About 18:24 I've started with devnull loaded.. I've tested it on two machines: Debian5.0.5 with Python2.5 and Ubuntu10.04 with Python2.6 - results are the same.. Where's the problem? Best regards and thanks for great tool - collectd! ;) -- Krzysiek Szczuka ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd
Re: [collectd] python memleaks?
Here's my another test with such devnull's code: import collectd def devnull_write(vl, data=None): collectd.info(devnull: %s % (vl.values[0])) collectd.register_write(devnull_write) And the result (started with new devnull about 19:03): http://v.kstech.pl/collectd/mem2.png Please help! :) -- Krzysiek Szczuka ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd
Re: [collectd] python memleaks?
On 2010-07-11 18:48, Krzysiek Szczuka wrote: Hi.. I want to make a python based module for pinging multiple devices and store it to db.. I've compiled collectd-4.10.0 with python plugin.. I've wrote very basic 'write do /dev/null' module in python, and memory usage over time grows.. When I load only the python plugin, with no modules, it's ok, when I load my devnull.py, memory usage grows.. yes, that's a known bug. Every time the write or notification callback is executed it will leak a few bytes of memory. This bug has been fixed in the current git repository for both version 4.9 and 4.10. And just as I was about to point to the relevant patches I noticed that version 4.10.1 was released two days ago. That should fix your problem. Regards, Sven ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd