Manjaro Linux Forum

Technical Issues and Assistance => Kernel & Hardware => Topic started by: Rob on 20. April 2016, 19:15:39

Title: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: Rob on 20. April 2016, 19:15:39
Continuation of this thread:
https://forum.manjaro.org/index.php?topic=33071.0


New test kernel:

Difference from current standard Manjaro kernels:
Just to be safe, make sure you have some kernel other than the 4.4 series installed on your system, and ensure it boots and works, before trying this replacement 4.4 kernel.

To install:
Code: [Select]
sudo pacman -U http://paradoxcomputers.com.au/manjaro/packages/desktop-kernel-test/linux44{,-headers}-4.4.7-1.5-"$(uname -m)".pkg.tar.xz
To go back to the stock Manjaro kernel:
Code: [Select]
sudo pacman -S linux44{,-headers}


This is the 4.4.7 kernel, which is only in Unstable & Testing branches so far and breaks module compatibility.
If you are on Stable branch and you use any extramodules (such as the proprietary nVidia or AMD drivers), at the time of writing, you'll need to either swap to Testing branch or you can just install the module package from Testing branch.
Do this before you reboot. The Xorg-server will not start if you don't. (but you can press ctrl+alt+F2 to get a console)

nVidia:
Code: [Select]
sudo pacman -U http://manjaro.mirror.serversaustralia.com.au/testing/extra/"$(uname -m)"/linux44-nvidia-1:361.42-2-"$(uname -m)".pkg.tar.xzTo go back to the module from your current branch (if changing kernel back as described above):
Code: [Select]
sudo pacman -S linux44-nvidia
AMD Catalyst:
Code: [Select]
sudo pacman -U http://manjaro.mirror.serversaustralia.com.au/testing/extra/"$(uname -m)"/linux44-catalyst-1:15.201.1151-8-"$(uname -m)".pkg.tar.xzTo go back to the module from your current branch (if changing kernel back as described above):
Code: [Select]
sudo pacman -S linux44-catalyst


Please compare to the normal 4.4 kernel and report your observations.




Source package and tuning patches are up for those interested:
600Hz patch (http://paradoxcomputers.com.au/manjaro/packages/desktop-kernel-test/600hz-kernel.patch)
CPU tuning patch (http://paradoxcomputers.com.au/manjaro/packages/desktop-kernel-test/zen-cpu-20160420.patch)

http://paradoxcomputers.com.au/manjaro/packages/desktop-kernel-test/
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: vnvman on 20. April 2016, 21:27:07
Installing right now. Will report back soon  :)
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: Centrin0 on 21. April 2016, 05:16:06
Sorry, wrong translate post :)
Just fix my problem.

Now, test this kernel.

Do you read about this patchset for kernel: https://pf.natalenko.name/ ?
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: curiouseag on 21. April 2016, 07:42:01
Sorry, wrong translate post :)
Just fix my problem.

Now, test this kernel.

Do you read about this patchset for kernel: https://pf.natalenko.name/ (https://pf.natalenko.name/) ?


yes he did, I also already posted it in the 2nd thread. This is the 4th! :)
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: jbMacAZ on 21. April 2016, 08:39:30
Preliminary review:  Loaded 4.4.7-1.5-600Hz onto a Dell laptop.  Seems fine, I let it do today's major update .46GB.  The UI remained responsive while downloading and installing.  Streams video fine, long pages scroll well - it's a keeper, until something better comes along.  I won't have a chance to test it on the T100-CHI any time soon, I'm running some tests for an unrelated project.  But 500Hz and 625Hz (without Zen tuning) ran well during casual testing, so I wouldn't expect any issues at 600Hz. 

I appreciate the effort to squeeze more out of these massive kernels.
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: torvic9 on 21. April 2016, 16:31:38
I tested throughput again on my old ThinkPad, with linpack, sysbench, gtkperf and HandBrake transcoding, comparing your kernel to stock kernel.

Result: stock kernel has *slightly* better throughput and overall better results in every test, but the difference is extremely small (around 1%) and absolutely negligible.

Linpack:      11,64 GFlops (Rob) -- 11,79 GFlops (stock)
Sysbench:   CPU: 25,96 s -- 25,89 s
                  Mem (read/write): 143,22 s / 139,96 s -- 140,04 s / 139,39 s
                  Threads: 14,2 s -- 13,7 s
Gtkperf:      103,13 s -- 100,75 s
Handbrake: 1911 s -- 1908 s

Scrolling heavy web pages in Firefox seems to be more fluent, haven't tested responsiveness otherwise.

Good job!
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: Centrin0 on 21. April 2016, 18:01:42
Also use firefox. It works more smoothly.
Need add this kernel as dependence for firefox  :D
Don't test any benchmark.
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: curiouseag on 21. April 2016, 21:54:34
running very well on my system! And I got improved latencies too!



kernel of this thread
Code: [Select]

Using 1791346 loops per ms, running every load for 30 seconds
Benchmarking kernel 4.4.7-1.5-MANJARO at datestamp 201604212129


--- Benchmarking simulated cpu of Audio in the presence of simulated ---
Load Latency +/- SD (ms)  Max Latency   % Desired CPU  % Deadlines Met
None    0.1 +/- 0.1        0.2 100         100
Video    0.0 +/- 0.0        0.1 100         100
X    0.1 +/- 0.1        0.2 100         100
Burn    0.0 +/- 0.0        0.0 100         100
Write    0.1 +/- 0.1        0.3 100         100
Read    0.0 +/- 0.0        0.1 100         100
Compile    0.0 +/- 0.1        2.8 100         100


--- Benchmarking simulated cpu of Video in the presence of simulated ---
Load Latency +/- SD (ms)  Max Latency   % Desired CPU  % Deadlines Met
None    0.0 +/- 0.0        0.1 100         100
X    0.1 +/- 0.1        0.1 100         100
Burn   16.6 +/- 16.7      22.7 100       0.333
Write    0.0 +/- 0.0        0.2 100         100
Read    0.0 +/- 0.0        0.1 100         100
Compile   16.3 +/- 16.6      33.3 99.8        2.63


--- Benchmarking simulated cpu of X in the presence of simulated ---
Load Latency +/- SD (ms)  Max Latency   % Desired CPU  % Deadlines Met
None    0.4 +/- 2.7       22.0 98.7          97
Video    1.6 +/- 6.8       35.0 90.8        88.3
Burn   77.8 +/- 108.0    258.0 15.3        5.88
Write    0.2 +/- 1.6       19.0 100          99
Read    0.0 +/- 0.3        3.0   99          98
Compile   76.8 +/- 105.7    260.0 15.3        5.83


--- Benchmarking simulated cpu of Gaming in the presence of simulated ---
Load Latency +/- SD (ms)  Max Latency   % Desired CPU
None    0.5 +/- 3.0       22.6 99.5
Video    0.0 +/- 0.0        0.0 100
X    0.2 +/- 2.8       50.3 99.8
Burn 133.3 +/- 148.3    265.2 42.9
Write    0.0 +/- 0.2        2.7 100
Read    1.6 +/- 1.7        3.2 98.4
Compile 121.1 +/- 133.0    266.7 45.2




kernel of the last thread
Code: [Select]

Using 1791346 loops per ms, running every load for 30 seconds
Benchmarking kernel 4.4.7-1.4-MANJARO at datestamp 201604180714




--- Benchmarking simulated cpu of Audio in the presence of simulated ---
Load Latency +/- SD (ms)  Max Latency   % Desired CPU  % Deadlines Met
None    0.1 +/- 0.1        0.2 100         100
Video    0.0 +/- 0.0        0.0 100         100
X    0.0 +/- 0.1        2.0 100         100
Burn    0.0 +/- 0.0        0.0 100         100
Write    0.0 +/- 0.1        0.3 100         100
Read    0.0 +/- 0.0        0.1 100         100
Compile    0.0 +/- 0.0        0.0 100         100




--- Benchmarking simulated cpu of Video in the presence of simulated ---
Load Latency +/- SD (ms)  Max Latency   % Desired CPU  % Deadlines Met
None    0.1 +/- 0.1        0.1 100         100
X    0.0 +/- 0.0        0.1 100         100
Burn   16.7 +/- 16.7      16.7 100       0.111
Write    0.1 +/- 0.1        0.2 100         100
Read    0.0 +/- 0.0        0.1 100         100
Compile   16.8 +/- 16.9      33.4 98.2       0.331




--- Benchmarking simulated cpu of X in the presence of simulated ---
Load Latency +/- SD (ms)  Max Latency   % Desired CPU  % Deadlines Met
None    0.7 +/- 3.5       24.0   98        95.4
Video    5.0 +/- 11.9      40.0 68.3        58.3
Burn   77.7 +/- 106.6    261.0 14.8        5.37
Write    0.2 +/- 1.8       24.0 98.4          98
Read    0.0 +/- 0.3        3.0 98.4        97.4
Compile   81.3 +/- 110.4    272.0 13.8        4.82




--- Benchmarking simulated cpu of Gaming in the presence of simulated ---
Load Latency +/- SD (ms)  Max Latency   % Desired CPU
None    0.0 +/- 0.0        0.0 100
Video    0.0 +/- 0.0        0.0 100
X    0.0 +/- 0.0        0.0 100
Burn 118.0 +/- 131.6    285.1 45.9
Write    1.7 +/- 7.6       54.9 98.3
Read    0.7 +/- 3.0       45.4 99.3
Compile 144.4 +/- 160.6    304.1 40.9
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: curiouseag on 21. April 2016, 21:59:27
Scrolling heavy web pages in Firefox seems to be more fluent, haven't tested responsiveness otherwise.

