2

Admittedly, I am running on a build that is no younger than five years old at this point and the system is not going to be incredibly fast. However, at the same time, the run-times I am observing are so painfully slow it's urged me to create this question to see if there was something I could do to fix this problem.

For example, I was simply unpacking a tarball, albeit quite a large one (~15GB), and the entire process took about 2.5 hours with about 9 minutes of actual CPU time. In contrast, the creation of this tarball took about just a few minutes. Again, the creation was on a fairly adept machine, but 2.5 hours seems far too slow.

As a second example, building a particular project (on the adept machine) took only 19 seconds, with 17 of those seconds being actual CPU time. In contrast, the same process took nearly 9 minutes (on this slower machine) with only about 14 seconds being actual CPU time. As you can see below, the actual CPU time is fairly similar, it's just the total execution time that is the problem.

Adept Machine

real    0m19.245s
user    0m15.809s
sys     0m0.908s

Current Machine

real    8m37.500s
user    0m11.175s
sys     0m3.969s

I include the unfair comparison between the two machines only as a reference point. There is nothing particularly amazing about the adept machine, it's just quite a bit newer.

Ubuntu in general tends to be quite a bit more sluggish than it should be, often times freezing for a few moments before resuming. Opening tasks tends to take a lot of time as well - as much as 20-30 seconds for something as simple as Eclipse; browsers can take 5-10 seconds as well.

  • Ubuntu 14.04 -- Full-disk encryption enabled
  • Core i-7 860 @ 2.8Ghz
  • WD2500JS 7200RPM SATA 3Gbps 8MB Cache

tldr; Why is there such a huge gap between total execution time and actual CPU time? The disk I am using is not that slow. It's hard to believe the disk being the source of such a huge discrepancy. Perhaps it's the first-gen i7?

  • 1
    This seems to be an disk IO issue..check top and iotop after running tar..check how much cpu time is in waiting state.. – heemayl Jun 08 '15 at 19:25
  • @heemayl, after running the tar command, iotop shows 80-90% IO at about 30-40 M/s. – sherrellbc Jun 08 '15 at 19:39
  • Thought so..the problem is actually the disk, it is sufficiently fast to process the requests..wither it has become faulty or the its IO rate is limited.... – heemayl Jun 08 '15 at 19:45
  • @heemayl, what leads you to this conclusion? Also, I do have Ubuntu's full disk encryption enabled. The cpu running on this machine is also a first-gen i7, so perhaps there is some conflicts between the hardware and software. – sherrellbc Jun 08 '15 at 19:49
  • check iotop & top while running the same command in the adept computer.. – heemayl Jun 08 '15 at 19:52
  • @heemayl, that machine is a server on which I do not have root. Although, the time to complete the same task is unfairly biased as you can see from the results above. – sherrellbc Jun 08 '15 at 19:55
  • The cpu time in userspace and kernel space are not much of a difference from your example but the total real time is huge..this could be caused by the fact that the CPU is waiting for the IO operations..you would easily get this by checking the wa in the %Cpu row of top.. – heemayl Jun 08 '15 at 20:03
  • @heemayl, thanks. I did not know that's what wa meant. According to top, when the tar task is running we have wa as approximately 10% and idle time being about 80%. – sherrellbc Jun 08 '15 at 20:06
  • AFAIU the logic concludes to disk related factors..please check your disk read/write and other stuffs..check this http://askubuntu.com/q/87035/216503 – heemayl Jun 08 '15 at 20:17

0 Answers0