My systems go under heavy load when I runsudo tar czf /media/masi/ntfsDisc/backup_home.tar.gz $HOME/Fans goes to max etc. I would like to find a better balance between computing and power consumption. I cannot monitor the process enough well. You cannot slow it down during the computation when run like that. Intuition: add some sleep there but how. I really would like to have an xargs approach too, to compare it to ready products. My topsI do top at resttop - 09:34:34 up 19:14,  1 user,  load average: 0.52, 0.42, 0.24Tasks: 236 total,   1 running, 235 sleeping,   0 stopped,   0 zombie%Cpu(s):  1.5 us,  1.1 sy,  0.0 ni, 97.4 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 sKiB Mem :  8115460 total,   257036 free,  3006452 used,  4851972 buff/cacheKiB Swap:  8326140 total,  8321852 free,     4288 used.  4369448 avail Mem I do top 1 minute after the nice tar czf ...top - 09:48:49 up 19:28,  1 user,  load average: 1.63, 0.99, 0.62Tasks: 244 total,   2 running, 242 sleeping,   0 stopped,   0 zombie%Cpu(s):  1.4 us,  0.9 sy, 24.1 ni, 73.2 id,  0.3 wa,  0.0 hi,  0.1 si,  0.0 sKiB Mem :  8115460 total,   127644 free,  3237648 used,  4750168 buff/cacheKiB Swap:  8326140 total,  8321868 free,     4272 used.  4092404 avail Mem   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND   28831 root      30  10    4640   1600   1316 R  97.7  0.0   1:43.24 gzip       9573 root      20   0   21196   2860   1772 S   2.3  0.0  13:16.29 mount.nt+   842 root      20   0  380136  63780  48568 S   1.7  0.8  23:57.16 Xorg      I do top 10 minutes after the start top - 10:00:33 up 19:40,  1 user,  load average: 1.98, 2.13, 1.50Tasks: 253 total,   2 running, 251 sleeping,   0 stopped,   0 zombie%Cpu(s):  2.6 us,  2.8 sy, 21.4 ni, 73.0 id,  0.2 wa,  0.0 hi,  0.0 si,  0.0 sKiB Mem :  8115460 total,   130408 free,  4432384 used,  3552668 buff/cacheKiB Swap:  8326140 total,  8321948 free,     4192 used.  2837616 avail Mem   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND   28831 root      30  10    4640   1600   1316 R  87.0  0.0  11:49.08 gzip       9573 root      20   0   21196   2860   1772 S  13.6  0.0  14:45.84 mount.nt+   842 root      20   0  384936  66304  51092 S   2.0  0.8  24:18.44 Xorg      28830 root      30  10   37584   3096   2688 S   1.3  0.0   0:14.50 tar        1674My PV tar cf - $HOME/ | pv | gzip > media/masi/ntfsDisc/testbackup.tar.gzat 1 min, 13 - 22 MB/s; at 2 min, 14 - 22 MB/s; at 3 min, 5 - 7 MB/s; at 4 min, 5 - 22 MB/s; at 5 min, 15 - 17 MB/s; at 6 min, 8 - 24 MB/s; at 7 min, 16 - 20 MB/sat 19 min, 18-21 MB/s and fans little/steadily on such that you can hear themSystem: Ubuntu 16.04 64 bitHardware: Macbook Air 2013-mid   
How to Distribute Computing of `tar czf` for Longer Time?
backup;tar;power management;xargs;sleep
The commandtar czf /media/masi/ntfsDisc/backup_home.tar.gz $HOME/is the same as this:tar cf - $HOME/ | gzip > /media/masi/ntfsDisc/backup_home.tar.gzWhen you ran top, it showed the gzip was using up around 100% of one cpu thread. The NTFS FUSE software is using up a nonzero amount of CPU, too, but essentially you're CPU-bound because of that gzip. Your load average is around 2, and with 2 cores of 2 threads each, you're not overloading your system.But, if your goal is to reduce the max CPU usage (because the fans are running at their max), one easy way to do this is to slow down the rate of the data that's being fed to gzip. You ran the testtar cf - $HOME/ | pv | gzip > /media/masi/ntfsDisc/testbackup.tar.gzand pv indicated the peak transfer rate into gzip was 20MiB/sec. I'd recommend cutting that in half by giving pv the -L 10m option.tar cf - $HOME/ | pv -L 10m | gzip > /media/masi/ntfsDisc/testbackup.tar.gzTry adjusting that rate limit higher or lower until you get the CPU usage you like.