public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] kernel tuning
@ 2005-10-01 16:11 John Jolet
  2005-10-01 17:49 ` Mark Shields
  0 siblings, 1 reply; 8+ messages in thread
From: John Jolet @ 2005-10-01 16:11 UTC (permalink / raw
  To: gentoo-user

I've got a farm of 32-bit redhat 7 web servers that we're about to start 
migrating to gentoo on amd64 servers.  One question my boss had that I can't 
seem to answer is this.  Redhat kernels are supposedly tuned for "sane 
defaults" and I've done no "tuning" at all on the gentoo boxes.  Using gentoo 
sources and NOT genkernel, can anyone give me some hints about what I need to 
look at?  I'd be very embarrased if I replaced older 32-bit redhat 7 boxes 
with 64-bit gentoo boxes and the migration failed because I didn't change 
some parameter to tweak these guys for apache/zope.
-- 
John Jolet
Your On-Demand IT Department
512-762-0729
www.jolet.net
john@jolet.net
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] kernel tuning
  2005-10-01 16:11 [gentoo-user] kernel tuning John Jolet
@ 2005-10-01 17:49 ` Mark Shields
  2005-10-01 19:59   ` gentuxx
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Shields @ 2005-10-01 17:49 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]

Sane defaults? Sounds a bit redundant to me. You will have to tweak the
kernel sources since your not using genkernel (my experience with Redhat is
minimal, I assume they use a type of generic kernel?). There's no way around
it. Short story, if you want "sane defaults", stick with the genkernel.

On 10/1/05, John Jolet <john@jolet.net> wrote:
>
> I've got a farm of 32-bit redhat 7 web servers that we're about to start
> migrating to gentoo on amd64 servers. One question my boss had that I
> can't
> seem to answer is this. Redhat kernels are supposedly tuned for "sane
> defaults" and I've done no "tuning" at all on the gentoo boxes. Using
> gentoo
> sources and NOT genkernel, can anyone give me some hints about what I need
> to
> look at? I'd be very embarrased if I replaced older 32-bit redhat 7 boxes
> with 64-bit gentoo boxes and the migration failed because I didn't change
> some parameter to tweak these guys for apache/zope.
> --
> John Jolet
> Your On-Demand IT Department
> 512-762-0729
> www.jolet.net <http://www.jolet.net>
> john@jolet.net
> --
> gentoo-user@gentoo.org mailing list
>
>


--
- Mark Shields

[-- Attachment #2: Type: text/html, Size: 1639 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] kernel tuning
  2005-10-01 17:49 ` Mark Shields
@ 2005-10-01 19:59   ` gentuxx
  2005-10-02 22:33     ` John Jolet
  0 siblings, 1 reply; 8+ messages in thread
From: gentuxx @ 2005-10-01 19:59 UTC (permalink / raw
  To: gentoo-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Shields wrote:

> Sane defaults? Sounds a bit redundant to me. You will have to
> tweak the kernel sources since your not using genkernel (my
> experience with Redhat is minimal, I assume they use a type of
> generic kernel?). There's no way around it. Short story, if you
> want "sane defaults", stick with the genkernel.
>
> On 10/1/05, *John Jolet* < john@jolet.net <mailto:john@jolet.net>>
> wrote:
>
> I've got a farm of 32-bit redhat 7 web servers that we're about
> to start
> migrating to gentoo on amd64 servers. One question my boss had
> that I can't
> seem to answer is this. Redhat kernels are supposedly tuned for
> "sane
> defaults" and I've done no "tuning" at all on the gentoo
> boxes. Using gentoo
> sources and NOT genkernel, can anyone give me some hints about
> what I need to
> look at? I'd be very embarrased if I replaced older 32-bit
> redhat 7 boxes
> with 64-bit gentoo boxes and the migration failed because I
> didn't change
> some parameter to tweak these guys for apache/zope.
> --
> John Jolet
> Your On-Demand IT Department
> 512-762-0729
> www.jolet.net <http://www.jolet.net>
> john@jolet.net <mailto:john@jolet.net>
> --
> gentoo-user@gentoo.org <mailto:gentoo-user@gentoo.org> mailing list
>
>
>
>
> --
> - Mark Shields

IIRC, RedHat kernels are relatively generic in that they have almost
everything turned on, and/or build the modules so that they can
maximize the hardware compatibility.  So it is likely that there will
be tones of stuff that was turned on, or had modules build for it,
that you didn't need.  The same will likely be the case for the gentoo
kernel.  You're best bet is to spend the time on one system going
through each kernel option (within reason), if you don't know what it
does, read the help and/or turn it off (it will give a recommended
setting in the Help).  Once you've got your config, use that to build
the kernels for the rest fo your systems.

I know it's a lot of work, but once you've done it, subsequent
configs/compiles for kernel upgrades, security patches, etc. will go
MUCH faster.  1)  Because you'll have a pre-defined kernel config.  2)
You'll know what most of the kernel options are (at least
superficially) and which ones you need enabled.  You'll just have to
read the help for any new ones that pop up.  ;-)

HTH



- --
gentux
echo "hfouvyAdpy/ofu" | perl -pe 's/(.)/chr(ord($1)-1)/ge'

gentux's gpg fingerprint ==> 34CE 2E97 40C7 EF6E EC40  9795 2D81 924A
6996 0993
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDPuqXLYGSSmmWCZMRAhxlAKDrXCbDtafJPdObBrot58t9Zxuv8ACgjQtw
g2gJWap5M6/a415dDccJpdU=
=NRaR
-----END PGP SIGNATURE-----

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] kernel tuning
  2005-10-01 19:59   ` gentuxx
@ 2005-10-02 22:33     ` John Jolet
  2005-10-03 19:09       ` Bastian Balthazar Bux
  0 siblings, 1 reply; 8+ messages in thread
From: John Jolet @ 2005-10-02 22:33 UTC (permalink / raw
  To: gentoo-user

On Saturday 01 October 2005 14:59, gentuxx wrote:

> > - Mark Shields
>
> IIRC, RedHat kernels are relatively generic in that they have almost
> everything turned on, and/or build the modules so that they can
> maximize the hardware compatibility.  So it is likely that there will
> be tones of stuff that was turned on, or had modules build for it,
> that you didn't need.  The same will likely be the case for the gentoo
> kernel.  You're best bet is to spend the time on one system going
> through each kernel option (within reason), if you don't know what it
> does, read the help and/or turn it off (it will give a recommended
> setting in the Help).  Once you've got your config, use that to build
> the kernels for the rest fo your systems.
>
> I know it's a lot of work, but once you've done it, subsequent
> configs/compiles for kernel upgrades, security patches, etc. will go
> MUCH faster.  1)  Because you'll have a pre-defined kernel config.  2)
> You'll know what most of the kernel options are (at least
> superficially) and which ones you need enabled.  You'll just have to
> read the help for any new ones that pop up.  ;-)
>
> HTH
>
I've done all that, in terms of drivers/features turned on/off/modules.  I 
meant more in terms of things like threads per process, processes per user 
(ulimit and friends), max data stack, that sort of thing.
-- 
John Jolet
Your On-Demand IT Department
512-762-0729
www.jolet.net
john@jolet.net
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] kernel tuning
  2005-10-02 22:33     ` John Jolet
@ 2005-10-03 19:09       ` Bastian Balthazar Bux
  2005-10-03 19:19         ` Brett I. Holcomb
  0 siblings, 1 reply; 8+ messages in thread
From: Bastian Balthazar Bux @ 2005-10-03 19:09 UTC (permalink / raw
  To: gentoo-user

John Jolet wrote:
> On Saturday 01 October 2005 14:59, gentuxx wrote:
> 
> 
>>>- Mark Shields
>>
>>IIRC, RedHat kernels are relatively generic in that they have almost
>>everything turned on, and/or build the modules so that they can
>>maximize the hardware compatibility.  So it is likely that there will
>>be tones of stuff that was turned on, or had modules build for it,
>>that you didn't need.  The same will likely be the case for the gentoo
>>kernel.  You're best bet is to spend the time on one system going
>>through each kernel option (within reason), if you don't know what it
>>does, read the help and/or turn it off (it will give a recommended
>>setting in the Help).  Once you've got your config, use that to build
>>the kernels for the rest fo your systems.
>>
>>I know it's a lot of work, but once you've done it, subsequent
>>configs/compiles for kernel upgrades, security patches, etc. will go
>>MUCH faster.  1)  Because you'll have a pre-defined kernel config.  2)
>>You'll know what most of the kernel options are (at least
>>superficially) and which ones you need enabled.  You'll just have to
>>read the help for any new ones that pop up.  ;-)
>>
>>HTH
>>
> 
> I've done all that, in terms of drivers/features turned on/off/modules.  I 
> meant more in terms of things like threads per process, processes per user 
> (ulimit and friends), max data stack, that sort of thing.

For that take a look at
http://www.gentoo.org/news/en/gwn/20050808-newsletter.xml
section "Tips and Tricks"

The "sys-kernel/hardened-sources" give some more flexibility but the
fact is not so widely used, as (on amd64) the vanilla ones has to be
considered.

Also setting ulimit and sysctl apply to every linux system not only
gentoo and should be always checked, also if you trust that the distro
you are using is optimized to be used as server.

Also to consider:
CONFIG_HZ=100
CONFIG_PREEMPT_NONE=y
IOSCHED_AS || IOSCHED_DEADLINE || IOSCHED_CFQ

HTHToo
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] kernel tuning
  2005-10-03 19:09       ` Bastian Balthazar Bux
@ 2005-10-03 19:19         ` Brett I. Holcomb
  2005-10-03 20:46           ` Bastian Balthazar Bux
  0 siblings, 1 reply; 8+ messages in thread
From: Brett I. Holcomb @ 2005-10-03 19:19 UTC (permalink / raw
  To: gentoo-user

Out of curiosity and so I can learn.  Why did you suggest CONFIG_HZ be set 
to 100 (IIRC default is 250) and also what exactly is it supposed to do 
for you.  We did not have it before.

Also what about CONFIG_PREMPT being none?  The help mentions it is for low 
latency.

Thanks.

On Mon, 3 Oct 2005, Bastian Balthazar Bux wrote:

> John Jolet wrote:
>> On Saturday 01 October 2005 14:59, gentuxx wrote:
>>
>>
>>>> - Mark Shields
>>>
>>> IIRC, RedHat kernels are relatively generic in that they have almost
>>> MUCH faster.  1)  Because you'll have a pre-defined kernel config.  2)
>>> You'll know what most of the kernel options are (at least
>>> superficially) and which ones you need enabled.  You'll just have to
>>> read the help for any new ones that pop up.  ;-)
>>>
>>>
>>
>> I've done all that, in terms of drivers/features turned on/off/modules.  I
>> meant more in terms of things like threads per process, processes per user
>> (ulimit and friends), max data stack, that sort of thing.
>
> For that take a look at
> http://www.gentoo.org/news/en/gwn/20050808-newsletter.xml
> section "Tips and Tricks"
>
> The "sys-kernel/hardened-sources" give some more flexibility but the
> fact is not so widely used, as (on amd64) the vanilla ones has to be
> considered.
>
> Also setting ulimit and sysctl apply to every linux system not only
> gentoo and should be always checked, also if you trust that the distro
> you are using is optimized to be used as server.
>
> Also to consider:
> CONFIG_HZ=100
> CONFIG_PREEMPT_NONE=y
> IOSCHED_AS || IOSCHED_DEADLINE || IOSCHED_CFQ
>
> HTHToo
>

-- 

Brett I. Holcomb
brettholcomb@R777bellsouth.net
Registered Linux User #188143
Remove R777 to email
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] kernel tuning
  2005-10-03 19:19         ` Brett I. Holcomb
@ 2005-10-03 20:46           ` Bastian Balthazar Bux
  2005-10-03 20:51             ` Brett I. Holcomb
  0 siblings, 1 reply; 8+ messages in thread
