Author Topic: Tuning kernel for responsiveness - test kernel - candidate for merge request!  (Read 2151 times)

0 Members and 1 Guest are viewing this topic.

Offline Rob

  • Core Team
  • *****
  • Posts: 5390
  • Alias: Korrode
  • Branch: Unstable
  • Desktop: Xfce+Compiz
  • GPU Card: nVidia GTX560Ti
  • GPU driver: non-free
  • Kernel: linux314 x64
  • Skill: Advanced
Continuation of this thread:
https://forum.manjaro.org/index.php?topic=33071.0


New test kernel:

Difference from current standard Manjaro kernels:
  • 600Hz interrupt frequency, up from 300Hz.
  • Zen-kernel CPU scheduler and ondemand governor tuning (but not the VM and block subsystem tuning).

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
CPU tuning patch

http://paradoxcomputers.com.au/manjaro/packages/desktop-kernel-test/
« Last Edit: 20. April 2016, 19:30:21 by Rob »

Offline vnvman

  • Neuling
  • *
  • Posts: 28
  • Branch: stable
  • Desktop: Xfce 4.12.3 (Gtk 2.24.28)
  • GPU Card: AMD A4-1200 APU with Radeon HD 8180 Graphics
  • GPU driver: free
  • Kernel: 4.4.6-1.1-MANJAROx86_64
  • Skill: Novice
Installing right now. Will report back soon  :)

Offline Centrin0

  • Neuling
  • *
  • Posts: 6
  • I'm new. Be nice!
  • Branch: stable
  • Desktop: KDE one love
  • GPU Card: nvidia optimus
  • GPU driver: non-free
  • Skill: Novice
Sorry, wrong translate post :)
Just fix my problem.

Now, test this kernel.

Do you read about this patchset for kernel: https://pf.natalenko.name/ ?
« Last Edit: 21. April 2016, 07:23:00 by Centrin0 »
Plasma is not falling, it's the blinking of the eyes.
Use notebook with intel core 1st generation and nvidia optimus.

Offline curiouseag

  • Sr. Mitglied
  • ****
  • Posts: 267
  • I'm new. Be nice!
  • Branch: stable
  • Desktop: undicieded
  • GPU Card: Intel Core i3-5010U
  • GPU driver: Intel
  • Kernel: grsec self build
  • Skill: Advanced
Sorry, wrong translate post :)
Just fix my problem.

Now, test this kernel.

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


yes he did, I also already posted it in the 2nd thread. This is the 4th! :)

Offline jbMacAZ

  • Neuling
  • *
  • Posts: 34
  • Branch: testing
  • Desktop: Cinnamon 3.0
  • GPU Card: Intel Atom SoC - ValleyView gen7 or Z36/7xxx
  • GPU driver: free
  • Kernel: 4.3.6-custom-x64, 4.6-rcx-custom-x64, etc.
  • Skill: Intermediate
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.

Offline torvic9

  • Sr. Mitglied
  • ****
  • Posts: 253
  • Hello world!
  • Branch: stable
  • Skill: Intermediate
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!
i3: i7-5820K | 32 GB | GeForce GTX 960, nvidia | linux44-custom
KDE: i7-920 | 12 GB | GeForce GTS 450, nouveau | linux44
Gnome: Thinkpad X200s | linux41

Offline Centrin0

  • Neuling
  • *
  • Posts: 6
  • I'm new. Be nice!
  • Branch: stable
  • Desktop: KDE one love
  • GPU Card: nvidia optimus
  • GPU driver: non-free
  • Skill: Novice
Also use firefox. It works more smoothly.
Need add this kernel as dependence for firefox  :D
Don't test any benchmark.
« Last Edit: 21. April 2016, 18:50:47 by Centrin0 »
Plasma is not falling, it's the blinking of the eyes.
Use notebook with intel core 1st generation and nvidia optimus.

Offline curiouseag

  • Sr. Mitglied
  • ****
  • Posts: 267
  • I'm new. Be nice!
  • Branch: stable
  • Desktop: undicieded
  • GPU Card: Intel Core i3-5010U
  • GPU driver: Intel
  • Kernel: grsec self build
  • Skill: Advanced
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

Offline curiouseag

  • Sr. Mitglied
  • ****
  • Posts: 267
  • I'm new. Be nice!
  • Branch: stable
  • Desktop: undicieded
  • GPU Card: Intel Core i3-5010U
  • GPU driver: Intel
  • Kernel: grsec self build
  • Skill: Advanced
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

Offline Rob

  • Core Team
  • *****
  • Posts: 5390
  • Alias: Korrode
  • Branch: Unstable
  • Desktop: Xfce+Compiz
  • GPU Card: nVidia GTX560Ti
  • GPU driver: non-free
  • Kernel: linux314 x64
  • Skill: Advanced
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.

Offline curiouseag

  • Sr. Mitglied
  • ****
  • Posts: 267
  • I'm new. Be nice!
  • Branch: stable
  • Desktop: undicieded
  • GPU Card: Intel Core i3-5010U
  • GPU driver: Intel
  • Kernel: grsec self build
  • Skill: Advanced
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

Offline Rob

  • Core Team
  • *****
  • Posts: 5390
  • Alias: Korrode
  • Branch: Unstable
  • Desktop: Xfce+Compiz
  • GPU Card: nVidia GTX560Ti
  • GPU driver: non-free
  • Kernel: linux314 x64
  • Skill: Advanced
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.
« Last Edit: 24. April 2016, 20:04:12 by Rob »

Offline Rob

  • Core Team
  • *****
  • Posts: 5390
  • Alias: Korrode
  • Branch: Unstable
  • Desktop: Xfce+Compiz
  • GPU Card: nVidia GTX560Ti
  • GPU driver: non-free
  • Kernel: linux314 x64
  • Skill: Advanced
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.

Offline Mortem Bonum

  • Neuling
  • *
  • Posts: 39
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: XFCE
  • GPU Card: NVIDIA GeForce GTX 960
  • GPU driver: Non-Free
  • Kernel: Linux-4.5
  • Skill: Intermediate
@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.

Offline Rob

  • Core Team
  • *****
  • Posts: 5390
  • Alias: Korrode
  • Branch: Unstable
  • Desktop: Xfce+Compiz
  • GPU Card: nVidia GTX560Ti
  • GPU driver: non-free
  • Kernel: linux314 x64
  • Skill: Advanced
@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