Score:0

How to limit tar process to not utilize IO at max?

ag flag

So I have a server where I have important processes running 24/7, and once per day I run a backup of a specific folder like this:

time tar cf ${HOME}/${SNAP_NAME} -C ${DATA_PATH} . &>>${LOG_PATH}

The problem I have is that, during this backup process, all of my other processes stop running, or have very poor performance because tar is utilizing IO disk writing at max.

My question is if there is a way to somehow limit this specific tar process to use only 30-40% (or any number I set) of available IO? I have tried ionice but unfortunately, this doesn't help as it would still write it at max speeds.

sleepyhead avatar
in flag
https://askubuntu.com/a/1049163/374062
sleepyhead avatar
in flag
ionice doesn't limit the Io speed, but prioritizes other processes, those may starve due to CPU or maybe memory usage. Limiting all three you may help, but each situation is unique, so success is not garuenteed. Check with htop what consumes most resources
user1692021 avatar
ag flag
Yes, I already mentioned ionice doesn't help, and that's its disk IO that I need to limit, not CPU or RAM.
cc flag
Search this site for "slow copy" -- basically, system buffers fill up because reads are faster than writes, and the whole system grinds to a crawl. Many solutions are offered for special cases, but once the program (tar) passes off the write buffer, that resource is no longer counted against it. noquota will at least limit buffering of the reads, and tar does offer user buffering -- might help a bit.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.