Cgroups-cpu: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „=Anlegen einer Control Group= *cgcreate -g blkio:/mygroup =Checken= *lscgroup | grep blkio:/dd blkio:/dd =Welche Parameter sind Subsystem Block-I/O vorhande…“) |
Thomas (Diskussion | Beiträge) |
||
| (13 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
| − | =Anlegen | + | =Anlegen von Control Groups= |
| − | *cgcreate -g | + | *cgcreate -g cpu:/cpulimited |
| + | *cgcreate -g cpu:/lesscpulimited | ||
| − | = | + | =Welche Parameter sind vorhanden= |
| − | * | + | *cgget -g cpu /cpulimited |
| − | + | <pre> | |
| − | + | /cpulimited: | |
| − | + | cpu.shares: 1024 | |
| − | *cgget -g | + | cpu.cfs_quota_us: -1 |
| + | cpu.stat: nr_periods 0 | ||
| + | nr_throttled 0 | ||
| + | throttled_time 0 | ||
| + | cpu.cfs_period_us: 100000 | ||
| + | </pre> | ||
| + | *cgget -g cpu /lesscpulimited | ||
<pre> | <pre> | ||
| − | / | + | /lesscpulimited: |
| − | + | cpu.shares: 1024 | |
| − | + | cpu.cfs_quota_us: -1 | |
| − | + | cpu.stat: nr_periods 0 | |
| − | + | nr_throttled 0 | |
| − | + | throttled_time 0 | |
| − | + | cpu.cfs_period_us: 100000 | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
</pre> | </pre> | ||
| − | = | + | =cpu.shares auf 512 in den cpulimited group= |
| − | * | + | Normaler Wert ist 1024 |
| + | *cgset -r cpu.shares=512 cpulimited | ||
| + | |||
| + | =Testprogramm= | ||
| + | *apt install mathomatic-primes | ||
| + | |||
| + | =3 Limitierte Prozesse und einen Unlimitierten starten= | ||
| + | *cgexec -g cpu:cpulimited matho-primes 0 9999999999 > /dev/null | ||
| + | *cgexec -g cpu:cpulimited matho-primes 0 9999999999 > /dev/null | ||
| + | *cgexec -g cpu:cpulimited matho-primes 0 9999999999 > /dev/null | ||
| + | *cgexec -g cpu:lesscpulimited matho-primes 0 9999999999 > /dev/null | ||
| − | = | + | =Top= |
| − | * | + | *top |
| − | + | [[Datei:cgroup-1.png|600px]] | |
| − | |||
| − | |||
| − | |||
| − | |||
Aktuelle Version vom 14. Oktober 2017, 16:53 Uhr
Anlegen von Control Groups
- cgcreate -g cpu:/cpulimited
- cgcreate -g cpu:/lesscpulimited
Welche Parameter sind vorhanden
- cgget -g cpu /cpulimited
/cpulimited: cpu.shares: 1024 cpu.cfs_quota_us: -1 cpu.stat: nr_periods 0 nr_throttled 0 throttled_time 0 cpu.cfs_period_us: 100000
- cgget -g cpu /lesscpulimited
/lesscpulimited: cpu.shares: 1024 cpu.cfs_quota_us: -1 cpu.stat: nr_periods 0 nr_throttled 0 throttled_time 0 cpu.cfs_period_us: 100000
Normaler Wert ist 1024
- cgset -r cpu.shares=512 cpulimited
Testprogramm
- apt install mathomatic-primes
3 Limitierte Prozesse und einen Unlimitierten starten
- cgexec -g cpu:cpulimited matho-primes 0 9999999999 > /dev/null
- cgexec -g cpu:cpulimited matho-primes 0 9999999999 > /dev/null
- cgexec -g cpu:cpulimited matho-primes 0 9999999999 > /dev/null
- cgexec -g cpu:lesscpulimited matho-primes 0 9999999999 > /dev/null
Top
- top