Memory problem with lxc + percona mysql server 5.7

Puma

New Member
Aug 9, 2012
10
0
1
When I run percona mysql server 5.7 in lxc container with ubuntu 16.04 and upload big mysql dump I see oom-killer kill mysql server

I use latest proxmox and all updated in lxc ubuntu 16.04

I give lxc container 60GB memory
This host proxmox have just one lxc container and 64 gb memory
Also I use zfs for lxc
In dmesg I see

[29079.689859] [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name
[29079.689959] [13348] 0 13348 9305 790 23 3 265 0 systemd
[29079.690000] [13535] 0 13535 8819 1596 21 3 44 0 systemd-journal
[29079.690042] [13881] 0 13881 7137 580 20 3 59 0 systemd-logind
[29079.690083] [13899] 0 13899 6558 485 19 3 58 0 cron
[29079.690123] [13917] 0 13917 68250 608 35 3 140 0 accounts-daemon
[29079.690165] [13935] 109 13935 10747 610 27 4 107 -900 dbus-daemon
[29079.690206] [13956] 104 13956 64105 600 27 3 91 0 rsyslogd
[29079.690247] [14080] 0 14080 3999 1 12 3 214 0 dhclient
[29079.690288] [14166] 0 14166 16403 1029 35 3 153 -1000 sshd
[29079.690328] [14280] 0 14280 3211 391 12 3 10 0 agetty
[29079.690369] [14284] 0 14284 3211 382 12 3 0 0 agetty
[29079.690409] [14295] 0 14295 3211 394 12 3 0 0 agetty
[29079.690450] [14300] 110 14300 1127 323 8 3 33 0 mysqld_safe
[29079.690491] [14569] 0 14569 99486 4468 150 3 1341 0 apache2
[29079.690531] [14641] 33 14641 99506 674 140 3 1354 0 apache2
[29079.690572] [14642] 33 14642 99506 674 140 3 1354 0 apache2
[29079.690613] [14645] 33 14645 99508 389 140 3 1354 0 apache2
[29079.690653] [14647] 33 14647 99506 771 140 3 1256 0 apache2
[29079.690693] [14648] 33 14648 99494 411 139 3 1360 0 apache2
[29079.690734] [14860] 110 14860 5069066 3792631 8210 22 170746 0 mysqld
[29079.690774] [15050] 0 15050 16352 854 24 4 0 0 master
[29079.690815] [15056] 106 15056 16925 843 25 3 0 0 qmgr
[29079.690855] [15381] 0 15381 9171 705 21 3 58 0 systemd
[29079.690896] [15417] 0 15417 15168 55 33 3 290 0 (sd-pam)
[29079.690936] [15500] 0 15500 6103 436 16 3 144 0 screen
[29079.690977] [15501] 0 15501 4575 523 14 3 134 0 bash
[29079.691017] [15516] 0 15516 10343 1771 24 3 448 0 mysql
[29079.691059] [23897] 33 23897 99494 438 139 3 1328 0 apache2
[29079.691100] [26027] 106 26027 16912 833 22 3 0 0 pickup
[29079.691143] [29544] 0 29544 16739 1195 37 3 0 0 sshd
[29079.691183] [29545] 107 29545 16739 628 35 3 0 0 sshd
[29079.691223] Memory cgroup out of memory: Kill process 14860 (mysqld) score 1000 or sacrifice child
[29079.691363] Killed process 14860 (mysqld) total-vm:20276264kB, anon-rss:15160896kB, file-rss:9628kB



most important

[29079.689859] [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name
[29079.690734] [14860] 110 14860 5069066 3792631 8210 22 170746 0 mysqld
[29079.691223] Memory cgroup out of memory: Kill process 14860 (mysqld) score 1000 or sacrifice child
[29079.691363] Killed process 14860 (mysqld) total-vm:20276264kB, anon-rss:15160896kB, file-rss:9628kB


I have same installation on old proxmox with openvz and dont have this problem.
 

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!