From nobody@FreeBSD.org  Sat Jan 31 09:11:00 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2754516A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 31 Jan 2004 09:11:00 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id BB9DB43D55
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 31 Jan 2004 09:10:58 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i0VHAwdL019953
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 31 Jan 2004 09:10:58 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i0VHAwqj019952;
	Sat, 31 Jan 2004 09:10:58 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200401311710.i0VHAwqj019952@www.freebsd.org>
Date: Sat, 31 Jan 2004 09:10:58 -0800 (PST)
From: tom hensel <tom@replic8.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: bad performance using samba-devel with macos x clients
X-Send-Pr-Version: www-2.0

>Number:         62168
>Category:       ports
>Synopsis:       bad performance using samba-devel with macos x clients
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 31 09:20:17 PST 2004
>Closed-Date:    Tue Mar 16 09:22:37 PST 2004
>Last-Modified:  Tue Mar 16 09:22:37 PST 2004
>Originator:     tom hensel
>Release:        4.9-STABLE, 5.2-CURRENT
>Organization:
>Environment:
FreeBSD server.rpdnet.com 4.9-STABLE FreeBSD 4.9-STABLE #0: Wed Jan 28 10:10:19 GMT 2004     root@server.whatever.com:/usr/obj/usr/src/sys/SERVER  i386

as well as a 5.2-CURRENT i386 machine not accesible remotely right now,
userland and kernel built about 10 days ago.
>Description:
two freebsd machines, 4.9-STABLE and 5.2-CURRENT, running samba-devel built from the same revision of the port. as long as samba is being accessed from windows clients (tested 2000 sp5 and sp6, xp sp1, xp pre-sp2) the performance is very good (up to 8mb/s on 100mbit ethernet). accessing samba using macos x (tested with 10.1, 10.2, 10.3) results in very bad performance on reading as well as writing; while i haven't measured the exact bandwidth the macos x window showing the transfer status reads about 128kb every second or so. it's always incrementing in 128kb blocks.

the 4.9-STABLE machine runs ports/net/netatalk to provide fileserver service as a workaround, performance is very good (about 8mb/s).
once tested on the 5.2-CURRENT machine a older version of netatalk perfomed good, too.

i played around with a lot of diffrent things trying to solve the problem, like switching the nic (fxp in both cases) to full-duplex and back, enabling and disabling offloading (ifconfig fxp0 link0), diffrent interface buffer sizes and stuff (smb.conf) as well as some esoteric things like trying diffrent switches, cables, kernels, userlands and so on :)

last try was adapating the port to build samba-3.0.2rc1 which changelog reads some mightbe performance-related changes, resulting in samba-3.0.2rc1 installed on both machines. while this version seems to work stable in general there is absolutely no changes when it comes to  performance.

>How-To-Repeat:
get a freebsd machine. build ports/net/samba-devel, set up a smb.conf and run it. get a macos x client. access the samba server (Apple-K, smb://yourserver). try to read some larger files (maybe write some to the server before for testing) and experience poor performance. get a windows machine for comparison. access the samba server. try to read some larger files and experience good performance.

>Fix:
tried a lot, no fix yet.
>Release-Note:
>Audit-Trail:

From: =?ISO-8859-1?Q?Sebesty=E9n_G=E1bor?= <gabor.sebestyen@freemail.hu>
To: tom@replic8.net, freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: misc/62168: bad performance using samba-devel with macos x clients
Date: Mon, 2 Feb 2004 10:17:36 +0100

 Sadly, I can confirm this case.
 
 I use Mac OS X 10.3.2 as a client and a FreeBSD 4.8 as a server with 
 the latest samba_devel using a normal configuration (no tuning yet).
 Downloading a file through samba results about 5-600kB/s. The same 
 transfer by ftp can accelerate up to 4.2MB/s. The difference is more 
 than acceptable.
 
 Best regards,
 
 	Gabor
 
 "If Dijkstra was opposed to GOTO statements because they made it 
 difficult to determine the exact state of processing, just imagine what 
 he would have thought of code that is dynamically created and 
 executed."
 
Responsible-Changed-From-To: freebsd-bugs->freebsd-ports-bugs 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sun Feb 8 20:44:47 PST 2004 
Responsible-Changed-Why:  
Samba is in ports 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62168 
Responsible-Changed-From-To: freebsd-ports-bugs->dwcjr 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Feb 9 03:11:41 PST 2004 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62168 

From: "David W. Chapman Jr." <dwcjr@inethouston.net>
To: <freebsd-gnats-submit@FreeBSD.org>, <tom@replic8.net>
Cc: <dwcjr@freebsd.org>
Subject: Re: ports/62168: bad performance using samba-devel with macos x clients
Date: Mon, 9 Feb 2004 08:25:07 -0600

 This seems like a bug with samba itself.  I'll try to get you an updated
 version to see if they've fixed it yet, but if they haven't you'll have to
 cantact the samba mailing list.
 
Responsible-Changed-From-To: dwcjr->freebsd-ports-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Mar 4 15:22:01 PST 2004 
Responsible-Changed-Why:  
samba* maintainership was reset to ports@ by marcus on 03/04/2004, 
so return this PR to the pool. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62168 
State-Changed-From-To: open->feedback 
State-Changed-By: osa 
State-Changed-When: Tue Mar 16 09:18:42 PST 2004 
State-Changed-Why:  
Try to use latest version of samba from ports tree (3.0.2a) and 
notify new maintainer about performance. 
Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62168 
State-Changed-From-To: feedback->closed 
State-Changed-By: osa 
State-Changed-When: Tue Mar 16 09:21:40 PST 2004 
State-Changed-Why:  
So, if this problem still exist, please notify new maintainer 
about this problem. 
Thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62168 
>Unformatted:
