[Samba] ftp 8x faster than samba

Dragan Krnic dkrnic at googlemail.com
Mon Sep 4 21:09:42 GMT 2006


Rober Adkins wrote:
> Blaine Armsterd wrote:
>> Robert Adkins wrote:
>>> Again, I suggest that you test like things with like things, test
>>> a Windows server's file sharing and then Samba file sharing. Test FTP
>>> on a Windows server and then FTP on a Linux server and do this on a
>>> controlled network where only the workstation and the server are
>>> connected via one hub that has no other network connected to it. That
>>> way you can more clearly determine which is faster.
>>
>> I tested the samve server and the same file over the same connection.
>> There's 2 boxes on the switch here at my house. There's no more
>> testing necessary. I can transfer the 723Mb file in 24 seconds using
>> FTP. There's no reason for Samba to take over 2 minutes.
> Samba and FTP both have vastly differing overheads that affect the
> transfer of files. Samba (and Windows Server's Filesharing) will never
> equal FTP in performance. Neither will even come close. FTP is an
> entirely different protocol that is extremely loose and insecure.

As a matter of fact, In a properly set up network there should be
no significant difference in speed between FTP and Samba WHEN
transfering large files. For tests I usually open a DOS window,
change to a share and just time the copy command in both
directions with "timethis.exe", like this:

   C:\> W:
   W:\> dir  aBigFile
   31.08.2006 00:11 184.751.471 aBigFile

   W:\> timethis  copy  aBigFile  C:\Temp
   1 File(s) copied. Elapsed Time : 00:00:16.877

   W:\> timethis  copy  C:\Temp\aBigFile
   1 File(s) copied. Elapsed Time : 00:00:16.573

which means about 11 megabytes in either direction. FTP won't give
you any better speed over a 100 Mbps link from PC to switch. Even If
you connect to a gigabit switch through a proper gigabit NIC and a
good cable the limit will be the speed of client's disks. A single
disk can't give you more than about 50-60 meggabytes per second
with either FTP or Samba.

Robert Adkins wrote:
> For example, if you are using ReiserFS, then you would see a marked
> increase in reading/writing and subsequently file sharing for
> relatively small files in, I believe, the sub-32kb range as ReiserFS
> is tuned for sharing many small files very quickly. However, ReiserFS
> (At least the last version I was using) wasn't great for serving large
> files, like the 700MB test file you are using.

Reiserfs 3.6 serves big files via Samba just as fine as small files.
In all my tests the bounds are the throughput rate of the network
and the ability of the client's mass storage to absorb and emit data,
not the Samba software or the file system used.

So to come to the point, if someone says his FTP transfers run 8x
faster than Samba, then he/she actually means to say that his/her Samba
server provides only 1/8th of the available power. This usually means
that that person's network is not configured properly. Unfortunately,
saying "ftp 8x faster than samba" is insufficient diagnostic to be able
to pinpoint the problem. Even the addition in quoted mail that there
are a server a client and a switch between them just scratches the
surface. There's a lot more details we don't know about the setup.

My guess is that there is a problem in name resolution. Blaine, do you
get same transfer times when using IP-adress and unqualified name?
I mean if your server's name is "samba" and its IP-address is let's say
"192.168.1.1", do you get the same speed/slowness when you use

   \\192.168.1.1\yourShare

as when you use

   \\samba\yourShare

?


More information about the samba mailing list