[Samba] Samba performance on FreeBSD and other platforms in a
davon at shires.org
Tue Mar 9 16:59:51 GMT 2004
I have issues with samba on FreeBSD. Before I get into the gory details.
I'll outline some research I've done. As well as try to show that the people
who ask for help and are curious as to why they are getting poor performance
from their file server are not A. Crazy, B. Inexperienced and / or C. Twits.
(Mind you there is every possibility that I could be covered under any or
all of these listings particularly C. If so please produce reasonable proof.
Don't just take the easy route and blame it on bad hardware.)
I've been using FreeBSD since 1.05. It is my Unix of choice and rarely am I
want to suggest/recommend/use another OS though there have been times it
made more sense to use Linux or MS-Windows of some form.
It's my hope that when the thread of this list submission is done. Some good
answers will be availible for the throngs of people out there suffering
performance issues with these kinds of configurations.
People like this poor gent getting a response from someone who pretty much
tells him there's no way there's a bug in Samba.
This person (Dragan Krnic ) provided no real guidence or significant insight
into the problem. In the end he pretty much blames it on a lousy hub. Let's
blame it on the hardware when software can't possibly be a problem.
But his logic in this is seemingly flawed to a reasonably savvy unix geek
and totally missing any logic at all to someone who might be just a schmo
trying to put together a nice unix server for his / her office.
Nicolas starts off with a general description of his problem. Details to
some good extent what his problem is and what he's done to test his network
In it he states that via FTP, his transfers are near the limit of his 10MB
ethernet, both ways. He even tests it for too much CPU load etc. He doesn't
see much in the way of collisions and try as he might he's getting very
asymetrical performance when using Samba with a windows machine.
I use this as an example of the kind of response people get when they try to
get Samba to perform as well as they expect and fail. I have spent dozens of
hours tweaking, tuning, building the latest greatest Samba and no matter the
NIC, the ethernet, the version of FreeBSD. Performance has always been an
I have seen expose and geek news reports that a Linux server running Samba
beats a WIN 2K server blah blah blah. Not FreeBSD though. So perhaps it's
just a fact that Samba only works well on Linux for whatever the reason.
Last night I did my best to get decent performance out of my FreeBSD
fileserver and my Windows XP setup. Allow me to list some specifics for you.
And Then I'll continue.
Network: 2 100MB Full Duplex Switches. CAT 5 twisted pair.
Client1: 900MHZ PIII 512MB Ram, ATA100 40GB HD,
running Windows XP with a Intel fxp type NIC
Client2: 2.65 Ghz P4 1GB Ram, ATA133 120 GB HD,
running Windows XP with a Intel fxp type NIC.
Server: 550MHZ PIII 768MB Ram, ATA66 20GB HD,
running FreeBSD 5.1p10 With a Intel fxp NIC, Samba 3.0.2 (2.2.8,
SMB transfer from Client1 to Client2 6.0 MB/s both ways.
FTP transfers: average 8.7 MB/s from Server to Client1. 5.7 MB/s from
client1 to Server.
FTP transfers: average 9.0 MB/s from Server to Client2. 6.0 MB/s from
Client2 to Server.
( Yes there is some noted asymetry here but the data flow over the network
si smooth, there are no pauses or breaks in the data transmission. )
Samba Transfers: Average 6.0 MB/s from Client1/2 to Server. 1.75 MB/s from
server to Client1/2. (does not matter which machine, they both produce
almost identical network behavior.)
( The reason the average from server to clients is so low is due to
unexplainable lulls in transmission from the server to the client. Peaks in
the transfer near 6.0 MB at times. )
The lulls usually only last a second to 3 or so. But it's the darnest thing
watching them. The transfer to the server looks like a nice plateu one
might like to have a picnic on. While the server to client looks more like
that rocky outcrop they used a billion times in Start Trek out in the
desert. (This is from monitoring network traffic on the Window's Task
Manager in XP as it's graphed.)
CPU load at full burn is about 0.3 from a server really only being used for
Samba. No other machines are accessing the samba server. No other
transactions are taking place. This is all this thing is doing and my tests
are only with one client at a time.
Now you can go on for however long you want about tuning this, and tweaking
that and getting a better hub/switch/computer whatever. But unless someone
can come up with a really good technical and detailed reason why the
hardware isn't satisfactory I have to say samba may only be good on certain
platforms and I'd love to know what they are.
Samba by all it's open source supporters and the OSS people in general
believe that you can pretty much expect as good if not better fileserver
performance as you do with a windows server. There aren't any little * **
or whatever to say (your milage may vary, tweaking utterly required and may
need hardware improvements to equal Windows.)
I talked my company's boss into using a Samba server instead of a NT server
back 4 years ago. Using Samba 2.0.7 and netatalkd on a 750 MHz machine
running FreeBSD. It's worked pretty well over all. And I've been hard
pressed to try another newer version of samba because this works pretty
darn well and all the later versions have this pause/network/asymetrical
thing. (Not to mention the login funk with 's which can rear it's head with
login names like Ron O'hara and such. I found a patch that could fix this
after months of search and struggle.)
I didn't have to do alot of tweaking and that's really how it should be. By
default you should be able to get GOOD performance out of Samba on
reasonable hardware and a reasonable OS. And with tweaking get GREAT
performance. ( Though this might require access to a true copy of the
Necronomicon and making a deal with an Old One.)
I salute the Samba team and their efforts to make Samba do everything a
Windows PDC can do. But if Samba can't perform out of the install as well
as a plain old windows nt/xp/98 machine can. Or even accomplish file
transfers close to FTP. It's going to be harder and harder to sell it to
people and the companies they work for. (And by sell, I mean convince
So I ask you in the spirit of Honest, non-technobabbel (Needed for the suits
of corporate America.), realistic functionality. Is there a unix/samba
platform combination that truly performs well without having to know some
arcane Freemason sign. And ubergeek tweakage. Remember windows and windows
NT and it's ilk pretty much click together and work. I admit now and then
you end up with a problem but over all real people with a moderate
understanding of networks and pc's can make it function well.
I have as previously stated tweaked, recompiled, adjusted. read dozens of
performance tips for getting the most out of Samba and it's just not
happening. I've adjusted read size, Sendbuf and Recvbuf values, MTU, MSS,
lowday, no delay blah blah blah. I've watched for collisions. (None) I've
watched for NACKS ACKS and the last episode of The Tick. But I can't get
much better than I already have out of these machines.
If I'm missing something obvious please tell me. But if it's obvious then
why isn't it working straight out of the Install?
Thank you muchly for your time and listening to my little fit here.
(All rights reserved. Any Rights not reserved shall be considered Lefts and
More information about the samba