public inbox for pve-user@lists.proxmox.com
 help / color / mirror / Atom feed
* [PVE-User] swappiness on Debian container
@ 2021-05-26 11:45 Adam Weremczuk
  2021-05-26 13:37 ` John
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Weremczuk @ 2021-05-26 11:45 UTC (permalink / raw)
  To: pve-user

Hi all,

Proxmox 6.2-6, one of containers (Debian 9.9) is swapping memory even 
though it has plenty of unused RAM left.

I've tried suggestions from:

https://askubuntu.com/questions/157793/why-is-swap-being-used-even-though-i-have-plenty-of-free-ram
https://askubuntu.com/questions/192304/changing-swappiness-in-sysctl-conf-doesnt-work-for-me

to change the default 60 to 10, rebooted multiple times but none of them 
is taking an effect.

I've tried switching between privileged / unprivileged container as well 
as enable nesting. Still no joy:

$ sudo sysctl -p
sysctl: setting key "vm.swappiness": Read-only file system

$ mount
ms-zfs-pool/subvol-101-disk-0 on / type zfs (rw,xattr,posixacl)
none on /dev type tmpfs (rw,relatime,size=492k,mode=755)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
proc on /proc/sys/net type proc (rw,nosuid,nodev,noexec,relatime)
proc on /proc/sys type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/sysrq-trigger type proc (ro,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
sysfs on /sys/devices/virtual/net type sysfs (rw,relatime)
sysfs on /sys/devices/virtual/net type sysfs 
(rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
proc on /dev/.lxc/proc type proc (rw,relatime)
sys on /dev/.lxc/sys type sysfs (rw,relatime)
lxcfs on /proc/cpuinfo type fuse.lxcfs 
(rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/diskstats type fuse.lxcfs 
(rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/loadavg type fuse.lxcfs 
(rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/meminfo type fuse.lxcfs 
(rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/stat type fuse.lxcfs 
(rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/swaps type fuse.lxcfs 
(rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/uptime type fuse.lxcfs 
(rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /sys/devices/system/cpu/online type fuse.lxcfs 
(rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
devpts on /dev/console type devpts 
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
devpts on /dev/pts type devpts 
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024)
devpts on /dev/ptmx type devpts 
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024)
devpts on /dev/tty1 type devpts 
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024)
devpts on /dev/tty2 type devpts 
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup 
(rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
cgroup on /sys/fs/cgroup/blkio type cgroup 
(rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup 
(rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup 
(rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/perf_event type cgroup 
(rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpuset type cgroup 
(rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/hugetlb type cgroup 
(rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/freezer type cgroup 
(rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/devices type cgroup 
(rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/pids type cgroup 
(rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/rdma type cgroup 
(rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup 
(rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)

Any ideas?

Regards,
Adam




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PVE-User] swappiness on Debian container
  2021-05-26 11:45 [PVE-User] swappiness on Debian container Adam Weremczuk
@ 2021-05-26 13:37 ` John
  0 siblings, 0 replies; 2+ messages in thread
From: John @ 2021-05-26 13:37 UTC (permalink / raw)
  To: Proxmox VE user list

Not sure this is a best practice, but when creating containers, I set the
swap amount to 0.
-John

On Wed, May 26, 2021 at 7:51 AM Adam Weremczuk <adamw@matrixscience.com>
wrote:

> Hi all,
>
> Proxmox 6.2-6, one of containers (Debian 9.9) is swapping memory even
> though it has plenty of unused RAM left.
>
> I've tried suggestions from:
>
>
> https://askubuntu.com/questions/157793/why-is-swap-being-used-even-though-i-have-plenty-of-free-ram
>
> https://askubuntu.com/questions/192304/changing-swappiness-in-sysctl-conf-doesnt-work-for-me
>
> to change the default 60 to 10, rebooted multiple times but none of them
> is taking an effect.
>
> I've tried switching between privileged / unprivileged container as well
> as enable nesting. Still no joy:
>
> $ sudo sysctl -p
> sysctl: setting key "vm.swappiness": Read-only file system
>
> $ mount
> ms-zfs-pool/subvol-101-disk-0 on / type zfs (rw,xattr,posixacl)
> none on /dev type tmpfs (rw,relatime,size=492k,mode=755)
> proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
> proc on /proc/sys/net type proc (rw,nosuid,nodev,noexec,relatime)
> proc on /proc/sys type proc (ro,nosuid,nodev,noexec,relatime)
> proc on /proc/sysrq-trigger type proc (ro,nosuid,nodev,noexec,relatime)
> sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
> sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
> sysfs on /sys/devices/virtual/net type sysfs (rw,relatime)
> sysfs on /sys/devices/virtual/net type sysfs
> (rw,nosuid,nodev,noexec,relatime)
> fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
> proc on /dev/.lxc/proc type proc (rw,relatime)
> sys on /dev/.lxc/sys type sysfs (rw,relatime)
> lxcfs on /proc/cpuinfo type fuse.lxcfs
> (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
> lxcfs on /proc/diskstats type fuse.lxcfs
> (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
> lxcfs on /proc/loadavg type fuse.lxcfs
> (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
> lxcfs on /proc/meminfo type fuse.lxcfs
> (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
> lxcfs on /proc/stat type fuse.lxcfs
> (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
> lxcfs on /proc/swaps type fuse.lxcfs
> (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
> lxcfs on /proc/uptime type fuse.lxcfs
> (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
> lxcfs on /sys/devices/system/cpu/online type fuse.lxcfs
> (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
> devpts on /dev/console type devpts
> (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
> devpts on /dev/pts type devpts
> (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024)
> devpts on /dev/ptmx type devpts
> (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024)
> devpts on /dev/tty1 type devpts
> (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024)
> devpts on /dev/tty2 type devpts
> (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024)
> tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
> tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
> tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
> tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
> cgroup on /sys/fs/cgroup/systemd type cgroup
> (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
> cgroup on /sys/fs/cgroup/blkio type cgroup
> (rw,nosuid,nodev,noexec,relatime,blkio)
> cgroup on /sys/fs/cgroup/memory type cgroup
> (rw,nosuid,nodev,noexec,relatime,memory)
> cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup
> (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
> cgroup on /sys/fs/cgroup/perf_event type cgroup
> (rw,nosuid,nodev,noexec,relatime,perf_event)
> cgroup on /sys/fs/cgroup/cpuset type cgroup
> (rw,nosuid,nodev,noexec,relatime,cpuset)
> cgroup on /sys/fs/cgroup/hugetlb type cgroup
> (rw,nosuid,nodev,noexec,relatime,hugetlb)
> cgroup on /sys/fs/cgroup/freezer type cgroup
> (rw,nosuid,nodev,noexec,relatime,freezer)
> cgroup on /sys/fs/cgroup/devices type cgroup
> (rw,nosuid,nodev,noexec,relatime,devices)
> cgroup on /sys/fs/cgroup/pids type cgroup
> (rw,nosuid,nodev,noexec,relatime,pids)
> cgroup on /sys/fs/cgroup/rdma type cgroup
> (rw,nosuid,nodev,noexec,relatime,rdma)
> cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup
> (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
> mqueue on /dev/mqueue type mqueue (rw,relatime)
> hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
>
> Any ideas?
>
> Regards,
> Adam
>
>
> _______________________________________________
> pve-user mailing list
> pve-user@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-26 13:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 11:45 [PVE-User] swappiness on Debian container Adam Weremczuk
2021-05-26 13:37 ` John

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal