LinHES Forums http://forum.linhes.org/ |
|
major samba slow down in R6/no log files http://forum.linhes.org/viewtopic.php?f=21&t=20691 |
Page 1 of 2 |
Author: | graysky [ Fri Dec 18, 2009 4:02 am ] |
Post subject: | major samba slow down in R6/no log files |
Xfers via SAMBA slow by a factor 25x compared to sftp under R6. When I sftp files from my Linux workstation to my R6 box, speeds are on the order of 50-55 MB/sec. When I xfer via samba I'm lucky if they hit 2 MB/sec. I also have Arch-i686 on my R6 box - on the same hardrive on an 8 gig partition (/dev/sda4). When I boot into Arch on the R6 box and use samba, xfers are in the 50-55 MB/sec range so there is clearly something amiss with the samba/samba conf that R6 is using. Can others confirm on their machines? Here is my R6 smb.conf Code: #======================= Global Settings ===================================== [global] workgroup = WORKGROUP server string = mythtv socket options = TCP_NODELAY # Security mode. Defines in which mode Samba will operate. Possible # values are share, user, server, domain and ads. Most people will want # user level security. See the Samba-HOWTO-Collection for details. security = share # This option is important for security. It allows you to restrict # connections to machines which are on your local network. The # following example restricts access to two C class networks and # the "loopback" interface. For more examples of the syntax see # the smb.conf man page hosts allow = 192.168.1. 127. load printers = no # you may wish to override the location of the printcap file ; printcap name = /etc/printcap ; guest account = pcguest # 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 = 50 # Use password server option only with security = server # The argument list may include: # password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name] # or to auto-locate the domain controller/s # password server = * ; password server = <NT-Server-Name> # Use the realm option only with security = ads # Specifies the Active Directory realm the host is part of ; realm = MY_REALM # Backend to store user information in. New installations should # use either tdbsam or ldapsam. smbpasswd is available for backwards # compatibility. tdbsam requires no further configuration. ; passdb backend = tdbsam # 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. # Note: Consider carefully the location in the configuration file of # this line. The included file is read at that point. ; include = /usr/local/samba/lib/smb.conf.%m # Configure Samba to use multiple interfaces # If you have multiple network interfaces then you must list them # here. See the man page for details. ; interfaces = 192.168.12.2/24 192.168.13.2/24 # Browser Control Options: # set local master to no if you don't want Samba to become a master # browser on your network. Otherwise the normal election rules apply ; local master = no # OS Level determines the precedence of this server in master browser # elections. The default value should be reasonable ; os level = 33 # Domain Master specifies Samba to be the Domain Master Browser. This # allows Samba to collate browse lists between subnets. Don't use this # if you already have a Windows NT domain controller doing this job ; domain master = yes # Preferred Master causes Samba to force a local browser election on startup # and gives it a slightly higher chance of winning the election ; preferred master = yes # Enable this if you want Samba to be a domain logon server for # Windows95 workstations. ; domain logons = yes # if you enable domain logons then you may want a per-machine or # per user logon script # run a specific logon batch file per workstation (machine) ; logon script = %m.bat # run a specific logon batch file per username ; logon script = %U.bat # Where to store roving profiles (only for Win95 and WinNT) # %L substitutes for this servers netbios name, %U is username # You must uncomment the [Profiles] share below ; logon path = \\%L\Profiles\%U # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server ; wins support = yes # 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 # WINS Proxy - Tells Samba to answer name resolution queries on # behalf of a non WINS capable client, for this to work there must be # at least one WINS Server on the network. The default is NO. ; wins proxy = yes # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names # via DNS nslookups. The default is NO. dns proxy = no # These scripts are used on a domain controller or stand-alone # machine to add or delete corresponding unix accounts ; add user script = /usr/sbin/useradd %u ; add group script = /usr/sbin/groupadd %g ; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u ; delete user script = /usr/sbin/userdel %u ; delete user from group script = /usr/sbin/deluser %u %g ; delete group script = /usr/sbin/groupdel %g #============================ Share Definitions ============================== include = /home/mythtv/templates/user.shares include = /etc/samba/smb.conf.media Here is my Arch smb.conf (remember this runs on the same exact box as R6): Code: [global] workgroup = test server string = test security = user hosts allow = 192.168.1. 127. log file = /var/log/samba/%m.log max log size = 50 socket options = TCP_NODELAY [myth] comment = files path = /myth valid users = hope force user = hope force group = hope writable = yes create mask = 0755 I would include a log file but /var/log/samba is empty! Link to flyspray task: http://linhes.org/flyspray/index.php?do ... ask_id=601 |
Author: | graysky [ Sat Dec 19, 2009 9:47 am ] |
Post subject: | |
...do other people using samba have anything in their /var/log/samba directory? There should be several files for example: log.smbd and log.nmbd |
Author: | RacerX [ Sat Dec 19, 2009 10:07 am ] |
Post subject: | |
Graysky In my opinion it seems fine to me. I see nothing wrong in the logs. I run it manually when I need to. From R5.5 to R6 I see no change. |
Author: | graysky [ Sat Dec 19, 2009 10:10 am ] |
Post subject: | |
@RX - mine doesn't make log files at all so I can't see what's wrong with it. /var/log/samba is empty. |
Author: | RacerX [ Sat Dec 19, 2009 3:40 pm ] |
Post subject: | |
I would recommend you remove samba and reinstall it. Give it a try my logs are fine... |
Author: | graysky [ Sat Dec 19, 2009 6:05 pm ] |
Post subject: | |
Thanks, I tried it but no change. Still have horrible throughput and no logs ![]() |
Author: | graysky [ Mon Dec 28, 2009 2:03 pm ] |
Post subject: | |
Fixed it! I found that the value I enter into the service menu's mtu field gets placed into /etc/net/ifaces/eth0/iplink. This some how differs from setting it via the ifconfig command. If I set the mtu manually or via a script in ~/.fluxbox/apps, everything is fine. If I leave it set in the service menu via that iplink file, the problem returns. Link to flyspray ticket: http://linhes.org/flyspray/index.php?do ... ask_id=601 I still have no idea why my samba doesn't write log files, but at least the speed issue is fixed. |
Author: | mihanson [ Mon Dec 28, 2009 2:46 pm ] |
Post subject: | |
In R6 place any custom startup commands, scripts and such into /etc/runit/1.local. |
Author: | bkamen [ Sun Jan 03, 2010 2:16 am ] |
Post subject: | |
I've also noticed SMB is a pig when it comes to xfers. My box is only 100Mb/s -- but it used to cruise.. When I rsync from my media drive (Gb/s Ethernet) I get speeds around 75Mb/s, but when I transfer with SMB it's painfully slow. I can't use jumbo frames (that I know of) with 100Mb Ethernet, so I'm stuck with MTU of 1500. Anyone else figure out why the slowdown? -Ben |
Author: | graysky [ Sun Jan 03, 2010 4:09 am ] |
Post subject: | |
bkamen wrote: I've also noticed SMB is a pig when it comes to xfers.
My box is only 100Mb/s -- but it used to cruise.. When I rsync from my media drive (Gb/s Ethernet) I get speeds around 75Mb/s, but when I transfer with SMB it's painfully slow. I can't use jumbo frames (that I know of) with 100Mb Ethernet, so I'm stuck with MTU of 1500. Anyone else figure out why the slowdown? -Ben 75 MB/sec seems way too fast for 100 Mb dude. I don't even get that on a 1000 Mb. 55 MB/s is high. My experience on 100 Mb was that 9-10 Mb/s was good. What are your local speeds (i.e. copy speeds of a file on the same box)? Unless you're using a modern motherboard/hdd, I doubt even hdd-to-hdd xfer speeds are that high. Also, how large are the files you're moving that report the 75 Mb/s? I would say make sure they're around 1 gig to allow for an accurate result. Transferring small files are not reliable as measures of network throughput. |
Author: | bkamen [ Sun Jan 03, 2010 10:09 am ] |
Post subject: | |
little b dude.. little b. theoretical max for 100Mb is about 12.5MB (big B) per sec. SCP gives me about 7-8MB (big B) SMB gives me like 2.5-3MB (big B) -Ben |
Author: | graysky [ Sun Jan 03, 2010 10:26 am ] |
Post subject: | |
bkamen wrote: little b dude.. little b.
theoretical max for 100Mb is about 12.5MB (big B) per sec. SCP gives me about 7-8MB (big B) SMB gives me like 2.5-3MB (big B) -Ben My bad. Sorry. Did you try adding the following to your smb.conf and restarting the daemon: Code: socket options = TCP_NODELAY
|
Author: | nharris [ Tue Jan 05, 2010 10:45 am ] |
Post subject: | |
graysky wrote: ...do other people using samba have anything in their /var/log/samba directory? There should be several files for example:
log.smbd and log.nmbd As root, edit the file /etc/sv/smbd/run. change the line: Code: exec smbd -F -S -d3 2>/dev/null >/dev/null to: Code: exec smbd -F 2>/dev/null >/dev/null then restart samba: Code: sv restart smbd
|
Author: | bkamen [ Wed Jan 06, 2010 8:32 pm ] |
Post subject: | |
graysky wrote: My bad. Sorry. Did you try adding the following to your smb.conf and restarting the daemon: Code: socket options = TCP_NODELAY Yes. I've got several other machines kicking around running samba that I'm used to hand tweaking.. I tried: socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536 in various inclusions/exclusions... no luck. Bizarre. And I just put together another box (Dell 4400 w/100Mb) and it has the same creepy crawly slog transfers with samba. I did an http download of one of the recorded programs and it just about pegged at 95Mb/s... so what's the beef with samba?? So weird. -Ben p.s. ifconfig says: Code: [root@MythTV ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:50:8D:7C:74:47 inet addr:192.168.125.109 Bcast:192.168.125.255 Mask:255.255.255.0 inet6 addr: fe80::250:8dff:fe7c:7447/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:213998 errors:0 dropped:0 overruns:0 frame:0 TX packets:407962 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:23200117 (22.1 Mb) TX bytes:545541417 (520.2 Mb) Interrupt:18 Base address:0x8000 Additionally, WRITE to myth/smbd speeds are about 20Mb/s while READ from Myth/smbd speeds are about 70Mb/s. Go Figure. |
Author: | bkamen [ Fri Apr 30, 2010 10:29 am ] |
Post subject: | |
Bump ---- Has anyone found any additional goodies concerning this maybe? Just thought I'd ask and see... So far I'm still slogging along. -Ben |
Page 1 of 2 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |