0

I have Lenovo Thinkpad E531, Core i3. I feel my machine is not working properly, Like opening applications, File to file opening, Everything takes a bit extra time both on linux and windows, But now i am using ubuntu 16.04.

So i used stress-ng.

With the following command stress-ng --cpu 4 --cpu-method matrixprod --metrics-brief --perf -t 60.

I got the following results:

stress-ng: info:  [4717] dispatching hogs: 4 cpu
stress-ng: info:  [4717] cache allocate: default cache size: 3072K
stress-ng: info:  [4717] successful run completed in 60.01s (1 min, 0.01 secs)
stress-ng: info:  [4717] stressor      bogo ops real time  usr time  sys time   bogo ops/s   bogo ops/s
stress-ng: info:  [4717]                          (secs)    (secs)    (secs)   (real time) (usr+sys time)
stress-ng: info:  [4717] cpu              16728     60.00    220.07      0.48       278.78        75.85
stress-ng: info:  [4717] cpu:
stress-ng: info:  [4717]            486,809,130,288 CPU Cycles                     8.11 B/sec
stress-ng: info:  [4717]            299,665,293,760 Instructions                   4.99 B/sec (0.616 instr. per cycle)
stress-ng: info:  [4717]             23,618,473,352 Cache References               0.39 B/sec
stress-ng: info:  [4717]                155,046,972 Cache Misses                   2.58 M/sec ( 0.66%)
stress-ng: info:  [4717]            340,515,406,760 Stalled Cycles Frontend        5.67 B/sec
stress-ng: info:  [4717]            173,093,935,356 Stalled Cycles Backend         2.88 B/sec
stress-ng: info:  [4717]             36,696,289,676 Branch Instructions            0.61 B/sec
stress-ng: info:  [4717]                289,823,652 Branch Misses                  4.83 M/sec ( 0.79%)
stress-ng: info:  [4717]             22,175,572,704 Bus Cycles                     0.37 B/sec
stress-ng: info:  [4717]            510,047,929,756 Total Cycles                   8.50 B/sec
stress-ng: info:  [4717]                        776 Page Faults Minor             12.93 sec  
stress-ng: info:  [4717]                          0 Page Faults Major              0.00 sec  
stress-ng: info:  [4717]                     22,952 Context Switches             382.46 sec  
stress-ng: info:  [4717]                        188 CPU Migrations                 3.13 sec  
stress-ng: info:  [4717]                          0 Alignment Faults               0.00 sec  

Now i don't know whether the results are fine or if its ambiguous?

Update

As @ColinIanKing author of stress-ng, Mentioned in the answer comment, The results of vmstat 1 is :

procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2  0      0 213980  69832 1450000    0    0   672     0  793 3419 26  2 69  3  0
 1  0      0 213360  69832 1450060    0    0     0   312 1155 3243 30  2 68  0  0
 2  0      0 213420  69848 1450072    0    0     4   120  991 2534 29  2 68  2  0
 1  0      0 213172  69848 1450072    0    0     0     0 1306 2173 28  2 70  0  0
 2  0      0 174192  70008 1465956    0    0  4964    96 2152 8701 29  5 48 18  0
 0  0      0 141592  70136 1467132    0    0  4240     0 1838 6137 15  4 70 11  0
 2  0      0 129532  70136 1466920    0    0   296    12 1718 4069 16  3 80  0  0
 0  0      0 128664  70136 1467084    0    0   128     0 1436 3546 15  3 82  0  0
 1  0      0 138956  70136 1467212    0    0   128     0 1508 3388 14  3 83  0  0
 0  0      0 213120  70152 1452916    0    0  1284   128 1817 6011 23  4 70  4  0
 0  0      0 212920  70152 1452928    0    0     0     0 1075 1948  3  2 95  0  0
 0  0      0 212720  70188 1452640    0    0    24   484 1218 2970  5  2 87  5  0
 0  0      0 212812  70188 1452640    0    0     0     0  361 1161  3  1 96  0  0
 0  0      0 212812  70188 1452640    0    0     0     0  251  554  2  1 98  0  0
 0  0      0 212812  70188 1452512    0    0     0     0  302  830  2  1 97  0  0
 0  0      0 212812  70188 1452512    0    0     0     0  250  552  1  1 98  0  0
 0  0      0 212728  70196 1452512    0    0     0    36  527 1786  6  1 93  1  0
 0  0      0 217416  70196 1447648    0    0     0     0  296  738  2  1 97  0  0
 0  0      0 205140  70196 1459488    0    0     0     0  405 1429  4  2 94  0  0
 0  0      0 205140  70196 1459788    0    0     0    12  499 2010  5  1 94  0  0
 2  0      0 205048  70196 1459820    0    0     0     0 1127 3336 14  3 83  0  0

And results of free -m :

              total        used        free      shared  buff/cache   available
Mem:           3518        1861         280         425        1376         912
Swap:             0  

In this duration i played a video clip via VLC.

Comrade
  • 215
  • 1
  • 4
  • 16
  • Well cpu performance is not really a boolean, so you can't say "this is ok", "that is not ok". Also, remember that the i3 is not really a powerhouse. – NeoTheThird Jan 28 '17 at 11:35
  • @NeoTheThird I know but at least the it should should work normal. My machine responds a bit slow. – Comrade Jan 28 '17 at 11:37
  • Maybe it's not the CPU that's holding you back. Do you have a dedicated GPU? How much RAM do you have? The Unity desktop is quite heavy on resources for slow machines, so maybe you'd be better of with Lubuntu, as it is known to be a little faster. – NeoTheThird Jan 28 '17 at 11:59
  • I was using `ubuntu 16.04` on `core2duo` and everything was fine. Now i am using lenovo thinkpad E531, 4Gb Ram , Intel HD 3000 Integrated Graphics. 320Gb Hard drive. And i know Lubuntu is fast, But this machine is fine too for Ubuntu. – Comrade Jan 28 '17 at 14:09
  • 1
    The stress-ng stream stressor is a better indicator of overall memory bandwidth and CPU throughput. (Speaking as the author of stress-ng). – Colin Ian King Jan 28 '17 at 16:39
  • @colinianKing Nooooo, Really ? So the results are fine ? – Comrade Jan 28 '17 at 17:11
  • You seem to have plenty of CPU cycles, so I guess the sluggishness is more to do with the I/O, that is, when you start applications it's taking a while to read the application off disk. – Colin Ian King Jan 31 '17 at 07:34
  • @colinianking So i got a bad hard drive then ? – Comrade Jan 31 '17 at 09:14
  • I doubt it, best to give it some kind of disk benchmark test to see if it is sane. However, I looked up the specs of the machine and it seems like the default drive is a 5400rpm model, so that's a bit on the slow side. The slower it spins, the longer the latency is to fetch data. This is especially noticeable if you have a lot of random I/O patterns. – Colin Ian King Jan 31 '17 at 14:13

1 Answers1

1

The delay you are talking about will always be there. It takes some time to load apps or files from the disc to ram. You can reduce this delay by switching to a faster hard drive or a solid state drive but it can't be eliminated. Speed of the mass storage media has always been a bottleneck, and the situation doesn't seem to change very soon. If the app runs smoothly once it has finished loading, there is nothing to worry about.

saga
  • 190
  • 11
  • Yeah i know that it will take its time, But i takes a bit extra time, Suppose i have a series of videos, When i open one and play it for a while then close VLC and then back to another one then it takes around 5-10 seconds, Which is obviously much time. And that is the same for every task in OS. – Comrade Jan 28 '17 at 14:21
  • 1
    does the app(vlc) runs fine after loading. – saga Jan 28 '17 at 14:50
  • 1
    If you run vmstat 1 you can see where the CPU cycles are going. The si and so fields show if you have any swap in and swap out activity (hence indicating you are low in physical memory). The bi an bo fields show block in and block out I/O activity (showing that you may be just I/O bound and the delays are due to slow media). The us and sy fields show time in userspace or system (kernel) space, showing how much CPU is being used. Refer to the vmstat man page for more details. I use this tool to get a rough idea of why systems look sluggish. – Colin Ian King Jan 28 '17 at 16:44
  • @saga yes the VLC then runs smoothly. – Comrade Jan 28 '17 at 17:12
  • can you provide the output of `free -m` – saga Jan 28 '17 at 17:17
  • @saga Question updated, You got everything now. – Comrade Jan 28 '17 at 17:24