Debian Codegraph @

share/man/container-limit.1.rst

raw
1 .. Open Infrastructure: compute-tools
2
3 .. Copyright (C) 2014-2026 Daniel Baumann <[email protected]>
4 ..
5 .. SPDX-License-Identifier: GPL-3.0+
6 ..
7 .. This program is free software: you can redistribute it and/or modify
8 .. it under the terms of the GNU General Public License as published by
9 .. the Free Software Foundation, either version 3 of the License, or
10 .. (at your option) any later version.
11 ..
12 .. This program is distributed in the hope that it will be useful,
13 .. but WITHOUT ANY WARRANTY; without even the implied warranty of
14 .. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 .. GNU General Public License for more details.
16 ..
17 .. You should have received a copy of the GNU General Public License
18 .. along with this program. If not, see <https://www.gnu.org/licenses/>.
19
20 ===============
21 container-limit
22 ===============
23
24 ------------------------------
25 Limit resources of a container
26 ------------------------------
27
28 :manual section: 1
29 :manual group: Open Infrastructure
30
31 Synopsis
32 ========
33
34 | **container limit** ['OPTIONS']
35
36 Description
37 ===========
38
39 The **container limit** command limits resources available to a container at
40 runtime.
41
42 Options
43 =======
44
45 The following **container limit** options are available:
46
47 -n, --name='NAME':
48 Specify container name.
49
50 --blockio-device-weight='DEVICE WEIGHT':
51 Specify device specific blockio weight, see systemd.resource-control(5).
52
53 --blockio-read-bandwidth='DEVICE BYTES':
54 Specify device specific blockio read bandwidth, see
55 systemd.resource-control(5).
56
57 -b, --blockio-weight='WEIGHT':
58 Specify general blockio weight, see systemd.resource-control(5).
59
60 --blockio-write-bandwidth='DEVICE BYTES':
61 Specify device specific blockio write bandwidth, see
62 systemd.resource-control(5).
63
64 -c, --cpu-quota='QUOTA':
65 Specify CPU quota, see systemd.resource-control(5).
66
67 --cpu-shares='SHARES':
68 Specify CPU shares, see systemd.resource-control(5).
69
70 -m, --memory-limit='BYTES':
71 Specify memory limit, see systemd.resource-control(5).
72
73 -t, --tasks-max='NUMBER':
74 Specify tasks max, see systemd.resource-control(5).
75
76 Examples
77 ========
78
79 Set blockio weight for the example.net container:
80
81 sudo container limit -n example.net --blockio-weight 100
82
83 Set CPU quota for the example.net container:
84
85 sudo container limit -n example.net --cpu-quota 10%
86
87 Set memory limit for the example.net container to 1GB:
88
89 sudo container limit -n example.net --memory-limit 1G
90
91 Set tasks max for the example.net container to 100:
92
93 sudo container limit -n example.net --tasks-max 100
94
95 See also
96 ========
97
98 | compute-tools(7),
99 | container(1).
100
101 Homepage
102 ========
103
104 More information about compute-tools and the Open Infrastructure project can be
105 found on the homepage (https://open-infrastructure.net).
106
107 Contact
108 =======
109
110 Bug reports, feature requests, help, patches, support and everything else are
111 welcome on the Open Infrastructure Software Mailing List
112 <[email protected]>.
113
114 Debian specific bugs can also be reported in the Debian Bug Tracking System
115 (https://bugs.debian.org).
116
117 Authors
118 =======
119
120 compute-tools were written by Daniel Baumann
121 <[email protected]> and others.