Issue related
On highly-density Systems running many CTs the occurs the effect of concurrency, so we prepared a solution for deploying containers with lower the pressure of locks.
Symptoms
The issue is known for the Ubuntu CT template and occurs for newly created Containers.
# rpm -qa ubuntu-22.04-x86_64-ez
ubuntu-22.04-x86_64-ez-7.0.0-14.vz7.noarch
Diagnostic steps
Explore the number of cgroups allocated on HN if it is obvious big the fix should be applied.
# cat /proc/cgroups | grep memory
(out values >1000)
To collect details of current performance use the script "col_la.py" and submit the output file for investigation:
# python3 col_la.py
Cause
The root cause of the issue is in services raising a dedicated cgroup for every executed service.
Resolution
Use the file provided with this article.
wget http://fe.virtuozzo.com/ctpreset/ctpreset-repo.tar.gz
mkdir /root/ctpreset
tar zxf ctpreset-repo.tar.gz -C /root/ctpreset
echo 'file:///root/ctpreset/ /' >> /vz/template/ubuntu/22.04/x86_64/config/os/default/repositories
echo ct-preset-deb >> /vz/template/ubuntu/22.04/x86_64/config/os/default/packages
vzpkg clean ubuntu-22.04-x86_64
vzpkg create cache ubuntu-22.04-x86_64 -f -r