You are not logged in.

#1 2016-10-24 13:21:59

Morv
Member
Registered: 2016-10-09
Posts: 14

[Solved] Kernel compilation for tickrate change takes over an hour?

Hello,

I only want to change the tickrate of the kernel from 300 Hz to 1000 Hz to reduce idle frequencies of the CPU, as it proposed over here -> https://bbs.archlinux.org/viewtopic.php … 3#p1578483
I'm on a laptop and it's just unnecessary that the idle frequency is about 2.2 to 2.9 GHz or even higher using turbo. The fans are ramping up more often because the temperature is higher and my battery drains faster.

I went through the steps, changed the tickrate, then saved the config and exited the config program.
Then it began to compile the kernel which seems to take ages in relation to my hardware(i7 4910MQ, 2.9 GHz up to 3.9 GHz in a Thinkpad W541). I stopped it after about an hour because I read about it needing only some minutes and I need to leave shortly and take the laptop with me.

So what might be the reason it takes so long? Is it usual? I also noticed it's only compiling using one thread, having ~12-13% CPU usage over the whole time.

Also, while I'm asking: I'd need to do tickrate change this every time a newer kernel is available and downloaded with pacman, yes?

Thank you.

Morv

Last edited by Morv (2016-11-24 19:14:44)

Offline

#2 2016-10-24 14:24:04

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: [Solved] Kernel compilation for tickrate change takes over an hour?

Well, if you build a kernel with all modules, it can take a while, and up to an hour or more is not all that strange.
If you strip your kernel from all unnecessary modules use ccache for rebuilding and set makepkg.conf to use more cores 'MAKEFLAGS="-j3"' for a dual core use 'nproc' to find out, than it will defintely build faster a second time even more quick due to ccache.

Also, while I'm asking: I'd need to do tickrate change this every time a newer kernel is available and downloaded with pacman, yes?

You can set this in your config/config_x86_64 and it is set without you having to do something like nconfig every time.
though, there's a lot more to configuring a new kernel than what I just said here, I know just a very little bit.

I could go on, but you get the picture I hope wink

Offline

#3 2016-10-24 19:36:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: [Solved] Kernel compilation for tickrate change takes over an hour?

I opened a task to have this changed in our official kernel nearly a year ago by the way, FS#47086.  I guess you can add your vote to it.  You can speed up your kernel compile times and reduce the overall package size with a utility like modprobed-db as well if you continue to roll your own kernels.  See the wiki page for some speed and size comparisons.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2016-10-24 21:02:36

Morv
Member
Registered: 2016-10-09
Posts: 14

Re: [Solved] Kernel compilation for tickrate change takes over an hour?

Thank you guys, will look into it tomorrow I hope. Definitely going for the vote, too.

Offline

#5 2016-10-24 21:14:35

basica
Member
From: Australia
Registered: 2012-10-31
Posts: 217

Re: [Solved] Kernel compilation for tickrate change takes over an hour?

Morv wrote:

So what might be the reason it takes so long? Is it usual? I also noticed it's only compiling using one thread, having ~12-13% CPU usage over the whole time.

You should probably take advantage of all your extra cores. Running make -j$(nproc) is a simple way of doing it. For my i7-3770K it takes about 25mins to compile the kernel. With ccache, it gets down to about 15mins. Using a single thread will take forever with the Arch kernel config because of all the options enabled. If you take the option that graysky mentioned, then yeah you'll notice the compilation time drop dramatically. A customized kernel with the makeflags set like above only takes me maybe 2 or 3 minutes to compile, if that.

Offline

#6 2016-10-26 17:42:21

Sviests
Member
From: Riga, Latvia
Registered: 2016-03-24
Posts: 42

Re: [Solved] Kernel compilation for tickrate change takes over an hour?

Hi!

I`ve actually got the same laptop, I tried compiling a kernel with MAKEFLAGS set to -j8 and it took noticeably less time to compile... But I must say that, at least in my case, changing the tickrate to 1000Hz did not change anything for the idle frequencies... I had gotten my power consumption to be really low, about 12W on average when on battery power, without limiting CPU frequencies, except disabling turbo boost, but I noticed a few weeks ago that the power consumption had doubled to about 20+W and I cannot seem to get it back down... The cpu goes into the C7 state, but the package does not...

Offline

#7 2016-11-24 17:12:39

Morv
Member
Registered: 2016-10-09
Posts: 14

Re: [Solved] Kernel compilation for tickrate change takes over an hour?

Hi Sviests,
sorry for the late reply, I forgot to check again.

The one time I compiled the kernel with the flags and 1000 Hz tickrate I also didn't notice a change, apart from just ~20 minutes of compile time, whereas a Fedora Live media dropped to 800-900 MHz way more often. As a new kernel version was available just the day after I didn't bother with compiling again. I'm using it mostly with AC attached anyway. The fans ramping up more often might be due to me using Windows with an external GPU on an external display only and Arch with the Intel HD 4600. That is probably the reason for the additional heat in my case or at least something to consider.

Anyway, thanks to everyone for the makeflags hint smile

Offline

#8 2016-11-24 17:15:01

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Kernel compilation for tickrate change takes over an hour?

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB