Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Genkernel vs. manual kernel config
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6656
Location: The soundosphere

PostPosted: Mon Feb 01, 2016 1:16 am    Post subject: Genkernel vs. manual kernel config Reply with quote

Has anyone benchmarked genkernel vs. manual kernel config? Is one faster, more memory efficient, etc., than the other?

(I'm ignoring kernel size on disk or length of time it takes to compile.)
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Mon Feb 01, 2016 7:02 am    Post subject: Reply with quote

experimental use flag allows march settings, e.g. ivybride march for my q3610qm cpu.
manual build kernel with experimntal useflag + march ivybridge had some impact, comparing libreoffice built times before and after the change.
I repeated that to verify it and it was everytime faster as before. I also checked different packages
Back to top
View user's profile Send private message
TigerJr
Guru
Guru


Joined: 19 Jun 2007
Posts: 540

PostPosted: Mon Feb 01, 2016 11:44 am    Post subject: Re: Genkernel vs. manual kernel config Reply with quote

audiodef wrote:
Has anyone benchmarked genkernel vs. manual kernel config? Is one faster, more memory efficient, etc., than the other?

(I'm ignoring kernel size on disk or length of time it takes to compile.)


It depend on what you do with this kernel, if you experienced with manual configuration you can make many needed function faster and turn off unneeded function and drivers (kernel size is easy to analyze i.e. fast boot, and all function and drivers need size and time to load, big sized and heavy function with many operation and cpu instruction works slower), if you not experienced with manual configuration, than you can't turn off unneeded function and even have faced with kernel panics or your kernel would slower or unbootable, that pushes you to use genkernel or already compiled kernel.
_________________
Do not use gentoo, it die
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3489

PostPosted: Mon Feb 01, 2016 5:17 pm    Post subject: Reply with quote

Quote:
Has anyone benchmarked genkernel vs. manual kernel config? Is one faster, more memory efficient, etc., than the other?

(I'm ignoring kernel size on disk or length of time it takes to compile.)
You ignore the build-time stuff... So, you can launch make manually or have genkernel launch it for you.
In both cases you use gcc and kernel's .config. If your configs (and low-level compiler flags) match, you should get the same result. So... What do you want to benchmark against what, and what is the point?
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Mon Feb 01, 2016 5:38 pm    Post subject: Reply with quote

Are you comparing apples and apples? Manual configuration versus genkernel with the same kernel configuration?

It sounds like you are asking about manual configuration versus stock configuration. Genkernel is just a script to do the steps without manually typing them in. The only real difference is that genkernel doesn't forget to copy the kernel to /boot or to update the boot menu. The one weakness is that it requires an intitramfs. If you are using one anyway, there is no reason not to use genkernel.

I stopped using genkernel but only because I've ditched the initramfs.

It would be interesting to bench mark a hand kernel against the same config as built with an initramfs by genkernel.

To do it you would build the hand kernel, save the config to <my saved config> then run "genkernel --config=<my saved config> all". You can't leave it in /usr/src/linux/.config because genkernel overwrites it.

Easy enough to do, but the benchmarking procedure needs more thought.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6656
Location: The soundosphere

PostPosted: Mon Feb 01, 2016 7:26 pm    Post subject: Reply with quote

I'm interested in how efficiently a genkernel kernel, created with "genkernal all" and no specific options, runs (don't care about compile times for anything) compared to the same kernel sources carefully compiled manually for the same system, with anything not needed by the system removed. Is there a real difference?

But I've decided to perform a comparison myself on the particular system I have in mind. That seems the best way to decide if I want to recommend genkernel as an option for Gentoo Studio.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54799
Location: 56N 3W

PostPosted: Mon Feb 01, 2016 7:33 pm    Post subject: Reply with quote

audiodef,

Other than building and loading modules you don't need, there should be no execution time differences.
Its the same code in both cases. The difference is in the unneeded baggage.

I'll be interested in your results though.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Tue Feb 02, 2016 11:40 am    Post subject: Reply with quote

regarding build times.

i used for years

make && make modules_install

because it was in the guides and i never cared, or read the man-page

last year i read the manpage and there is the --jobs option. was kinda annoyed to see it taking a very long time. checked i7z tool and saw only one core in use.

you need to look it up yourself but it is something like, for 3610qm (when you want full hyperthreading in use), load should be around 8 or 9 than. my personal opinion is to keep the load between 8 and 9. because it is a quadcore cpu with hyperthreading. ... i7z tells a bit on how the cores are utilized.

make --jobs 10 && make --jobs 10 modules_install

as said check the manpage, how the syntxx for the job option is

when you build a kernel, you need to consider for a desctop box you want a responsive box. I had a few kernels built which were slight faster, but when the box was unresponsive to the user, it is kinda worthless.

except the experimental useflag and ivybridge option, i hardly got any tweaks which showed some impacts.
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 463

PostPosted: Tue Feb 02, 2016 2:39 pm    Post subject: Reply with quote

Regarding performance, I see no difference. Regarding battery life, it's more than noticeable.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Tue Feb 02, 2016 5:06 pm    Post subject: Reply with quote

tw04l124 wrote:
i used for years

make && make modules_install


My build script
Code:
X3 ~ # cat `which buildmykernel`
#!

cd /usr/src/linux
zcat /proc/config.gz >.config

# At this point we should compare kernel versions and make oldconfig if the base version has updated

make menuconfig   &&  make -j7 && make -j7 modules_install && make -j7 install && echo "Don't forget to update boot loader menu"

The && parts aren't working quite right. I can have build errors and the next stage continues anyway. I copied this from a six core box, I should change it to j4 on the box I ran from because it's a three core. Builds run fast anyway.
Back to top
View user's profile Send private message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 621
Location: France

PostPosted: Tue Feb 02, 2016 5:54 pm    Post subject: Reply with quote

Tony0945 wrote:
The && parts aren't working quite right. I can have build errors and the next stage continues anyway.

Code:
make -jx && make -jx modules_install install
works well for me. I see warnings, but no errors.
As "make install" updates the symlinks, I don't need to update the boot menu (but I don't use the awful grub-fat-menu-makin' scripts at all). But I should add a "emerge @module-rebuild" warning, it's a task I often forget.
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1172
Location: /run/user/1000

PostPosted: Sun Feb 07, 2016 7:37 pm    Post subject: Reply with quote

Tony0945 wrote:
The one weakness is that it requires an intitramfs.

I stopped using genkernel but only because I've ditched the initramfs.


And that is weakness why exactly ?
Boot time speed or something else ?
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3489

PostPosted: Sun Feb 07, 2016 7:45 pm    Post subject: Reply with quote

Oh, genkernel does not enforce using initramfs. It builds one, but adding the path to kernel's command line is up to you.
You can ignore it, unless you particular setup requires it. (like root on LVM)
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Feb 07, 2016 8:17 pm    Post subject: Reply with quote

szatox wrote:
Oh, genkernel does not enforce using initramfs. It builds one, but adding the path to kernel's command line is up to you.
You can ignore it, unless you particular setup requires it. (like root on LVM)


I didn't realize that. Genkernel adds the line and I assumed it needed it.

So they only reason not to use genkernel is "real men type everything by hand".
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Feb 07, 2016 8:21 pm    Post subject: Reply with quote

CneGroumF wrote:
Tony0945 wrote:
The && parts aren't working quite right. I can have build errors and the next stage continues anyway.

Code:
make -jx && make -jx modules_install install
works well for me. I see warnings, but no errors.
As "make install" updates the symlinks, I don't need to update the boot menu (but I don't use the awful grub-fat-menu-makin' scripts at all). But I should add a "emerge @module-rebuild" warning, it's a task I often forget.


Works well for me too, but sometimes it fails to make bzimage but goes merrily on without returning non-zero so at the end the script ran but there is no vmlinuz in /boot.
It's not the fault of the script that the build fails, but it should stop, but doesn't. If you scroll through the messages you see the compilation failure. The script should stop.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Sun Feb 07, 2016 9:34 pm    Post subject: Reply with quote

the issue is, there is hardly no benefit in the way how you do it.

and as you mentioned you hardly get a feedback.

I am not sure if this is a bash feature, quoting from my i3.config

Code:
scrot '%d-%m-%Y_%H:%M:%S_screenshot.png' -e 'mv $f ~/Screenshots/'


AFAIk those % ... makes it easy to give a date stamp to your file-name. you may use that too.

and serious, you ask for issues when you do not type those make commands yourself and change the kernel yourself. and even do not rename the kernel yourself.

When you have not a proper kernel, your box will not boot or has other issues. it is a critical component, and that's why id o it by hand.

linux mint, the idiots of scripting, destroyed several of my boxes with their automated grub sripts ... only because someone coded something, does not mean it is foolproof or was written with every possible case in mind. or does even consider a valid grub entry to keep it.

portage is the best example to show how limited scripting is. (endless topics on how to improve portage or the flaws of it)

..

i always wanted to learn or improve my bash coding.

you may check for a return value of your function. it may exists. and than you can evaluate that return value before continuing.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6656
Location: The soundosphere

PostPosted: Fri Feb 12, 2016 2:21 am    Post subject: Reply with quote

NeddySeagoon wrote:
audiodef,

Other than building and loading modules you don't need, there should be no execution time differences.
Its the same code in both cases. The difference is in the unneeded baggage.

I'll be interested in your results though.


Yeah, it does seem like there should be no performance difference. Genkernel might actually be good for Gentoo Studio, as it seems it would give the user a higher chance of all necessary modules for supported audio hardware being loaded than if the user does it manually and overlooks something.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum