I have Centos 7

    # cat /etc/centos-release
    CentOS Linux release 7.3.1611 (Core)

fresh rsyslogd

    # rsyslogd -version
    rsyslogd 8.36.0, compiled with:

enough free memory

    # free
                  total        used        free      shared  buff/cache   available
    Mem:       32741276    12244672     4931760      330064    15564844    19239180

But rsyslogd always uses about 430M of swap space, according to smem. I don't understand, why.

Can you give me some advice how to limit it's memory consumption and how to force it to use RAM instead of swap.


That is not a problem, you are not under memory pressure. Note the 4 GB free and 14 GB of caches that could easily be dropped.

The purpose of swap, aka paging, space is to provide a way to reclaim anonymous pages. Which it will do even if there is memory available. An argument explaining this: In defence of swap: common misconceptions. And a Red Hat blog explaining some of their guidance: Do we really need swap on modern systems?

More useful would be to apply a performance profile, such as with tuned. Some of the profiles alter swappiness, but there is a lot more to performance than that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.