Skip to content

Swap file is set for desktop instead of server #822

Open

Description

@julienledut

CloudPanel version(s) affected

2.5.4

Description

Hello,

I met some server alerts (throught netdata) about using swap and the swap was full, but in the same time, my RAM had more free spaces than the whole swap file size.

The provided tuning, corresponding to Web Server (Nginx), should be added during the CloudPanel Install process.
This may make CloudPanel sites faster.

How to reproduce

Running a full scan from shell using clamav can reproduce this issue.

Possible Solution

For Tuning Swap and Cache Settings, set :
vm.swappiness was=10 in /proc/sys/vm/swappiness (default was 60)
vm.vfs_cache_pressure=50 in /etc/sysctl.conf (default was 100)
This parameters fix my issue.

Additional Context

Seems that CloudPanel creates a swap file : /home/.swap but leave the OS default parameters (for Desktop / interactive session).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions