Ubuntu 14.04 x64 rsyslogd high memory usage

  • Posted July 1, 2014

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?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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.

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.