I trying to figure out why copying from a Samba drive to Windows XP is
slower than an FTP transfer beween the same two machines. To copy the 110
MB file from Samba takes 400 seconds, and to transfer the same file by FTP
takes 41 seconds.
From using ethereal, and comparing a fast smb copy to a slow smb copy, I
can see that the slow copy has a _lot_ more tcp traffic for a SMB single
read request. I'm guessing this is the reason for the slow transfer
speed. I'm hoping someone here can verify this (and hopefully tell me
how to fix it!).
My environment is:
Sarge:
Debian Sarge
Samba 3.0.5-1 (smb.conf attached)
vsftpd 2.0.1-1
Sarge has the Samba share and the FTP server.
XP (virtual machine in Sarge):
VMware 4.5.2 build-8848 (bridged network connection)
Windows XP Home, Service Pack 1
Woody
Debian Woody
Samba 2.2.3a-12.3 (for smbmount)
When I copy a file from the Sarge Samba share to XP, it takes ten times as
long as FTP'ing the same file in the same direction.
When I mount Sarge's share from Woody using smbmount, the cp command speed
is a bit slower than the ftp speed (135 seconds instead of 111). This
seems normal.
I ran ethereal on Sarge and captured logs for both the slow and the fast
copy. The fast copy (Woody) repeats this pattern over and over
again:
959 SMB Read Request (115 bytes)
960 SMB Read Response (1514 bytes)
961 TCP [Continuation to #961] netbios-ssn > 1043 ACK (1514 bytes)
962 TCP [Continuation to #962] netbios-ssn > 1043 PSA, ACK (1318 bytes)
963 TCP 1043 > netbios-ssn ACK (963 bytes)
The slow copy (from XP) has two similar SMB packets ("Read AndX
Request" instead of "Read Request"), but from there on the
sequence
differs, with many more TCP continuation packets and one SMB
[TCP Retransmission].
I have attached a section of the ethereal log for the slow copy. It
includes all packets between one "Read AndX Request" and the next. I
have
saved a copy of the complete ethereal logs for both the slow and the fast
copy and can send them if they would be of any help.
I have also attached the log files generated by Samba at log level 3 for
both a fast and slow copy. (A different run that the ran that generated
the ethereal logs.) I removed the time stamps and diff'd them, but
didn't
make out much.
Thanks for any pointers!
Regards,
Mark
P.S. I am not subscribed to this list, so please CC me on any replies.
-------------- next part --------------
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentary and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not many any basic syntactic
# errors.
#
#======================= Global Settings ======================
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = hubcap
# server string is the equivalent of the NT Description field
server string = %h server (Samba %v)
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
; wins support = no
# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z
# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no
# What naming service and in what order should we use to resolve host names
# to IP addresses
; name resolve order = lmhosts host wins bcast
#### Debugging/Accounting ####
# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m
# Put a capping on the size of the log files (in Kb).
max log size = 1000
# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
; syslog only = no
# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0
# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
####### Authentication #######
# "security = user" is always a good idea. This will require a Unix
account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/ServerType.html in the samba-doc
# package for details.
; security = user
# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = yes
# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam guest
obey pam restrictions = yes
; guest account = nobody
invalid users = root
# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
; unix password sync = no
# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Augustin Luton <aluton@hybrigenics.fr>
for
# sending the correct chat script for the passwd program in Debian Potato).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:*
%n\n .
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
########## Printing ##########
# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
; load printers = yes
# lpr(ng) printing. You may wish to override the location of the
# printcap file
; printing = bsd
; printcap name = /etc/printcap
# CUPS printing. See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
; printing = cups
; printcap name = cups
# When using [print$], root is implicitly a 'printer admin', but you can
# also give this right to other users to add drivers and set printer
# properties
; printer admin = @ntadmin
######## File sharing ########
# Name mangling options
; preserve case = yes
; short preserve case = yes
############ Misc ############
# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m
# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY
restrict anonymous = no
domain master = no
preferred master = no
max protocol = NT
ldap ssl = No
server signing = Auto
# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f"
"%m" %s; rm %s' &
# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
; domain master = auto
# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash
#======================= Share Definitions ======================
[homes]
comment = Home Directories
# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0700
# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0700
guest ok = yes
msdfs proxy = no
# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no
[printers]
comment = All Printers
browseable = no
path = /tmp
printable = yes
create mask = 0700
# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
-------------- next part --------------
From To
------- -------
229 1.478358 XP Sarge SMB Read AndX Request, FID: 0x174a,
61440 bytes at offset 184320
230 1.479628 Sarge XP SMB Read AndX Response, FID: 0x174a,
61440 bytes
231 1.479654 Sarge XP TCP [Continuation to #230] netbios-ssn
> 1121 [ACK] Seq=191515 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
233 1.479683 Sarge XP TCP [Continuation to #230] netbios-ssn
> 1121 [ACK] Seq=194435 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
234 1.479693 Sarge XP TCP [Continuation to #230] netbios-ssn
> 1121 [ACK] Seq=195895 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
235 1.479704 Sarge XP TCP [Continuation to #230] netbios-ssn
> 1121 [ACK] Seq=197355 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
236 1.712064 Sarge XP SMB [TCP Retransmission] Read AndX
Response, 61440 bytes
237 1.712817 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=198815 Win=64240 Len=0
238 1.712876 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=198815 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
239 1.712892 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=200275 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
240 1.713354 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=201735 Win=64240 Len=0
241 1.713386 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=201735 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
242 1.713399 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=203195 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
243 1.713409 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=204655 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
244 1.714026 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=204655 Win=64240 Len=0
245 1.714063 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=206115 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
246 1.714076 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=207575 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
247 1.714087 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=209035 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
248 1.714665 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=207575 Win=64240 Len=0
249 1.714702 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=210495 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
250 1.714715 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=211955 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
251 1.715154 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=210495 Win=64240 Len=0
252 1.715186 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=213415 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
253 1.715199 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=214875 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
254 1.715740 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=213415 Win=64240 Len=0
255 1.715775 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=216335 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
256 1.715789 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=217795 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
257 1.716218 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=216335 Win=64240 Len=0
258 1.716249 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=219255 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
259 1.716261 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=220715 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
260 1.717838 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=219255 Win=64240 Len=0
261 1.717899 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [PSH, ACK] Seq=222175 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
262 1.717916 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=223635 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
263 1.717928 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=225095 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
264 1.718523 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=222175 Win=64240 Len=0
265 1.718563 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=226555 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
266 1.718576 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=228015 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
267 1.719567 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=225095 Win=64240 Len=0
268 1.719619 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=229475 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
269 1.719634 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=230935 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
270 1.720000 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=228015 Win=64240 Len=0
271 1.720023 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=232395 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
272 1.720034 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [PSH, ACK] Seq=233855 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
273 1.720625 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=230935 Win=64240 Len=0
274 1.720664 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=235315 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
275 1.720677 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=236775 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
276 1.721102 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=233855 Win=64240 Len=0
277 1.721131 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=238235 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
278 1.721143 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=239695 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
279 1.721700 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=236775 Win=64240 Len=0
280 1.721739 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=241155 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
281 1.721752 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=242615 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
282 1.721762 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=244075 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
283 1.722351 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=239695 Win=64240 Len=0
284 1.722388 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=245535 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
285 1.722401 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=246995 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
286 1.722930 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=242615 Win=64240 Len=0
287 1.722965 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=248455 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
288 1.722978 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [ACK] Seq=249915 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=1460
289 1.723415 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=245535 Win=64240 Len=0
290 1.723446 Sarge XP TCP [Continuation to #236] netbios-ssn
> 1121 [PSH, ACK] Seq=251375 Ack=1574 Win=27872 [CHECKSUM INCORRECT] Len=183
291 1.723722 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=248455 Win=64240 Len=0
292 1.724020 XP Sarge TCP 1121 > netbios-ssn [ACK]
Seq=1574 Ack=251375 Win=64240 Len=0
293 1.726526 XP Sarge SMB Read AndX Request, FID: 0x174a,
16384 bytes at offset 245760
294 1.727107 Sarge XP SMB Read AndX Response, FID: 0x174a,
16384 bytes