However, this solution doesn't solve the first problem. If you wait for three seconds or so, gzip most likely will be running. One way to solve the second problem is to add the sleep command after the first line. In that case, cpulimit will exit with the message "No process found." Second, on a busy server, cpulimit might start before gzip appears on the process list. cpulimit might then catch the wrong process. First, you can't be entirely sure that no other gzip process is running. In our case, cpulimit can only use 10% of the available CPU resources. The -e parameter tells cpulimit to search for a process named gzip, and -l specifies the percentage of CPU allowed. Most examples on the web will look more or less like this: tar -c myData | gzip -c > myData.gz &īecause tar does not use much CPU power, we only need to throttle gzip. On Ubuntu, you just run the following commands: apt update The installation of cpulimit is pretty simple. You will notice that gzip is a real resource hog and will quickly seize all available CPU resources. Let's say you create your backups with tar and compress them with gzip.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |