Cpu tuning for ryzen benchmark

EuroDomenii

Renowned Member
Sep 30, 2016
145
32
68
Slatina
www.domenii.eu
Follow up https://forum.proxmox.com/threads/proxmox-ve-5-0-released.35451/#post-173777, I am playing with https://www.hetzner.com/dedicated-rootserver/ax60-ssd AMD Ryzen 7 1700X Octa-Core

So far, the system is stable ( see http://openbenchmarking.org/result/1707108-TR-HETZNERRY96)

I have installed Proxmox on top of Debian Stretch https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Stretch.

Before upgrading to Proxmox, I had some issues with Debian stock kernel 4.9 (Ryzen support was added to 4.10 https://lists.debian.org/debian-user/2017/03/msg00063.html) ( smartctl test was hanging, low performance fio tests).

Fortunately, upgrading to Proxmox gave me the 4.10 kernel, and all the problems are gone.
It was failing to reboot randomly, but I knew that this issue could be fixed with GRUB_CMDLINE_LINUX=" rootdelay=15" in /etc/default/grub ( run update-grub afterwards) .
OVH Proxmox distribution comes with this setting, by default.

Now, benchmark time with LXC containers!

The testing minimal LXC Ubuntu Xenial has 1 core, memory 256MB, apache mpm event with 15 vhosts, php-fpm, ISPConfig with mariadb, without mail services.

Launching 65 identical containers, results an acceptable load average 10%. According to http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages, best load average for 8 cores Ryzen would be 8.

My target is to launch 130 identical containers. But the average load is between 16-20%.

Now, tuning time !

CPU units

For one container increase the number to 4096, and even higher 102400 ( all other default to 1024). Number is relative to the weights of all the other running containers. You can use this setting to prioritize some containers.

The load is identical. Of course, because this setting just give more resources to a priority container, during heavy load.

CPU limit

cpulimit: 0.5 The container has 1 core, but restrict overall CPU consumption to half a core. Even this should be expected, this settings didn’t modify the load.

lxc.cgroup.cpu.cfs_period_us

Of course, the settings from /var/lib/lxc/100/config are overridden by /etc/pve/lxc/100.conf.
I could override lxc.cgroup.cpu.cfs_period_us = 20000 in .conf. No gain.

Other settings

Other settings like limits.cpu.allowance, are not supported and parsed by proxmox See https://stgraber.org/2016/03/26/lxd-2-0-resource-control-412/


Question: Is there a way to decrease baseline load for 130 containers ? Of course, is possible further tuning, during additional load, but cannot reduce this baseline initial load.

On the other hand, trying to load other set of 130 Xenial containers with only apache2, gave me an average load of 0.7

The only solution is further fine tuning of the LXC container, for lower cpu consumption?

Thank you!
 
hi,

Question: Is there a way to decrease baseline load for 130 containers ? Of course, is possible further tuning, during additional load, but cannot reduce this baseline initial load.

the load is not something you can tune.

as is described in the link you posted, the load represents the number of processes waiting for cpu time.
when you start many processes, most will have to wait to be scheduled, no parameter will reduce this number,
but:

do not interpret a single load value, but monitor over time (e.g. look at 1, 5 and 15 minute load) so that you can see a trend.
a single high load value does not mean the system is overloaded.
when starting many containers simultaniously, all will have to start/setting up so they will consume some cpu, but as soon
as they are started, they will be much less cpu hungry (unless they have some heavy lifting to do)
 
  • Like
Reactions: EuroDomenii
the load is not something you can tune.
Thanks for confirmation, that the solution is further fine tuning inside of the LXC container, for lower cpu consumption.

when starting many containers simultaneously, all will have to start/setting up so they will consume some cpu, but as soon
as they are started, they will be much less cpu hungry (unless they have some heavy lifting to do)
The values reported here, are at least 30 mins after the initial heavy loading of starting all the containers.
 

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!