Results 1 to 10 of 10

Thread: slow smb speed

  1. #1
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    slow smb speed

    I'm running a 12.04 file server configured with samba in my home network. I'm getting 4MB/s file transfer speeds over wireless-n router (dlink-dir 655) from ubuntu clients. I've tried some socket optimizations in the smb.conf but nothing works.
    Here is the output of testparm:

    Code:
    [global]
    	workgroup = JAVED-HOME
    	server string = Home-Server
    	map to guest = Bad User
    	obey pam restrictions = Yes
    	pam password change = Yes
    	passwd program = /usr/bin/passwd %u
    	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    	username map = /etc/samba/smbusers
    	unix password sync = Yes
    	syslog = 0
    	log file = /var/log/samba/log.%m
    	max log size = 1000
    	socket options = TCP_NODELAY SO_RCVBUF=262144 SO_SNDBUF=262144 IPTOS_LOWDELAY SO_KEEPALIVE
    	dns proxy = No
    	usershare allow guests = Yes
    	panic action = /usr/share/samba/panic-action %d
    	idmap config * : backend = tdb
    	aio read size = 64360
    	aio write size = 64360
    	aio write behind = true
    
    [printers]
    	comment = All Printers
    	path = /var/spool/samba
    	create mask = 0700
    	guest ok = Yes
    	printable = Yes
    	print ok = Yes
    	browseable = No
    
    [print$]
    	comment = Printer Drivers
    	path = /var/lib/samba/printers
    
    [data]
    	comment = Central Storage Area
    	path = /data
    	read only = No
    	guest ok = Yes
    
    [saad]
    	comment = Saad's Personal Storage
    	path = /home/saad
    	valid users = saad
    	read only = No
    
    [TOSHIBA]
    	path = /media/TOSHIBA
    	force user = saad
    	read only = No
    	guest ok = Yes
    My windows client seems to get slightly better speed (around 4.5-5MB/s even touches 6MB/s occasionally) which I obviously don't like Ubuntu should do better than Windows
    Last edited by sbjaved; November 4th, 2012 at 04:00 AM.

  2. #2
    Join Date
    Aug 2011
    Beans
    327
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: slow smb speed

    In my experience smb speeds depend on the hardware used, if I am directly connected via LAN, speeds are quite high in the range of 25mbps+ but using wireless, it slows down to a measly 1.6mbps average.

  3. #3
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: slow smb speed

    The server is connected to the router via LAN cable. Also wireless-n in 40MHz band should support theoretical transfers of around 16MBps. The same server also runs ftp where I get speeds of 11MBps. I understand samba can't match ftp because it creates a full filesystem but around 8MBps should be doable. I'm no samba expert though.

  4. #4
    Join Date
    Aug 2011
    Beans
    327
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: slow smb speed

    Quote Originally Posted by sbjaved View Post
    The server is connected to the router via LAN cable. Also wireless-n in 40MHz band should support theoretical transfers of around 16MBps. The same server also runs ftp where I get speeds of 11MBps. I understand samba can't match ftp because it creates a full filesystem but around 8MBps should be doable. I'm no samba expert though.
    Try updating router firmware to latest in case you haven't done and see if this issue gets better.

  5. #5
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: slow smb speed

    Quote Originally Posted by Linuxisfast View Post
    Try updating router firmware to latest in case you haven't done and see if this issue gets better.
    Already have the latest firmware running.

  6. #6
    Join Date
    Aug 2011
    Beans
    327
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: slow smb speed

    Quote Originally Posted by sbjaved View Post
    Already have the latest firmware running.
    Can you try with a ethernet cable and see if it improves.

  7. #7
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: slow smb speed

    Sure. I've run into a strange thing. I just set up my brothers laptop with ubuntu. I installed samba and shared his Public folder in his /home by right click -> Share this folder. I put in the correct workgroup in Samba. The computer is able to access the server but when I tried to access his Public folder from the server...it gives an error "Failed to mount: Unable to get share list from the server".

    Here is the output of smbtree on brothers laptop:
    Code:
    JAVED-HOME
    	\\HOME-SERVER    		Home-Server
    		\\HOME-SERVER\ML-2160-Series 	Samsung ML-2160 Series
    		\\HOME-SERVER\IPC$           	IPC Service (Home-Server)
    		\\HOME-SERVER\TOSHIBA        	
    		\\HOME-SERVER\saad           	Saad's Personal Storage
    		\\HOME-SERVER\data           	Central Storage Area
    		\\HOME-SERVER\dvd-rw         	Home-Server Asus DVD-RW
    		\\HOME-SERVER\print$         	Printer Drivers
    	\\DELL-XPS-L502X 		Saad's Laptop
    		\\DELL-XPS-L502X\Public         	
    		\\DELL-XPS-L502X\samsung-ml-2165-laserjet	Samsung ML-2165 Laserjet (hplj-pcl5e)
    		\\DELL-XPS-L502X\IPC$           	IPC Service (Saad's Laptop)
    		\\DELL-XPS-L502X\print$         	Printer Drivers
    Here is the output of testparm:

    Code:
    [global]
    	workgroup = JAVED-HOME
    	server string = Saad's Laptop
    	map to guest = Bad User
    	obey pam restrictions = Yes
    	pam password change = Yes
    	passwd program = /usr/bin/passwd %u
    	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    	username map = /etc/samba/smbusers
    	unix password sync = Yes
    	syslog = 0
    	log file = /var/log/samba/log.%m
    	max log size = 1000
    	socket options = TCP_NODELAY SO_RCVBUF=262144 SO_SNDBUF=262144 IPTOS_LOWDELAY SO_KEEPALIVE
    	dns proxy = No
    	usershare allow guests = Yes
    	panic action = /usr/share/samba/panic-action %d
    	idmap config * : backend = tdb
    
    [printers]
    	comment = All Printers
    	path = /var/spool/samba
    	create mask = 0700
    	printable = Yes
    	print ok = Yes
    	browseable = No
    
    [print$]
    	comment = Printer Drivers
    	path = /var/lib/samba/printers

  8. #8
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: slow smb speed

    nmblookup and smbclient from the server:

    Code:
    saad@Home-Server:~$ nmblookup -B 192.168.0.104 __SAMBA__
    querying __SAMBA__ on 192.168.0.104
    name_query failed to find name __SAMBA__
    saad@Home-Server:~$ smbclient -L //192.168.0.104 -U saad
    Enter saad's password: 
    Connection to 192.168.0.104 failed (Error NT_STATUS_UNSUCCESSFUL)

  9. #9
    Join Date
    Aug 2011
    Beans
    327
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: slow smb speed

    Quote Originally Posted by sbjaved View Post
    Sure. I've run into a strange thing. I just set up my brothers laptop with ubuntu. I installed samba and shared his Public folder in his /home by right click -> Share this folder. I put in the correct workgroup in Samba. The computer is able to access the server but when I tried to access his Public folder from the server...it gives an error "Failed to mount: Unable to get share list from the server".

    Here is the output of smbtree on brothers laptop:
    Code:
    JAVED-HOME
    	\\HOME-SERVER    		Home-Server
    		\\HOME-SERVER\ML-2160-Series 	Samsung ML-2160 Series
    		\\HOME-SERVER\IPC$           	IPC Service (Home-Server)
    		\\HOME-SERVER\TOSHIBA        	
    		\\HOME-SERVER\saad           	Saad's Personal Storage
    		\\HOME-SERVER\data           	Central Storage Area
    		\\HOME-SERVER\dvd-rw         	Home-Server Asus DVD-RW
    		\\HOME-SERVER\print$         	Printer Drivers
    	\\DELL-XPS-L502X 		Saad's Laptop
    		\\DELL-XPS-L502X\Public         	
    		\\DELL-XPS-L502X\samsung-ml-2165-laserjet	Samsung ML-2165 Laserjet (hplj-pcl5e)
    		\\DELL-XPS-L502X\IPC$           	IPC Service (Saad's Laptop)
    		\\DELL-XPS-L502X\print$         	Printer Drivers
    Here is the output of testparm:

    Code:
    [global]
    	workgroup = JAVED-HOME
    	server string = Saad's Laptop
    	map to guest = Bad User
    	obey pam restrictions = Yes
    	pam password change = Yes
    	passwd program = /usr/bin/passwd %u
    	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    	username map = /etc/samba/smbusers
    	unix password sync = Yes
    	syslog = 0
    	log file = /var/log/samba/log.%m
    	max log size = 1000
    	socket options = TCP_NODELAY SO_RCVBUF=262144 SO_SNDBUF=262144 IPTOS_LOWDELAY SO_KEEPALIVE
    	dns proxy = No
    	usershare allow guests = Yes
    	panic action = /usr/share/samba/panic-action %d
    	idmap config * : backend = tdb
    
    [printers]
    	comment = All Printers
    	path = /var/spool/samba
    	create mask = 0700
    	printable = Yes
    	print ok = Yes
    	browseable = No
    
    [print$]
    	comment = Printer Drivers
    	path = /var/lib/samba/printers

    Check if the firewall is turned on, I am sharing with three machines at my house, one desktop and two laptops plus two android phones and all work here, the desktop and one laptop is 12.04, the other one is 12.10

  10. #10
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: slow smb speed

    Yep it turned out to be the firewall. One "sudo ufw disable" later everything started working smoothly. Many, many thanks to you Linuxisfast! You are a saviour.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •