Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Oct 2001 16:25:50 -0600 (CST)
From:      Ryan Thompson <ryan@sasknow.com>
To:        Scott Gerhardt <scott@gerhardt-it.com>
Cc:        FreeBSD <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Kernel and sysctl settings
Message-ID:  <Pine.BSF.4.21.0110271601350.67474-100000@ren.sasknow.com>
In-Reply-To: <KPEMLBLEMPMHGLJOCDEGOEGCCLAA.scott@gerhardt-it.com>

next in thread | previous in thread | raw e-mail | index | archive | help


Hi Scott,


Scott Gerhardt wrote to FreeBSD:

> Looking for recommendations on kernel and sysctl optimizations. I'm
> building a modest server to host HTTP, FTP, SQL and POP3 services.
> Running FreeBSD 4.4-Release on a PIII 1GHz with 640MB+ RAM (plan to
> keep increasing RAM).

I suppose the answer to your questions depends on what sort of load you
expect the server to be under, especially in regards to the network.
FreeBSD's defaults are already suitable for stability in most network
servers, and typically only need tuning for very high-performance servers.
HTTP and SQL usually require a lot of file descriptors if you handle many
simultaneous connections. FTP and POP3 are not typically very demanding.


> net.inet.tcp.sendspace: 16384 (change to 32768)
> net.inet.tcp.recvspace: 16384	(change to 32768)

32k is reasonable. You can pretty safely tune things like this, if you
don't go overboard, but the performance impact you'll see on a typical
"high speed" connection might not even be measurable. Run tests in your
particular configuration to determine if this really helps.

One thing I'd recommend is enabling RFC1323 extensions.. though, with more
recent versions of FreeBSD, this is the default.


> Stability 1st and performance 2nd are key factors.

Then, in practice, unless you really know what you're doing and have
specific reason to do so, it's usually better to leave some things well
enough alone, because (pat answer) the defaults are set by FreeBSD experts
who really know the internals, AND the defaults are the most widely tested
configuration settings. That is not to say that you won't receive some
benefit from careful sysctl tweaking, but it is also quite possible to
affect a negative impact in the same or other areas of your system.

 
> So far I have recompiled a "stripped down" kernel and added the following
> options to the kernel:
> maxusers        256
> options         NMBCLUSTERS=32768
> 
> The following links have given me some ideas on what parameters can be
> modified to enhance networking and performance:
> http://www.enteract.com/~robt/Docs/Articles/ip-stack-tuning.html
> 
> I don't want to start changing the defaults willynilly just because
> they can be changed without knowing the impact on performance and
> stability.
> 
> Here are a few things I was thinking of changing:
> 
> kern.ipc.somaxconn: 128		(change to 1024, 2048, or 4096)
> kern.maxfiles: 8232		(change to 32768 or 65536)
> net.inet.tcp.sendspace: 16384 (change to 32768)
> net.inet.tcp.recvspace: 16384	(change to 32768)
> 
> vfs.vmiodirenable=1 **What does this do?
> 
> 
> Stability 1st and performance 2nd are key factors.
> 
> Suggestions welcome please.
> 
> 
> _________________________________
> 
> Scott Gerhardt, P.Geo.
> Gerhardt Information Technologies
> _________________________________
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 

-- 
  Ryan Thompson <ryan@sasknow.com>
  Network Administrator, Accounts

  SaskNow Technologies - http://www.sasknow.com
  #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2

        Tel: 306-664-3600   Fax: 306-664-1161   Saskatoon
  Toll-Free: 877-727-5669     (877-SASKNOW)     North America


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0110271601350.67474-100000>