On Mon, 26 Apr 2004, Alexander Lazarevich wrote:
> Samba guru's:
>
> Our Samba 3 network performance is half that of Windows 2003
> Server. I really want to stay with samba/unix, but half the
> performance? I'm hoping someone can point me in the right
> direction so we can keep using samba/unix. I'll try to give
> as much detail without giving pages and pages of benchmark
> numbers. If someone wants to see numbers, I'll send them:
>
> Fileserver is Dell PE2600, Dual Xeon 18GHz, 2GB memory,
> Gig NIC. System is dual boot RHEL3-AS with an ext3 filesystem
> and Windows 2003 Server with NTFS. The fileserving disk is a
> SATA-SCSI RAID enclosure. Bonnie++ and iozone both show that
> the RAID enclosure can do 80MB/sec writes and 40MB/sec reads
> on the ext3 in linux. Benchmarks in windows 2003 are very
> similar. Why it gets faster writes than read, I don't know,
> and I don't care right now. What I'm worried about is our
> samba network performance.
I think you should be more worried about why you get these
inferior & contradictory values. You are using some kind of
hardware raid controller with a scsi plug to you system and
it strikes me as an extremely poor design performance-wise.
No wonder it performs so poorly. About 45 MB/s both ways are
possible between winboxen and samba with G-NICs and good
disks. I only have a bdc and 5 w2k/xp workstations on a low-cost
NetGear 8-port G-switch (the other 50 or so clients connect
through a fast-lan switch) but I do get about 35 MB/s to and
from pcs and up to 60 MB/s between sambatistas.
The ext3 file system has a problem with sata, which I've been
chasing for months. In my case the writes made at most
71 MB/s but reads were just normal with an average of
260 MB/s, occasionally up to 310 MB/s, using a 6-drive
software raid0 attached to a HighPoint RR1820.
To summarize, you might be better off using xfs file system
with that particular hardware setup.
> Clients are Windows XP/2K/NT4 pro with all patches installed
> and Gig NICs. All the clients can netperf to the server at
> 60+MB/sec, some even faster. No collisions on the NICs,
> nothing wrong with the network. There is a cisco Gig switch
> inbetween the client and the server as well.
>
> Here is the bottom line:
>
> When the server is running samba 3, the clients get
> 12-13MB/sec.
>
> When the server is running windows 2003, the clients get
> 24-26MB/sec.
>
> Keep in mind the server hardware is exactly the same, the
> only thing I change is the software. Windows 2003 beets up
> Samba 3, hands down.
On the other hand, Windows 2003 servers tend to boss it
over everybody below their rank, so when you switch from
w2k3 to samba your client might be wasting their time
trying to talk ads to the now absent server. I'm not
sure your numbers are relevant under these conditions.
I don't know much about w2k3 but I always had weird
performance problems if a w2k3 was anywhere near my
samba domain.
> However, all this testing is done by just drag and drop, and
> looking at the clock to time it. Not the best way to do it,
> but I don't know of another way now, suggestions welcome.
> The difference is obvious and consistent: 500MB file in
> samba 3 writes to disk in 42 seconds, but writes to windows
> 2003 disk in 21 seconds. I can produce the same results on
> all of our clients any time of the day.
With sufficiently large test files your method might be
accurate enough, but still it's better to use the
program "timethis.exe" to measure the execution time of
a program like this:
timethis copy C:\a-big-file X:\a-share
It can be downloaded from Microsoft for free but you need
to underclick an eula.
> I've tried changing the smb.conf socket options (TCP_NODELAY,
> SO_SNDBUF, etc.) to 65523, 242xxx, whatever. /etc/init.d/smb
> restart, then try again. No change in performance whatsoever.
> Still 12-13MB/sec. I've also set other options in smb.conf,
> such as xmit, write size, read size, but nothing seems to
> change the fact that samba 3 can't do more than 12-13MB/sec.
>
> I've also searched the list, and found some people had success
> in performance issues by changing the SO_SNDBUF, but they
> didn't list any benchmark numbers. Maybe they were happy with
> 12-13MB/sec, but I'm not, especially if something else can get
> 25MB/sec.
My socket options are "SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY".