Controlling memory usage for user(systemd)

Controlling memory usage for user(systemd)

Content #

  1. use stress-ng with user alice

    stress-ng --brk 4
    

    System may not respond.

  2. set 1GB memory limit for alice

    sudo systemctl set-property --runtime user-1001.slice MemoryMax=1G
    

    –runtime makes the setting temporary.

From #