Ubuntu 14.04 x64 rsyslogd high memory usage

July 1, 2014 7.2k views

I just brought up a 513MB droplet of Ubuntu 14.04 x64 and rsyslogd is using over 200MB of memory. I'm not sure what would be causing that. How would I figure out why rsyslogd is using so much memory?

2 Answers

What's the output of the following command?

pidstat -r -p $(pidof rsyslogd)

rsyslogd is most likely not actually using 200MB of memory. You can find out how much memory it really is using by looking for the value (in kilobytes) of the RSS column of the above command's output.

  • Ahh okay, thank you very much for clearing that up.

    09:45:24 AM   UID       PID  minflt/s  majflt/s     VSZ    RSS   %MEM  Command
    09:45:24 AM   101       353      0.04      0.00  255840   1112   0.22  rsyslogd

One solution is to reduce the buffer size of rsyslogd. Edit the /etc/defualt/rsyslogd configuration file and add

ulimit -S -s 128

to the last line of the configuration file. This will reduce the allocated memory of rsyslogd to 128k, which is still enough for it to to do it's job. Restarting the service didn't seem to update the systems information correctly, but restarting the instance now shows much less memory usage.

Have another answer? Share your knowledge.