Multithreaded backup

Whether restic can set multi-threaded backup. At present, I can see that the restic backup is single threaded, which leads to a very high utilization rate of my single CPU. If I use multithreading, the utilization rate of a single CPU will be reduced.

Hm, I don’t understand what your question is. Within restic, the backup process is multi-threaded.

Hi, thank you for your reply.
Restic takes up a lot of CPU and memory during backup. Whether it is to a new repo or to an old repo, is this normal? My system has 4cpu 8 core and 128GB memory
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
56409 root 20 0 4616416 4.248g 6628 S 283.3 1.7 136:37.64 restic
12706 root 20 0 9.958g 9.847g 6656 S 177.8 3.9 85:56.54 restic

Your questions are a bit vague. When processing, restic does a lot of things, and this naturally takes a lot of resources. It’s perfectly natural that restic takes a lot of CPU and a bunch of memory. How much “a lot” is depends on many different factors.

Is there an actual problem here or what are we discussing?

yes. I would like to know the operating system configuration requirements for restic backup.
I have a restic server, which is shared with the client through NFS. The client will export the data to the NFS shared directory in the evening. During the day, restic will back up these NFS shared directories. At present, my restic pool has about 30tb. When I backup, a restic backup process needs about 15GB of memory. If my restic pool grows to 50tb, how much GB of memory does a restic backup process need?

There are no specified system requirements. The restic binary runs on the operating systems and platforms that you can download it for. Please note that there’s also beta releases that contain a lot of improvements, so if you feel you are having trouble with the resource usage, I suggest using the latest beta download instead. You may also build your own restic binary from the sources, instructions are in the repository.

How much memory and CPU restic needs and use depends on the data you back up and how you back it up, etc. In general the resource usage isn’t a problem, if you have an actual problem please be more specific.

Noone can tell you any specific numbers, it depends on how well your data deduplicates and things like that. But given that your current set is pretty large and that the rest of your data presumably is pretty similar, I would say you can make a gross estimate that it’s pretty linear in growth, and hence would be around 25 GB memory?

You can run restic with the environment variable GOGC=20 to see if this lessens memory usage for you, and please also make sure to try/run the latest beta build, as it contains a lot of improvements over the latest release. Please let us know how this helps or not after you try it :slight_smile: