LXC swap problem

Grzenio

New Member
Aug 19, 2016
7
0
1
42
Hi i have problem on my pve with lxc contanair.
I have set swappines 0 on host and swap 0 but :/

htop :
Code:
Mem[||||||||||||||  2.91G/24.0G]
Swp[  688M/0K]
Why contanair not use ram?
 
Last edited:
Code:
On host:

free -m
  total  used  free  shared  buffers  cached
Mem:  64419  6235  58183  1772  113  2172
-/+ buffers/cache:  3950  60469
Swap:  4095  1973  2122

--------------------------

on lcx01:

free -m
  total  used  free  shared  buffers  cached
Mem:  8192  1144  7047  0  0  217
-/+ buffers/cache:  926  7265
Swap:  0  986 18014398509480998

--------------------------

on lxc02:
free -m
  total  used  free  shared  buffers  cached
Mem:  8192  1680  6511  0  0  322
-/+ buffers/cache:  1357  6834
Swap:  0  357 18014398509481626
 
Last edited:
Code:
veversion
pve-manager/4.2-2/725d76f0 (running kernel: 4.4.6-1-pve)

vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b  swpd  free  buff  cache  si  so  bi  bo  in  cs us sy id wa st
 2  0 1375920 58937440 186652 2420208  0  0  113  87  0  0  1  1 97  1  0
root@pve:~# sysctl -p
vm.swappiness = 0
 
You should update, your version is very old - current is

Code:
root@pve4-test ~ > pveversion
pve-manager/4.2-17/e1400248 (running kernel: 4.4.15-1-pve)

I remember, there was a problem concerning this strange swap problem a while ago.
 
hm.. apt-get not see upgrade
Code:
root@pve:~# apt-get update
Ign.  http://ftp.pl.debian.org jessie InRelease
Stary http://ftp.pl.debian.org jessie Release.gpg
Stary http://ftp.pl.debian.org jessie Release
Stary http://security.debian.org jessie/updates InRelease
Pobieranie:1 http://ftp.debian.org jessie-backports InRelease [166 kB]
Stary http://ftp.pl.debian.org jessie/main amd64 Packages
Stary http://ftp.pl.debian.org jessie/contrib amd64 Packages
Stary http://ftp.pl.debian.org jessie/contrib Translation-en
Stary http://ftp.pl.debian.org jessie/main Translation-pl
Stary http://ftp.pl.debian.org jessie/main Translation-en
Stary http://security.debian.org jessie/updates/main amd64 Packages
Stary http://security.debian.org jessie/updates/contrib amd64 Packages
Stary http://security.debian.org jessie/updates/contrib Translation-en
Pobieranie:2 http://ftp.debian.org jessie-backports/main amd64 Packages/DiffIndex [27,8 kB]
Stary http://security.debian.org jessie/updates/main Translation-en
Pobieranie:3 http://ftp.debian.org jessie-backports/main Translation-en/DiffIndex [27,8 kB]
Pobieranie:4 http://ftp.debian.org jessie-backports/main amd64 2016-08-19-0902.26.pdiff [364 B]
Stary http://repo.zabbix.com jessie InRelease
Pobieranie:5 http://ftp.debian.org jessie-backports/main amd64 2016-08-19-0902.26.pdiff [364 B]
Ign.  http://downloads.linux.hpe.com wheezy/current InRelease
Stary http://downloads.linux.hpe.com wheezy/current Release.gpg
Stary http://repo.zabbix.com jessie/main Sources
Stary http://downloads.linux.hpe.com wheezy/current Release
Stary http://repo.zabbix.com jessie/main amd64 Packages
Stary http://downloads.linux.hpe.com wheezy/current/non-free amd64 Packages
Ign.  http://downloads.linux.hpe.com wheezy/current/non-free Translation-pl_PL
Ign.  http://downloads.linux.hpe.com wheezy/current/non-free Translation-pl
Ign.  http://downloads.linux.hpe.com wheezy/current/non-free Translation-en
Ign.  http://repo.zabbix.com jessie/main Translation-pl_PL
Ign.  http://repo.zabbix.com jessie/main Translation-pl
Ign.  http://repo.zabbix.com jessie/main Translation-en
Pobrano 222 kB w 6s (32,5 kB/s)
Czytanie list pakietów... Gotowe
root@pve:~# apt-get upgrade
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności
Odczyt informacji o stanie... Gotowe
Obliczanie aktualizacji...Następujące pakiety zostały zainstalowane automatycznie i nie są już więcej wymagane:
  libgsasl7 libltdl7 libntlm0 libodbc1
Aby je usunąć należy użyć "apt-get autoremove".
Gotowe
0 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
root@pve:~# apt-get dist-upgrade
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności
Odczyt informacji o stanie... Gotowe
Obliczanie aktualizacji...Następujące pakiety zostały zainstalowane automatycznie i nie są już więcej wymagane:
  libgsasl7 libltdl7 libntlm0 libodbc1
Aby je usunąć należy użyć "apt-get autoremove".
Gotowe
0 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.

apt-cache policy pve-manager
pve-manager:
  Zainstalowana: 4.2-2
  Kandydująca:  4.2-2
  Tabela wersji:
 *** 4.2-2 0
  100 /var/lib/dpkg/status
 
i have
Code:
cat /etc/apt/sources.list
deb http://ftp.pl.debian.org/debian jessie main contrib

# security updates
deb http://security.debian.org jessie/updates main contrib

deb http://ftp.debian.org/debian jessie-backports main

a must add pve-no-subscription repo ?
 
ok thx, maybe letter i buy community. this is my priv server no commercial. i install new pve reboot and now i dont see use swap thx.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!