Cgroups-cpu: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) |
Thomas (Diskussion | Beiträge) |
||
| Zeile 29: | Zeile 29: | ||
*cgset -r cpu.shares=512 cpulimited | *cgset -r cpu.shares=512 cpulimited | ||
| − | = | + | =Testprogramm= |
*apt install mathomatic-primes | *apt install mathomatic-primes | ||
=Mit Einschränkung(Funktioniert nicht wie gewünscht)= | =Mit Einschränkung(Funktioniert nicht wie gewünscht)= | ||
*cgexec -g blkio:/mygroup dd if=/dev/zero of=/tmp/test count=50 bs=100M | *cgexec -g blkio:/mygroup dd if=/dev/zero of=/tmp/test count=50 bs=100M | ||
Version vom 14. Oktober 2017, 16:42 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
Mit Einschränkung(Funktioniert nicht wie gewünscht)
- cgexec -g blkio:/mygroup dd if=/dev/zero of=/tmp/test count=50 bs=100M