[Samba] Samba performance
Juan Pablo
jhurcad at yahoo.com
Fri May 27 07:56:07 MDT 2011
Hi Daniel,
Thanks for your advice.
I thought that XFS was a good alternative as I have plenty of unused CPU. I've
been googling and found that XFS had good performance but used more CPU than
other alternatives.
I will like to get as much as I can from this fileserver. I will try EXT4 to see
if I can make any improvement with it but I am currently seeing a very big
difference on the average speed I get from reading directly (using the dd
command) to what I get with smbclient without passing through the switch.
Thanks again!
Juan Pablo
________________________________
From: Daniel Deptuła <daniel.deptula at gmail.com>
To: samba at lists.samba.org
Cc: jhurcad at yahoo.com
Sent: Thu, May 26, 2011 1:19:03 PM
Subject: Re: [Samba] Samba performance
W dniu 2011-05-26 05:02, Juan Pablo pisze:
> Hi everyone,
>
> I'm trying to use samba in a small video post production house but we are not
> getting the performance we expected.
>
> Our setup:
>
> - CenOS 5.6 x86-64
> - samba.x86_64 (3.0.33-3.29.el5_6.2 and 3.6.0rc1)
> - Intel based server (One 4 core Xeon E5620 @ 2.40GHz, 8 GB RAM)
> - 4 Intel Gigagit ethernet NIC ports with 802.3ad bonding connected to a
switch
> configured tu use 802.3ad
> - 8 2TB 7.2 krpm SATA disks with hardware RAID5 (RAID stripe size 1024 bytes,
> controller and disk cache enabled, readahead enabled)
> - XFS filesystem (created with the following parameters: size=64k -d
> su=1024k,sw=7)
> - Average file size in the share: 8 MByte
> - Gigabit network composed by Cat5E certified cabling and DLink DGS-3427
>gigabit
> switch.
> - Intel I7 based terminals with Intel gigabit NIC, running Windows 7
>
>
> Test results:
>
> OS access:
>
> Sequential write (1 x 31 GByte file): 500 MByte/s
> Sequential read (1 x 31 GByte file): 780 MByte/s
> Write (1000 files 8 MByte each): 249 MByte/s average
> Read (1000 files 8 MByte each): 158 MByte/s average
> Simultaneous write (4 processes each writing 1000 files of 8 MByte each ): 188
> MByte/s average
> Simultaneous read (4 processes each reading 1000 files of 8 MByte each): 118
> MByte/s average
>
> Samba local access (stock CentOS samba 3.0.33 connecting from the same server
> with smbclient):
>
> Sequential read (1 x 31 GByte file): 267 MByte/s
> Read (1000 files 8 MByte each): 71 MByte/s average
> Simultaneous read (4 processes each reading 1000 files of 8 MByte each): 102
> MByte/s average
>
> Samba local access (Samba 3.6.0rc1 compiled from GIT repo. Connecting from the
> same server with smbclient):
>
> Read (1000 files 8 MByte each): 95 MByte/s average
> Simultaneous read (4 processes each reading 1000 files of 8 MByte each): 103
> MByte/s average
>
> Samba server accessed from Windows 7 terminals (samba 3.6.0rc1):
>
> Read (1 terminal copying from samba fileserver to local disk 1000 files 8
MByte
> each): 60 MByte/s average
> Simultaneous read (4 terminals each copying from samba fileserver to local
disk
> 1000 files of 8 MByte each): 70 MByte/s average
>
> Note: Simultaneos read speed is measured adding the size of all transfered
>files
> and dividing it by the time taken to transfer these files.
>
> I will appreciate any feedback about the results we are getting and advice on
> how to improve this.
>
> Thanks in advance
>
> Juan Pablo
Maybe try the ext4 filesystem? With a new kernel - with stable support
for it. Many tests have shown that ext4 is faster than XFS, but also
remember to tune the parameters when creating the filesystem. You can
try several different configurations and compare their performance
(performance for the same parameters can be different on different
hardware and RAID configurations, so options recommended by other people
are not always the best for you). Filesystem mount options are also
important!
The second thing is network - some switches do not do port trunking well
- for example they use always use one wire even if there are 2 or more
connected in a trunk - so it does not improve performance - only the
reliability. Usually also one data stream does not go through more than
one wire, so the only possibility to get 4 Gbit speed from your server
is to connect 4 simultaneously downloading stations to the switch. You
can check the bandwidth usage on each interface of the server with the
iftop command. For measuring the network performance I recommend also
the iperf tool.
Also google about network and tcp tuning in linux (parameters like
txqueuelen, buffer sizes etc).
About tuning samba performance you can read for example here:
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/speed.html
But also in many other places on the Internet.
Best regards,
Daniel
More information about the samba
mailing list