From owner-freebsd-questions Mon Nov 15 15:56:56 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mentisworks.com (valkery.mentisworks.com [207.227.89.226]) by hub.freebsd.org (Postfix) with ESMTP id 5795F14E6C for ; Mon, 15 Nov 1999 15:56:50 -0800 (PST) (envelope-from nathank@mentisworks.com) Received: from [24.29.197.186] (HELO mentisworks.com) by mentisworks.com (CommuniGate Pro SMTP 3.2b5) with ESMTP id 370334 for freebsd-questions@freebsd.org; Mon, 15 Nov 1999 17:56:39 -0600 Received: from [192.168.245.111] (HELO mentisworks.com) by mentisworks.com (CommuniGate Pro SMTP 3.2b5) with ESMTP id 1180031 for freebsd-questions@freebsd.org; Mon, 15 Nov 1999 13:26:42 -0600 Message-ID: <38305E45.A64E3A81@mentisworks.com> Date: Mon, 15 Nov 1999 13:25:57 -0600 From: Nathan Kinsman Reply-To: nathan@kinsman.com X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: SAMBA / 3.3-Stable / transfer delay References: <38302CAF.2C7286BC@mentisworks.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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