LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Extremly Slow Samba (https://www.linuxquestions.org/questions/linux-server-73/extremly-slow-samba-536370/)

dlugasx 10-04-2010 06:54 AM

This is a problem with finding proper netbios name. Thats why is so slow.

First check Your netbios name.

in my case it is:

Code:

[root@b1 ~]
In /etc/smb.conf in section [global]

addopt this line

Code:

netbios name = b1
Ofcourse instead of b1 please put Your netbios name.

Please do not forget to put the same name in URL (this is important!! )

\\b1\public\



Samba is not slow and doesnt need extremly fast hardware. It needs proper configuration. Here You have example of perfect working configuration.


Code:

[global]
  workgroup = BGROUP
  interfaces = 192.168.1.34 127.0.0.1 eth1
  server string = NewFileServer
#  bind interfaces only = true
  netbios name = b1
  security = user
  encrypt passwords = yes
  smb passwd file = /etc/samba/smbpasswd
  writable = Yes
  inherit permissions = Yes
  name resolve order = lmhosts host wins bcast


[homes]
  comment = Home Directories
  valid users = %S
  browseable = Yes
  read only = No
[public]
  comment = shared zone
  path = /home/share-zone
  writeable = Yes
  create mode = 0775
  inherit permissions = No
  writable = Yes


rayfward 10-05-2010 03:26 AM

Thanks for the reply.
About 6 years ago I had a FreeBSD samba server and the speed was impressive especially with media files.
It's such a long time since set one of these up that I opted to use the "Samba Server Configuration tool" which left out the NetBios name.
I think I'm going to go back and do this the old fashioned way.

Regards.

Ray

jstaffon 01-29-2011 10:31 PM

I hope so because my problem is even a weirder issue.....

Machine 1: Ubuntu 10.04
Machine 2: Suse 11.3
Machine 3: FreeNAS (FreeBSD 7.3)

Samba transfers across a gigabit link:
Machine 1 -> Machine 2 : 300 Mb/s
Machine 2 -> Machine 3 : 300 Mb/s
Machine 1 -> Machine 3 : 10 Mb/s

All three systems have the same version of Samba and socket options = TCP_NODELAY with receive and transmit windows at 64240.

I don't believe it's the network or the NIC because I can mount the file system from Machine 3 onto Machine 1 and get 300 Mb/s.

This is so strange!!
jeff.

rayfward 01-30-2011 11:56 AM

When I first asked about speed issues I was using system-config-samba to configure samba with mixed results.
I consider the issue as resolved because of the following lines.

workgroup = BGROUP
server string = NewFileServer
netbios name = b1

They are significant but they don't seem to be managed by some of the configuration tools. I manualy edited the config file and Tada works fine now.

Oh by the way. Well done with the base config dlugasx. It works a treat.
jstaffon I think you will probably need to take another look at your smb.conf and leave the configuration tools alone.

I would wish you luck but I don't think you will need it.

Regards

jstaffon 01-30-2011 05:42 PM

Thanks for the reminder about the config tools. I always configure the smb.conf with vi but in the case of the machine in question, I've just tweaked the original config file. I think I'll strip out all of the crap thats commented out and not necessary. A smaller, simplified config file is always better. Great idea! Thanks.

bartman2589 03-01-2011 02:41 AM

Samba itself isn't necessarily to blame, I had a 550mb file I needed to transfer from my Kubuntu system (a fresh install of Kubuntu 10.10 Maverick less than a week old, but with all updates installed) to my Windows XP system and when I initially started the transfer the time was reported at about 2 hours, even after letting it go for a few seconds it still was reported at around 1 hour and 50 seconds. I've done transfers around this size from Windows to Windows systems and usually it takes around 10 minutes or so (depending on whether I'm surfing the web at the same time or not), so I knew something was really screwed up here. I had been originally using the onboard VIA 6103 NIC ,which was giving me excellent torrent download results and excellent web download results as well, but I decided to try some of the other PCI bus NIC cards I had lying around. Below are the results I obtained with each card WITHOUT modifying my samba configuration at all.
1) Linksys LNE-100TX Ver. 5.1 - Transfer reported approximate time at about the same as VIA 6103
2) D-Link DFE-530TX+ Rev-F1 - Again almost the exact same results as the VIA 6103
3) Unbranded card with MX98713FC Chipset - Caused system to hang a few seconds into transfer
4) 3Com 3C905B (tried and true card supported by pretty much every PC operating system in the world) - knocked about 10 seconds off the reported transfer rate.
5) Unbranded RTL8139D Chipset based card - Apparently not supported by Kubuntu for some reason or bad card.
6) Farallon RTL8139C Chipset based card - Transfer time dropped to about 7 Minutes instead of around 2 hours!!!!
AFIK all of these cards are 10/100 cards, the 3Com, Linksys, D-Link and MX98713FC based card are definitely supposed to be capable of 100mbs connections, as is the Farallon card (indicated by the presence of a 100mbs indicator LED on some of them).

To me this indicates a pretty serious problem with the default configuration of a number of the kernel modules/drivers/etc.. that are used to support some of the cards above, it's pretty sad when a generic cheapo RTL8139C based card can blow some of those other major brand name cards out of the water the way it did.

The specs of the system I did this on are as follows:
CPU: AMD Athlon XP 2400+ w/266mhz FSB
MB: DFI KT-600AL
RAM: 1.5Gb PC3200 (DDR-400) running at 400mhz
Video: nVidia MX-4000 PCI card w/128mb memory
Audio: Onboard VIA 8237 integrated audio
HD: 160Gb Western Digital IDE (PATA) hard drive UDMA5
DVD: Samsung SH-S222A 22X DVD burner

I admit this was by no means a scientifically conducted test but the results do seem to speak for themselves indicating a problem with the default configuration of the various kernel modules.

SergioRuiz 03-03-2011 05:04 PM

Hi there,

Someone else here with the same issue... In my case I have a RTL 8139.

I'm trying to move files from a hard disk connected to a media server (WD TV Live) to an Ubuntu box. I also have the speed issue, usually less than 1 MB/s.

The thing is that if I move more than one file at the same time, I get a much higher speed. So it seems like the limitation is at one file at the time.

I have changed the samba conf file as pointed out, but in my case it does not apply, as I'm using smbclient... any hints? (samba config on the server cannot be modified, in any case, from a windows box it goes pretty fast).

Thanks!

Sergio

samtoddler 09-27-2011 03:19 AM

Extremly Slow Samba
 
Hi,

Its a bug in ubuntu.
you can check it out here

https://bugs.launchpad.net/ubuntu/+s...mba/+bug/84782

samtoddler

xamfap 01-31-2012 08:58 AM

I cannot post URLs since this I am new. Shame. Google "samba performance" and read up on how to tune samba.

For ubuntu 10 or 11 I suggest:

socket options = TCP_NODELAY
write_raw = no
read_raw = no

read/write_raw may make things worse. It depends how fast your network is compared to the servers HDD and how much "risk" you are willing to take. For example, I use them for a server with a huge RAID that has 8GB of memory and is backed up with UPS.

UbuntuLove 01-06-2013 12:50 PM

Ubuntu 12.10 server with OS X 10.7 client
 
I'm running ubuntu 12.10 and was connecting to samba share with MBPro 10.7 (os x) and experiencing a max transfer rate of 80/kps, suuuuuuuper slooooooow.

After reading endless posts on the matter and trying all sorts of other clients to connect with (as well as servers) none of them were anything like the native smb connection on os x (command K to connect to server) transfer rate i had with ubuntu 11.10.

My socket options for this uber fast transfer rate with my 11.04 smb server were as such:
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192


I've been using this setting for about 5 years across multiple server installs so one would think it'd be just fine for ubuntu 12.10 .... wrong! fortunately I came across this thread bc 1 simple change fixed it for me.

My new socket options in my smb.conf on ubuntu 12.10 are now as such:
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=16384 SO_SNDBUF=16384


bla dow! uber fast once again - MASSIVE PROPS ELECTRO! TY :)


All times are GMT -5. The time now is 12:04 PM.