Good job!


I only tested with interbench and as you can see in my last post, on my system it is an improvement.
If you do not mind, test on your system. run interbench as root and NOT in /tmp. Use a local dir. The results are system specific.


here the post after I found it with infos : https://forum.manjaro.org/index.php?topic=33071.msg270954#msg270954
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: Rob on 22. April 2016, 02:17:04
I ran interbench a number of times on different kernels and tried repeat tests, it seems unreliable and inconsistent, and more affected by other happenings on the system than it's own load production.
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: curiouseag on 22. April 2016, 19:02:05
I ran interbench a number of times on different kernels and tried repeat tests, it seems unreliable and inconsistent, and more affected by other happenings on the system than it's own load production.


possible, yes. He suggests:



To get good reproducible data from it you should boot into runlevel one so
that nothing else is running on the machine. All power saving (cpu throttling,
cpu frequency modifications) must be disabled on the first run to get an
accurate measurement for cpu usage. You may enable them later if you are
benchmarking their effect on interactivity on that machine. Root is almost
mandatory for this benchmark, or real time privileges at the very least. You
need free disk space in the directory it is being run in the order of 2* your
physical ram for the disk loads. A default run in v0.21 takes about 15
minutes to complete, longer if your disk is slow.

As the benchmark bases the work it does on the speed of the hardware the
results from different hardware can not be directly compared. However changes
of kernels, filesystem and options can be compared. To do a comparison of
different cpus and keep the workload constant, using the -l option and
passing the value of "loops_per_ms" from the first hardware tested will keep
the number of cpu cycles fairly constant allowing some comparison. Future
versions may add the option of setting the amount of disk throughput etc.

I tried it after reboot without doing anything. Well then we have our eyes left for fluid testing :P
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: Rob on 24. April 2016, 19:58:05
Sidenote about the Interactive governor:
I've got it working for 32bit now, and have patches prepared against more series of kernel:
http://paradoxcomputers.com.au/manjaro/packages/desktop-kernel-test/interactive-governor/

Though FYI: I've only actually built and booted to 4.4 series (32bit & 64bit) from these patches, tomorrow i'll build and confirm working the rest.
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: Rob on 25. April 2016, 04:35:55
Sidenote about the Interactive governor:
I've got it working for 32bit now, and have patches prepared against more series of kernel:
http://paradoxcomputers.com.au/manjaro/packages/desktop-kernel-test/interactive-governor/

Though FYI: I've only actually built and booted to 4.4 series (32bit & 64bit) from these patches, tomorrow i'll build and confirm working the rest.

There was an issue with 3.14 and 3.18 patches, should be fixed now, patches updated.
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: Mortem Bonum on 27. April 2016, 17:51:47
@Rob can you update the tweaked kernel? I'm on unstable right now and it has the Linux 4.4.8 kernel which when installing your kernel becomes 4.4.7 but the modules especially the nvidia driver becomes broken after doing so.
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: Rob on 27. April 2016, 19:56:08
@Rob can you update the tweaked kernel? I'm on unstable right now and it has the Linux 4.4.8 kernel which when installing your kernel becomes 4.4.7 but the modules especially the nvidia driver becomes broken after doing so.

Tomorrow if i have time... but you can pull the zen600 branch of our packages-core repo and build yourself, it's up to date.
https://github.com/manjaro/packages-core/tree/zen600

Code: [Select]
git clone -b zen600 https://github.com/manjaro/packages-core.git
cd packages-core/linux44
makepkg -csir
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: curiouseag on 05. May 2016, 16:52:47
used the kernel now for a week or more. Everything is awesome.


###


what about: bld
https://wiki.archlinux.org/index.php/Kernels#-bld
https://github.com/rmullick/bld-patches
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: Rob on 05. May 2016, 17:26:29
what about: bld
https://wiki.archlinux.org/index.php/Kernels#-bld
https://github.com/rmullick/bld-patches

Does look very interesting, will check it out soon.
Title: Re: Tuning kernel for responsiveness - test kernel - candidate for merge request!
Post by: vnvman on 14. May 2016, 09:38:04
@Rob
The other day I was trying to do an install of Arch on my AMD netbook, however I found that the default linux 45 kernel tends to get my cpu stuck. I get that funny error "CPU 1 stuck for 22 seconds" every few seconds, so I'm not even able to execute the most basic commands and get my build up and running. This got me curious because the last time I tried linux 45 on my Manjaro install a few weeks ago the cpus had very high load and everything was stuttering. I'm no expert but if I remember well you were planning on acquiring some low power AMD hardware for mobility some time ago, so maybe you had a chance of looking into what's specifically causing this within linux 45 on some of these machines? It seems like there also other Arch users reporting similar issues under similar circumstances.