Limit writing and reading when creating LXC Conteiner.

Alex Porto dos Santos

Active Member
Mar 20, 2018
4
0
41
29
When I create a new container, the disk IO rate goes up a lot. I even consider it normal due to the extraction work being writing to the disk. However, this affects other containers that are on the same disk, degrading the performance.
I would like to know if there is a way to limit the disk IO so that it affects less the other containers.

I have a lot of containers on the same disk, but I only feel this performance degradation when creating new containers.
All disks are ssds.

Other solutions are also welcome.


CPU(s)

24 x Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (2 Sockets)
Kernel Version

Linux 5.3.18-3-pve #1 SMP PVE 5.3.18-3 (Tue, 17 Mar 2020 16:33:19 +0100)
PVE Manager Version

pve-manager/6.1-11/f2f18736
 
hi,

in /etc/pve/datacenter.cfg or /etc/pve/storage.cfg you can set bandwidth/io limits.

see man datacenter.cfg for more information
 
Hello
Thank you very much for your reply.

I found the setting in the manual.
bwlimit: [clone = <LIMIT>] [, default = <LIMIT>] [, migration = <LIMIT>] [, move = <LIMIT>] [, restore = <LIMIT>]
Set bandwidth / io limits various operations.

However the action I am performing is create. He creates from a template. Does this fall into the default?
Another doubt is: this limit applies to the operation or applies to the entire time of the container (example: the processes inside the container are also limited to this parameter).


I may also be confused as to what to fill out. He speaks in KiB / s. Today I looked at the container creation log he gave me the average. Total bytes read: 3928913920 (3.7GiB, 7.8MiB / s).
I consider a low average, a ssd should achieve 512Mib / s theoretical. I may be mistaken, but next to that I would have, RAID1, writing competition during the process, besides the CPU time to extract the tar.gz.
I could put a value like
bwlimit: default = 8192
to have a maximum of 8MiB / s?

Sorry my english and thanks for the reply
 
hi,

However the action I am performing is create. He creates from a template. Does this fall into the default?
yes it does.

Another doubt is: this limit applies to the operation or applies to the entire time of the container (example: the processes inside the container are also limited to this parameter).
limits are applied on the operations like create/restore/etc.

bwlimit: default=X should work, where X is a number in KiB/s unit

bwlimit: default = 8192
to have a maximum of 8MiB / s?
yes
 

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!