LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-16-2013, 03:15 AM   #1
endhx
LQ Newbie
 
Registered: Apr 2013
Posts: 25

Rep: Reputation: Disabled
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?
 
Old 04-16-2013, 06:22 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 981
Blog Entries: 2

Rep: Reputation: 235Reputation: 235Reputation: 235
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.
 
Old 04-16-2013, 06:56 AM   #3
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Back to Debian, and only Debian.
Posts: 1,146
Blog Entries: 7

Rep: Reputation: 321Reputation: 321Reputation: 321Reputation: 321
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.
 
Old 04-16-2013, 10:19 AM   #4
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 219

Rep: Reputation: 20
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
 
Old 04-16-2013, 12:18 PM   #5
endhx
LQ Newbie
 
Registered: Apr 2013
Posts: 25

Original Poster
Rep: Reputation: Disabled
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.

Last edited by endhx; 04-16-2013 at 01:25 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimize this script... Skillz Linux - General 16 05-19-2010 06:57 AM
can I optimize this kushalkoolwal Programming 5 10-21-2005 10:05 PM
kernel optimize? and linux headless Alinuxnoob Linux - General 4 06-17-2005 01:05 PM
Kernel, patch, optimize, buid, install Hexane Mandriva 3 01-27-2005 02:35 AM
Optimize kernel 2.6.7: netfilter Worstje Linux - Software 0 06-17-2004 08:25 AM


All times are GMT -5. The time now is 02:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration