How does one optimize the kernel?
On Ubuntu 64bit how do I optimize my kernel when compiling it? I compile/ patch my own custom kernel for various reasons.
Is adding "CFLAGS = -march=native" to my makefile all? Do I need to do something else? What about the -pipe flag? |
make -pipe is for affecting the compilation rather than the kernel that results from it.
You can make kernel selections that omit support for hardware and filesystem types and networking types you know you won't be using. The result is a smaller kernel using less RAM. |
Also, in Processor features, select the appropriate type. Also, I've seen tips on the net for adjusting timing and such, but it usually results in a unstable kernel for me. Do a search on "<your processor> linux kernel optimization", and you should get a bunch of results that may work for you.
|
you might wanna disable a lot of stuff from kernel hacking menu (especially frame pointer!)
if you don't want to debug your kernel, you might want to disable all the option related to kernel debugging more screen prints uses more memory; if you don't really need to see these messages, look for anything with "verbose" in it |
Yes, I've actually done those things already. In this case what I'm looking to do is optimize the kernel specifically for the instruction sets supported using the -march=native line.
I'm wondering where exactly I should put that line. I also did export KCFLAGS="-O2 -march=native -pipe" to be sure that it'd all work. But... I just want to check. |
All times are GMT -5. The time now is 01:51 AM. |