[collectd] possible memory leak?

Kimo Rosenbaum kimor79 at yahoo.com
Mon Aug 16 19:00:38 CEST 2010


Hello,

I'm running collectd 4.9.2 on FreeBSD 7.1 and 8.0 on about ~100 servers. They 
each send their data to a central collectd instance (also 4.9.2 running on 
FreeBSD 8.0). This instance is only configured with:

FQDNLookup    true
BaseDir        "/storage/collectd"
PIDFile        "/var/run/collectd_receiver.pid"
PluginDir    "/usr/local/lib/collectd"
TypesDB        "/usr/local/share/collectd/types.db"
Interval    60

LoadPlugin syslog
<Plugin syslog>
    LogLevel info
</Plugin>

LoadPlugin network
LoadPlugin rrdtool

<Plugin network>
    Listen "REMOVED"
    ReportStats true
</Plugin>


Over the course of a couple days active memory slowly increases and eventually 
swap starts getting used. Restarting the collectd instance relieves memory 
pressure and everything is fine for a few more days.

Here's top output:

last pid: 44745;  load averages:  0.06,  0.08,   
0.08                                                                                                                                                                                   
   up 6+22:54:58  09:32:59 

49 processes:  1 running, 48 sleeping 
CPU:  0.1% user,  0.0% nice,  0.0% system,  0.0% interrupt, 99.8% idle 
Mem: 4674M Active, 1072M Inact, 1933M Wired, 176M Cache, 827M Buf, 59M Free 
Swap: 8192M Total, 1692M Used, 6500M Free, 20% Inuse 

  PID USERNAME       THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU  COMMAND 

 1040 root             9  44    0  6354M  3550M ucond   4 114:36  0.10%  
/usr/local/sbin/collectd -C /usr/local/etc/collectd_rec

This server is also running a second instance of collectd which is configured 
like the rest (ie gather all the available stats). However that instance is not 
using much memory:

4914 root             9  44    0 91996K 28864K ucond   0   0:16  0.00% collectd

Any suggestions/ideas as to why the huge memory usage over time?

Thanks
Kimo




More information about the collectd mailing list