1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-22 15:57:07 +00:00

document minPackSize

This commit is contained in:
Kyle Brennan 2022-04-30 15:16:00 -07:00 committed by Michael Eischer
parent 1e3f05c3f1
commit e43be84eb8
2 changed files with 23 additions and 0 deletions

View file

@ -8,6 +8,7 @@
- for subsections - for subsections
^ for subsubsections ^ for subsubsections
" for paragraphs " for paragraphs
######################## ########################
Tuning Backup Parameters Tuning Backup Parameters
######################## ########################
@ -48,3 +49,22 @@ which will compress very fast), ``max`` (which will trade backup speed and CPU u
slightly better compression), or ``off`` (which disables compression). Each setting is slightly better compression), or ``off`` (which disables compression). Each setting is
only applied for the single run of restic. The option can also be set via the environment only applied for the single run of restic. The option can also be set via the environment
variable ``RESTIC_COMPRESSION``. variable ``RESTIC_COMPRESSION``.
Pack Size
=========
In certain instances, such as very large repositories, it is desired to have larger pack
sizes to reduce the number of files in the repository. Notable examples are OpenStack
Swift and some Google Drive Team accounts, where there are hard limits on the total
number of files. This can be achieved by either using the ``--min-packsize`` flag
or defining the ``$RESTIC_MIN_PACKSIZE`` environment variable. Restic currently defaults
to a 16MB minimum pack size.
The side effect of increasing the pack size is increased client memory usage. A bit of
tuning may be required to strike a balance between memory usage and number of pack files.
Restic uses the majority of it's memory according to the pack size, multiplied by the number
of parallel writers. For example, if you have 4 parallel writers (restic creates one per
available CPU), With a minimum pack size of 64 (Megabytes), you'll get a *minimum* of 256MB
of memory usage.

View file

@ -56,6 +56,7 @@ Usage help is available:
--key-hint key key ID of key to try decrypting first (default: $RESTIC_KEY_HINT) --key-hint key key ID of key to try decrypting first (default: $RESTIC_KEY_HINT)
--limit-download int limits downloads to a maximum rate in KiB/s. (default: unlimited) --limit-download int limits downloads to a maximum rate in KiB/s. (default: unlimited)
--limit-upload int limits uploads to a maximum rate in KiB/s. (default: unlimited) --limit-upload int limits uploads to a maximum rate in KiB/s. (default: unlimited)
--min-packsize uint set min pack size in MiB. (default: $RESTIC_MIN_PACKSIZE or 16)
--no-cache do not use a local cache --no-cache do not use a local cache
--no-lock do not lock the repository, this allows some operations on read-only repositories --no-lock do not lock the repository, this allows some operations on read-only repositories
-o, --option key=value set extended option (key=value, can be specified multiple times) -o, --option key=value set extended option (key=value, can be specified multiple times)
@ -128,6 +129,7 @@ command:
--key-hint key key ID of key to try decrypting first (default: $RESTIC_KEY_HINT) --key-hint key key ID of key to try decrypting first (default: $RESTIC_KEY_HINT)
--limit-download int limits downloads to a maximum rate in KiB/s. (default: unlimited) --limit-download int limits downloads to a maximum rate in KiB/s. (default: unlimited)
--limit-upload int limits uploads to a maximum rate in KiB/s. (default: unlimited) --limit-upload int limits uploads to a maximum rate in KiB/s. (default: unlimited)
--min-packsize uint set min pack size in MiB. (default: $RESTIC_MIN_PACKSIZE or 16)
--no-cache do not use a local cache --no-cache do not use a local cache
--no-lock do not lock the repository, this allows some operations on read-only repositories --no-lock do not lock the repository, this allows some operations on read-only repositories
-o, --option key=value set extended option (key=value, can be specified multiple times) -o, --option key=value set extended option (key=value, can be specified multiple times)
@ -440,3 +442,4 @@ time it is used, so by looking at the timestamps of the sub directories of the
cache directory it can decide which sub directories are old and probably not cache directory it can decide which sub directories are old and probably not
needed any more. You can either remove these directories manually, or run a needed any more. You can either remove these directories manually, or run a
restic command with the ``--cleanup-cache`` flag. restic command with the ``--cleanup-cache`` flag.