Cgroups-cpu: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) |
Thomas (Diskussion | Beiträge) |
||
| Zeile 3: | Zeile 3: | ||
*cgcreate -g cpu:/lesscpulimited | *cgcreate -g cpu:/lesscpulimited | ||
| − | =Welche Parameter sind | + | =Welche Parameter sind vorhanden= |
| − | *cgget -g | + | *cgget -g cpu /cpulimited |
<pre> | <pre> | ||
| − | / | + | /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 | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
</pre> | </pre> | ||
Version vom 14. Oktober 2017, 15:17 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
Geschwindigkeit einschränken
- echo "8:16 1048576" > /sys/fs/cgroup/blkio/mygroup/blkio.throttle.write_bps_device
Ohne Einschränkung
- dd if=/dev/zero of=/tmp/test count=50 bs=100M
50+0 records in 50+0 records out 5242880000 bytes (5.2 GB, 4.9 GiB) copied, 23.0043 s, 228 MB/s
Mit Einschränkung(Funktioniert nicht wie gewünscht)
- cgexec -g blkio:/mygroup dd if=/dev/zero of=/tmp/test count=50 bs=100M