New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce memory consumption with command line option #450
Comments
Hey, thanks for your interest in restic. The number of around 300MiB of ram that I mentioned in the talk is used for two things (mainly):
To summarize my points above: It's planned and will be implemented at some point in time. |
Sounds good to me. I'd like to keep this issue open to track that feature, then. |
Agreed. |
I'd be interested in this topic also from a server perspective, so not necessarily low memory but "still not enough". :) For example I've got a mail server with ~950GB of data ( Thanks! |
My experience is around 4GB of RAM for 1.5TB repo size (for backup). prune takes even more (~9-10GB of RAM). Memory usage depends mostly not on data size on particular machine, but mostly on repository size. So it is impossible to backup 100KB file on machine with 2GB of RAM (no swap) if restic repository itself is ~1TB. |
Here:
|
Is there any progress on this? Love restic, but my backups don't complete anymore due to memory exhaustion (1.5TB repository, uses ~23G RAM, b2 backend). Afaik, currently the concurrency can only be modified by modifying the source itself (#979 (comment)), but this isn't really maintainable. |
Has anything changed in terms of memory usage requirements? |
I am also running into this issue. 2GB system 250GB restic repo. Running: ionice -c 3 nice -n 19 ~/local/bin/restic -r /mnt/restic -p rk check --read-data-subset 3/7 (also using 4/14 to try to reduce memory use from 3/7) takes 1.7G. It can take 10 or 12 hours to complete the command because the poor system is swapping its brains out. Also the system is pretty much useless for anything else because of the swapping. I like restic but this isn't sustainable. |
Can someone clarify what the actual suggestion in this issue is? I mean, if the memory consumption/requirements can be made smaller, why should we not just do that and instead have a command line switch to enable using less memory? |
I assume that allocating less space, if possible, would mean the process is slower, so that would warrant not doing this by default? |
There have been improvements with respect to memory usage already and some others are in the pipeline. That said, there are of course possibilites to further tune down memory usage, especially trading for speed. I started working on index-related possibilies in #2794 |
A proper solution for this will most likely use an on-disk repository index or allow clients to only load parts of the index as discussed in #1988. |
Sorry it doesn't work for you with the current setup! |
It is by now possible to somewhat adjust the restic memory usage by limiting the number of used CPU cores, the number of backend connections and the |
Hi @fd0! Is just finished watching the video from your recent talk that is linked in the blog and really came to like restic and the philosophy behind the tool and the development process.
At one point in the talk it is mentioned that restic currently allocates around 300MB of RAM for reading multiple files and is therefore not suited to run on, e.g., a Raspberry Pi. I wondered whether you would consider adding a command line option for manually reducing that number at runtime to allow for restic to be used on low-memory ARM devices. Next to the ubiquitous RasPi I was thinking of backing up Android and Sailfish devices.
The text was updated successfully, but these errors were encountered: