Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2001 08:24:54 -0800
From:      "Kevin Oberman" <oberman@es.net>
To:        Smirnov Konstantin <sam@rmp.ru>
Cc:        freebsd-net@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG
Subject:   Re: Tuning up FreeBSD - http://www.samag.com/documents/s=1147/sam0108q/ 
Message-ID:  <200112141624.fBEGOsd19051@ptavv.es.net>
In-Reply-To: Your message of "Fri, 14 Dec 2001 11:47:35 %2B0300." <16162204675.20011214114735@rmp.ru> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Fri, 14 Dec 2001 11:47:35 +0300
> From: Smirnov Konstantin <sam@rmp.ru>
> Sender: owner-freebsd-net@FreeBSD.ORG
> 
> Hello all!
> 
> Look what I've found in
> http://www.samag.com/documents/s=1147/sam0108q/
> This is recomendation on tuning FreeBSD for higher perfomance when
> it's used as the net server.
> 
> ====================== cut ========================
> FreeBSD Tuning Tips
> 
> The following FreeBSD OS tuning tips were suggested to us by readers of our article. 
> 
> In single-user mode: 
> 
>  tunefs -n enable /
>  tunefs -n enable /usr
>  tunefs -n enable /var
> 
> Kernel modifications to make -- recompile and install the kernel afterwards: 
> MAXUSERS 512
> 
>  in /boot/load.conf
>  hw.ata.wc="1"
>  kern.ipc.nmbclusters="60000"
>  in /etc/fstab
> 
> Add to options for all hard disk file systems ",async": 
> 
>  In /etc/sysctl.conf
>  vfs.vmiodirenable=1
>  kern.ipc.maxsockbuf=2097152
>  kern.ipc.somaxconn=8192
>  kern.ipc.maxsockets=16424
>  kern.maxfiles=65536
>  kern.maxfilesperproc=32768
>  net.inet.tcp.rfc1323=1
>  net.inet.tcp.delayed_ack=0
>  net.inet.tcp.sendspace=65535
>  net.inet.tcp.recvspace=65535
>  net.inet.udp.recvspace=65535
>  net.inet.udp.maxdgram=57344
>  net.local.stream.recvspace=65535
>  net.local.stream.sendspace=65535
> ====================== cut ========================
> 
> What is your opinion? Is that parameters suitable for ALL systems? (I
> think, no ;))) Maybe, somebody tried it yet?

If it was a good idea on all systems, there would be no tuning to
do. The values you suggest are generally a good thing for a fairly
fast link. Several of the values you suggest are default and others,
like the expansion of send and recvspace are a good idea as long as
you are on a fairly fast line to the world. On a slow line, this sort
of thing can deteriorate performance.

One thing I would certainly add is the expansion of mss to 1460 if you
are Ethernet connected.

You suggestions also require substantially more memory than the
defaults, so it is not a good idea for a system with only limited
memory. (Of course, with current memory prices, most systems have no
problems in this area!)

There are two items I must take issue with.
1. I would not enable soft updates to /. If you use the default
partition size for /, it will tend to break the system if you update
it. And soft updates on / are seldom a significant improvement since
writes to / are fairly limited.

2. If you use soft updates, why are you suggesting that the file systems
run async? In combination write cache on the disks, you are really
asking for a disaster and the whole idea of soft updates is to allow
safe asynchronous disk writes most of the time without risk to file
system integrity.

Running any system that needs reliability with this combination (write
cache on, soft updates, and async) is a true recipe for disaster.

R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@es.net			Phone: +1 510 486-8634

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112141624.fBEGOsd19051>