New answers tagged limit
We went with cgroups in the end, since there really doesn't seem to be any other approach that would accomplish this. Cgroups allow CPU utilization limiting through the kernel scheduler, using cpu.cfs_period_us and cpu.cfs_quota_us. This avoids the explicit specification of CPU cores.
You could use pv: </mnt/nfs/image.img pv -L 5m >/dev/sda The -L flag limits the throughput to 5 megabytes per second. pv also writes to the stdout so you have to redirect to the target with >.
Probably, you can't. cpulimit's logic is pretty simple, it takes pid of process and simply sending its signal kill -STOP $PID, thereafter kill -CONT $PID, and again, and again, and again, and again...... And measuring the cpu-usage to calculate delay between STOP and CONT. In your case, pstree of complex bash-script would take N*x screens of console. I ...
The groups defined with the @group syntax in the limits.conf file can match groups defined in any group database back-end, i.e. files (/etc/group), nis, ldap, and whatever else nsswitch.conf might support. Assigning a group to an ldap user entry is not done by locating his/her entry somewhere in the hierarchy (like under ou=student in your question) but by ...
Shares are relative among groups. For example, assigning 25% of CPU means that a cgroup will observe "at least" that much of CPU, but it can use more. From the red hat docs on cgroups: Note that shares of CPU time are distributed per all CPU cores on multi-core systems. Even if a cgroup is limited to less than 100% of CPU on a multi-core system, it may ...
Top 50 recent answers are included