LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 02: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, 05:22 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
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, 05:56 AM   #3
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
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, 09:19 AM   #4
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 223

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, 11:18 AM   #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 12:25 PM.
 
  


Reply



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 05:57 AM
can I optimize this kushalkoolwal Programming 5 10-21-2005 09:05 PM
kernel optimize? and linux headless Alinuxnoob Linux - General 4 06-17-2005 12:05 PM
Kernel, patch, optimize, buid, install Hexane Mandriva 3 01-27-2005 01:35 AM
Optimize kernel 2.6.7: netfilter Worstje Linux - Software 0 06-17-2004 07:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:43 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
Open Source Consulting | Domain Registration