![]() docker run \ĭocker compose v3 seems to have abstracted some of these concepts away to what can be applied to a service/swarm so you don't get the same fine grained control.įor a v3 file, use the resources object to configure limits and reservations for cpu and memory: services:ĭisk based limits might need a volume driver that supports setting limits. Quotas are supported on the devicemapper, btrfs and zfs storage drivers, and also with the overlay2 driver when used on an xfs file system that is mounted with the pquota option. ![]() If you want to limit total disk usage as well, you will need to have the correct storage setup. This can be limited per device, so if you keep data on a specific device for your conversion: docker run \ docker run \īlock or Device IO is more important than total space for performance. Limiting memory is a bit finicky as your process will just crash if it hits the limit. This will only help if most of your tasks that are being slowed down are also in Docker containers, so they are being allocated Dockers shares as well. ![]() Or limited by Dockers CPU shares, which default to 1024. ![]() In plain docker you can achieve each of the limit with command line options:Ī container can be limited to a single CPU core (or a hyperthread on current intel hardware): docker run \
0 Comments
Leave a Reply. |