You need to temporarily run a command with a lower I/O priority so a backup doesn't hurt the database. How?
IntermediateScenarioProcesses, services and systemd
Answer
Situation read → CPU and I/O niceness, or cgroup I/O weights.
What I'd do →
nice -n 19 ionice -c3 tar -czf /backup/data.tgz /data
# or with cgroups:
sudo systemd-run --scope -p IOWeight=10 -p CPUWeight=10 tar -czf /backup/data.tgz /data
Why → ionice -c3 (idle class) only gets disk time when nobody else wants it; cgroup weights work on cgroup v2 with any I/O scheduler that supports them.
Interview tip → Mention that ionice classes depend on the I/O scheduler; IOWeight is the more modern approach.
More on Processes, services and systemd
Your team has a Python API that someone starts with `nohup python app.py &`. Make it a proper service running as a non-root user.BeginnerThe service you created must bind to port 443, but it runs as a non-root user. How?BeginnerYou need to change one setting (memory limit) in a vendor-supplied unit file without editing it. How?BeginnerA service depends on a database on the same host and fails at boot because the DB isn't ready. How do you fix the ordering?IntermediateA service keeps crashing and systemd stops restarting it after a few attempts. How do you tune this?IntermediateA long-running app must reload its config without dropping connections. How do you wire this into systemd?Intermediate