Hands-on task
The index rebuild on short rations: cpu.max
The server is rebuilding the search index with /opt/reindex/run.sh. It takes a whole core, and the API on the same server has started to slow down. You can't stop or restart the rebuild: it takes about an hour, and after a restart it begins from scratch.
Restrict the already running process with cgroup v2: create a group reindex and make the rebuild get no more than 20% of one core. The process must keep running — with the same PID.
- cgroups
- cgroup v2
- cpu.max
- throttling