[Samba] samba 3.3 - poor performance (compared to NFS)

Gary Dale garydale at rogers.com
Mon Oct 4 16:14:30 MDT 2010


On 04/10/10 05:55 PM, scott_stone at trendmicro.com wrote:
> OK, I can do that.  In production this box will not be CIFS-mounted by Linux machines, but I wanted to do the iozone benchmarks so I could compare apples-to-apples vs. NFS.  I will go hunt down and repackage a newer CIFS client for centos 5.5.
>
> Any other hints on server-side tuning that I should be aware of for this case?
>
> ====================
> Scott Stone<scott_stone at trendmicro.com>
> Lead Developer, DCS-RD
> Trend Micro, Inc. http://www.trendmicro.com
>
> -----Original Message-----
> From: Jeremy Allison [mailto:jra at samba.org]
> Sent: Monday, October 04, 2010 2:54 PM
> To: Scott Stone (DCS-RD-US)
> Cc: samba at lists.samba.org
> Subject: Re: [Samba] samba 3.3 - poor performance (compared to NFS)
>
> On Mon, Oct 04, 2010 at 02:51:17PM -0700, scott_stone at trendmicro.com wrote:
>    
>> I have a system that I'm vetting as a NAS server.  It has a 2.0TB XFS filesystem mounted on /storage and I'm doing benchmarks using nfs3, nfs4, and samba.  I'm testing via iozone by mounting the filesystem from my "nas client" box and then running iozone on the mounted filesystem.  NFS seems pretty fast - ie, several orders of magnitude faster than samba, and I'm wondering why, so I'm beseeching the help of the List. :)
>>
>>
>>
>> server: sama 3.3.8
>>
>> client: Linux CentOS 5.5 cifs mount, "mount -t cifs -o rsize=32768,wsize=32768 //server/storage /storage"
>>
>> Client is on the same LAN as the server, albeit different VLANs.  Traffic is routed through intel gigabit NICs and Cisco Nexus 5000/7000 series switches.  NAS server has a 4x 1gbe 802.3ad port channel set up with the Cisco 7000 switch, although I've run these tests both with and without the port channel with very similar results (as I'd expect, since the client is only a single 1gbe interface to begin with).
>>
>>
>>
>> (the 32768 numbers are the same as used in the NFS3/NFS4 tests).
>>
>> Again, the problem is *markedly* slower performance on CIFS than with NFS, and I cannot discern why, so I'm assuming it's some kind of samba tuning issue.  I do plan to re-test with samba4, but any recommendations as to a specific version of samba that I could use which would provide maximum performance/stability would also be much appreciated.
>>      
> You might want to try a more recent cifsfs build than the one on CentOS 5.5.
>
> It's almost certainly a client issue here, I know Steve and Jeff have been
> putting work into improving the CIFSFS client performance (Steve and Jeff
> please comment :-).
>
> Jeremy.
>
> TREND MICRO EMAIL NOTICE
> The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system.
>    

I'm not sure why you need to test. If you're using Windows clients or 
using Samba Domains for single-signon, Samba is almost always the best 
choice. If you're using anything else, then go with NFS.

For example, I have a mixed-client network so I need Samba for the 
Windows users. This also means my best bet for Unix-like clients is to 
use Samba for authentication as well.

However, if I was running a pure Unix/Linux environment then NFS would 
be an easy choice.

On the principle of keeping it simple, I would need some really 
extraordinary reasons to run both.


More information about the samba mailing list