Date: Mon, 15 Nov 1999 13:25:57 -0600 From: Nathan Kinsman <nathank@mentisworks.com> To: freebsd-questions@freebsd.org Subject: Re: SAMBA / 3.3-Stable / transfer delay Message-ID: <38305E45.A64E3A81@mentisworks.com> References: <Pine.BSF.4.10.9911151146090.79614-100000@ricardis.ricardis.tudelft.nl> <38302CAF.2C7286BC@mentisworks.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Nathan Kinsman wrote:
>
> I can get outstanding write performance, utilizing around 70% of my 100
> meg ethernet hub by setting the recieve buffer to 262144 (performance
> starts flattening around a 65k receive buffer though), but I can not get
> write performance past about 300k, with high delays between packets.
|| oops, this should read I cannot get read performance past 300k.
I'm spending today trying to find a solution for the problem. I've
compiled and installed Samba 2.0.6, but have noticed little difference.
I think there is a port for it on -CURRENT, perhaps some patches
implemented on that port would be helpful (I'm running 3.3-STABLE, and
there does not seem to be a new Samba port yet for this release).
I'm having some luck with increasing the receive window size on Windows
98, I can get performance up about 5% by setting RWIN to 373360 (default
is 8192). Having to change client settings is a poor option though.
I've also tried changing read size from 1024 all the way to the max, and
have seen no changes from this setting.
I do however think I have found an optimal compiler setting, under EGCS
2.95.2. I'm using a Pentium II 450, and I understand from reading
through the EGCS mailing lists that EGCS has some trouble with efficient
use of the L1/L2 cache under high optimization settings with this
processor. I've tried a number of different combinations, and the best
I've found (only 7-8% performance improvement over standard FreeBSD
compiler) is this setting:
-Os -fexpensive-optimizations -funroll-loops -fforce-addr
-fno-strict-aliasing -fno-rtti -fno-exceptions -fomit-frame-pointer
-mcpu=pentiumpro -march=pentiumpro -malign-jumps=2 -malign-functions=2
-malign-loops=2 -s
To get this to work on the Samba port, install the GCC 2.95.2 package
and set the environment variables CC=gcc295 CXX=g++295, or edit
/usr/ports/Mk and add the following:
CC= gcc295
CXX= g++295
MAKE_ENV= CC=${CC} CXX=${CXX}
also, I think you need to make sure
/usr/local/lib/gcc-lib/i386-portbld-freebsd3.3/2.95.2/cc1 is setup as
your cc1, and not /usr/libexec/cc1. I'm not sure how to setup this up
properly, so I just copy the original cc1 to cc1.orig, and then put the
new one into /usr/libexec/cc1. Of course, make sure you put the
original back before compiling the kernel or other FreeBSD source.
More speed can be had by adding the -malign-double flag for compiling,
but this breaks the Intel ABI a bit, and to work reliably you need to
recompile the kernel and world with this flag as well. I do this on all
my servers, and never had a problem - it speeds up most everything a
little (byte alignment bug in gcc, I think the latest is finally fixing
it).
Well, now back to trying to do some packet traces..
-
Nathan Kinsman
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?38305E45.A64E3A81>
