2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-29 16:23:59 +00:00

Merge pull request #1272 from jniggemann/doc-faq-add-prio

doc: FAQ: Add info on IO and CPU prioritization
This commit is contained in:
Alexander Neumann 2017-09-23 20:08:17 +02:00
commit d41dce5ecb

View File

@ -50,3 +50,43 @@ backups happens in :issue:`533`.
root). root).
.. _accessible only to that user: https://security.stackexchange.com/questions/14000/environment-variable-accessibility-in-linux/14009#14009 .. _accessible only to that user: https://security.stackexchange.com/questions/14000/environment-variable-accessibility-in-linux/14009#14009
How to prioritize restic's IO and CPU time
------------------------------------------
If you'd like to change the **IO priority** of restic, run it in the following way
::
$ ionice -c2 -n0 ./restic -r /media/your/backup/ backup /home
This runs ``restic`` in the so-called best *effort class* (``-c2``),
with the highest possible priority (``-n0``).
Take a look at the `ionice manpage`_ to learn about the other classes.
.. _ionice manpage: https://linux.die.net/man/1/ionice
To change the **CPU scheduling priority** to a higher-than-standard
value, use would run:
::
$ nice --10 ./restic -r /media/your/backup/ backup /home
Again, the `nice manpage`_ has more information.
.. _nice manpage: https://linux.die.net/man/1/nice
You can also **combine IO and CPU scheduling priority**:
::
$ ionice -c2 nice -n19 ./restic -r /media/gour/backup/ backup /home
This example puts restic in the IO class 2 (best effort) and tells the CPU
scheduling algorithm to give it the least favorable niceness (19).
The above example makes sure that the system the backup runs on
is not slowed down, which is particularly useful for servers.