NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Can a custom and native kernel compilation improve efficiency?



On Wed, Sep 19, 2012 at 9:53 AM, Mayuresh <mayuresh%acm.org@localhost> wrote:
> Quoting from: http://www.netbsd.org/docs/guide/en/chap-kernel.html
>
> "by enabling optimisations more specific to your hardware, or tuning the
> system to match your specific sizing and workload, you can improve
> performance."
>
> For an i686 desktop, are there specific things I can do to achieve above
> benefits?
>
> Specifically, how do I compile the kernel for i686 instead of i386 _and_
> will doing so benefit in terms of efficiency? ( Will COPTS+=-mnative in
> /etc/mk.conf do?)

It's basically up to you.  You can add any optimization flags you like
(which include several in the -O, -f and -m families) to COPTS and
these will affect the kernel build.  That said, be aware that adding
any of these non-standard might affect the stability of the kernel or
worsen its overall performance.

(I don't know if -mnative will work; gcc(1) in my -current
installation doesn't show such option, and my OS X installation only
knows about -mtune=native and -march=native.)

Also, what do you mean by an "i686 desktop"?  It is too generic.  Take
a look under the "Intel 386 and AMD x86-64 Options" section of the
gcc(1) manpage for possible flags that might help your goal.  And once
you apply any flags, make sure that they are actually improving your
system performance!

-- 
Julio Merino / @jmmv


Home | Main Index | Thread Index | Old Index