4

I'm using tar to backup my server once every day. Even though CPU usage (of the tar command and the system overall) doesn't go over 10%, my system load is like 3.98 3.71 3.82 when the script is running. (on a 2 core 4 thread system)

Why does tar show so little CPU in practice, while producing such a high system load in the meanwhile. And, most importantly, should I be worried?

I don't use compression, just a pure tarball. I compress at the start of each new month.

  • 1
    Without more data it's hard to say with certainty but it's probably I/O load rather than CPU load. – DopeGhoti Oct 4 '18 at 19:49
  • 1
    It indeed turns out that system load includes the I/O (wait). I was not aware of this, but now I know. Thank you for your contribution. – MicroParsec Oct 4 '18 at 19:53
4

You see a high system load because tar spends a lot of time waiting for I/O. You see a low CPU usage because tar uses very little CPU time: it's mostly just copying some bytes when the disk delivers them. Linux includes time waiting for I/O in the load average (unlike many other Unix variants), but not in a process's CPU time. (Source: https://linuxtechsupport.blogspot.com/2008/10/what-exactly-is-load-average.html via Wikipedia)

There's nothing to be worried about. You asked the computer to do an I/O-bound operation and it's busy doing some I/O. Business as expected.

  • That explains a lot actually. I should not be worried then, right? The computer isn't warming up even, so it just seemed a bit fishy to be honest. I didn't know that I/O wait was included in system load, so that clears up a lot. Thank you very much. – MicroParsec Oct 4 '18 at 19:51
  • If the I/O times start increasing for unexplained reasons though, you may want to check dmesg to make sure that there aren't any disk problems. A headless server that I was monitoring had a failing drive and started getting slow because of retries. – ErikF Oct 4 '18 at 22:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.