From: Bastian Balthazar Bux @ 2005-10-03 20:46 UTC (permalink / raw
  To: gentoo-user

Brett I. Holcomb wrote:
> Out of curiosity and so I can learn.  Why did you suggest CONFIG_HZ be
> set to 100 (IIRC default is 250) and also what exactly is it supposed to
> do for you.  We did not have it before.
> 

In the past was fixed to 100Hz, then to 1000 appeared, now there is a
third option for 250, the current default and a good compromise.

An home system become more responsive with a higher frequency.

cpu and interrupt timings become lower with a lower frequency, so it's
better for a server system. Expecially a multi processor one.



> Also what about CONFIG_PREMPT being none?  The help mentions it is for
> low latency.

>> CONFIG_HZ=100
>> CONFIG_PREEMPT_NONE=y
>> IOSCHED_AS || IOSCHED_DEADLINE || IOSCHED_CFQ
>>

Preemption permit to interrupt kernel processes, providing a still more
responsive kernel. Good if you're hering music, playing videos and such
but not very interesting for a server.

The third option is the "scheduler" (IOSCHED_*) how the kernel access
the disk. this has been discussed in great detail over the net.
Quoting the kernel help here, since it's short and explanatory.

--------- quote ---------
CONFIG_IOSCHED_AS:

The anticipatory I/O scheduler is the default disk scheduler. It is
generally a good choice for most environments, but is quite large and
complex when compared to the deadline I/O scheduler, it can also be
slower in some cases especially some database loads.

Symbol: IOSCHED_AS [=y]
Prompt: Anticipatory I/O scheduler
  Defined at drivers/block/Kconfig.iosched:14
  Location:
    -> Device Drivers
      -> Block devices
        -> IO Schedulers
--------- quote ---------

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] kernel tuning
  2005-10-03 20:46           ` Bastian Balthazar Bux
@ 2005-10-03 20:51             ` Brett I. Holcomb
  0 siblings, 0 replies; 8+ messages in thread
From: Brett I. Holcomb @ 2005-10-03 20:51 UTC (permalink / raw
  To: gentoo-user

Thank you for the explanation.  I missed that servers is what the OP is 
really interested in.  I'll look at the scheduler options again.


On Mon, 3 Oct 2005, Bastian Balthazar Bux wrote:

> Brett I. Holcomb wrote:
>> Out of curiosity and so I can learn.  Why did you suggest CONFIG_HZ be
>> set to 100 (IIRC default is 250) and also what exactly is it supposed to
>> do for you.  We did not have it before.
>>
>
> In the past was fixed to 100Hz, then to 1000 appeared, now there is a
> third option for 250, the current default and a good compromise.
>
> An home system become more responsive with a higher frequency.
>
> cpu and interrupt timings become lower with a lower frequency, so it's
> better for a server system. Expecially a multi processor one.
>
>
>
>> Also what about CONFIG_PREMPT being none?  The help mentions it is for
>> low latency.
>
>>> CONFIG_HZ=100
>>> CONFIG_PREEMPT_NONE=y
>>> IOSCHED_AS || IOSCHED_DEADLINE || IOSCHED_CFQ
>>>
>
> Preemption permit to interrupt kernel processes, providing a still more
> responsive kernel. Good if you're hering music, playing videos and such
> but not very interesting for a server.
>
> The third option is the "scheduler" (IOSCHED_*) how the kernel access
> the disk. this has been discussed in great detail over the net.
> Quoting the kernel help here, since it's short and explanatory.
>
> --------- quote ---------
> CONFIG_IOSCHED_AS:
>
> The anticipatory I/O scheduler is the default disk scheduler. It is
> generally a good choice for most environments, but is quite large and
> complex when compared to the deadline I/O scheduler, it can also be
> slower in some cases especially some database loads.
>
> Symbol: IOSCHED_AS [=y]
> Prompt: Anticipatory I/O scheduler
>  Defined at drivers/block/Kconfig.iosched:14
>  Location:
>    -> Device Drivers
>      -> Block devices
>        -> IO Schedulers
> --------- quote ---------
>
>

-- 

Brett I. Holcomb
brettholcomb@R777bellsouth.net
Registered Linux User #188143
Remove R777 to email
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-10-31  3:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-01 16:11 [gentoo-user] kernel tuning John Jolet
2005-10-01 17:49 ` Mark Shields
2005-10-01 19:59   ` gentuxx
2005-10-02 22:33     ` John Jolet
2005-10-03 19:09       ` Bastian Balthazar Bux
2005-10-03 19:19         ` Brett I. Holcomb
2005-10-03 20:46           ` Bastian Balthazar Bux
2005-10-03 20:51             ` Brett I. Holcomb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox