Extremly Slow Samba
Hi,
I have installed the Mandriva 2007 with the original Samba server package and my problem is that it works very very slow from my windows XP. The connection works fine but is very slow. When i Browse my shared folders it takes forever to open directories and even longer to open textfiles. I tried to watch a movie to and the movie was stopping the whole time. Has anyone any idea what it could be that causes this? /aripari |
Start reading the manual. Also invest time to find the optimal format options for the desire filesystem. I use XFS, so SAMBA works as fast as Windows. A 100 Mb network can not transfer more than 12 megabytes per second. If you have a 1 Gb network, the throughput will depend on the hard drive throughput, the bus speed, and hub or switch that is used. A firewall can also limit the throughput and the reliability of the connection.
I suggest not using Mandriva because it has too many loose screws. |
Is there anyway to reformat the disk without reinstalling Linux?
|
Get another hard drive that is equal or greater than the data that is taken up. Copy the data and format the partitions. Then copy the files back on the drive. Re-installing Linux is ridiculous.
|
I'm having the same issue using Ubuntu.
I have a brand new machine running Feisty (Dual core chip, 4gb ram, 1gbps Ethernet). I have set it up for both Samba shares and FTP connections on my local LAN. The problem is: I can transfer a 1GB file in under two minutes over FTP, but when I try to transfer the exact same file between the same two computers over samba it takes ~120 minutes. Is there anything I need to check in my configuration off the bat? I have done: Ubuntu (server) -> Windows Ubuntu (server) -> Fedora Core 5 smbclient Both run at the same, very slow, rate. This is only a problem when downloading from the server. File transfers back to ubuntu run fine. Windows -> Ubuntu (server) -- full speed I feel like it is a configuration issue, since more people haven't noticed this problem. I've tried playing around iwth the socket options line, with the following options set: #socket options = TCP_NODELAY socket options = TCP_NODELAY socket options = IPTOS_LOWDELAY TCP_NODELAY socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 There's not really any relevant stuff that I could see in the logs. No errors stuck out. Any ideas and I'd be greatful! Thanks, Tom |
I use the following line and it has equal performance like computer's running Windows.
socket options = TCP_NODELAY SO_RCVBUF=16384 SO_SNDBUF=16384 The filesystem that I use is XFS. I am using 100 Mb network, so the throughput is only around ten megabytes per second. Though I do have a 1 Gb Realtek model 8169 that I thought it will be slower (higher latency) compared to the Linksys 100 Mb card. The time it takes to copy from or to SAMBA to another computer running either Linux or Windows is the same amount of time it takes two computers using Windows to transfer a gigabyte file. The hard drive brands that I use is Hitachi/IBM and Western Digital. The cause of slow performance is the network parameters for the kernel, SAMBA configuration, network security, and firewall. SAMBA needs four ports open such as 137, 138, 139, 445. I suggest increase the log level for SAMBA to get more information what it is actually doing. |
I'm not too worried about the file system. I've got ext3, but even better, when I do an FTP transfer of the exact same file, it doesn't have the problem (and goes approx 100x faster for large files).
I added the changes to SO_RCVBUF SO_SNDBUF but they didn't seem to do anything. I think they are simply performance tweaks.....I'm looking for a serious performance bug -- two orders of magnitude in speed. I can only assume that if any connection is going through, the necessary ports are working. Is there a good way to check this? Here's a rundown of what happens in the logs. I have: socket options = TCP_NODELAY SO_RCVBUF=16384 SO_SNDBUF=16384 log level = 2 sudo /etc/init.d/samba restart log.smbd Code:
[2007/04/27 03:27:11, 0] smbd/server.c:main(847) Code:
[2007/04/27 03:27:11, 0] nmbd/nmbd.c:main(699) log.smbd Code:
nothing new Code:
nothing new Code:
[2007/04/27 03:28:51, 2] smbd/reply.c:reply_special(496) Code:
[2007/04/27 03:28:51, 2] auth/auth.c:check_ntlm_password(309) File Size 8mb - takes 30sec instead of less than 5 log.smbd Code:
nothing new Code:
nothing new Code:
(continueing after what was shown above) Code:
(continueing after what was shown above) |
If the SAMBA version that you are using now has the same problems with other Ubuntu users, I suggest complaining to the maintainer that creates pre-compile deb packages. If you want, try compile samba. Include the async option. EXT3 has poor throughput for large files. You can keep on trying increase the buffer for SAMBA until performance improves for large file writing and reading.
My SAMBA version is 3.0.22 and it is compiled by using Gentoo's utilities. |
I don't think this is an EXT3 issue, because, as I said, I get MUCH faster transfer speeds using ftp, same file, same filesystem. The only thing I can imagine is that SAMBA makes fs specific calls, and doesn't do them well for EXT3, but then we would have seen this many times before.
I may try a samba compile, hopefully I'll have some time to look at this over the weekend. |
Just for the record, I got very weird behaviour with a Realtek 8169 here.
Samba server uses a RTL8111/8168B PCI Express Gigabit Ethernet controller. Samba client uses RTL8169S PCI Gigabit Ethernet controller. Sambla client uses CIFS. Samba client to server is reasonably fast (>20MBytes/Sec). Samba server to client is very slow (<2MByte/Sec!). The interesting thing: scp is fast (>20MBytes/Sec) in both directions. No trouble listed in logs or ifconfig. Playing with ethtool offload options didn't change anything. Playing with Samba server options didn't change anything. Using the vendor driver for R8169 on the client didn't change anything. Replacing the network card on the client fixed the issue immediately. I wouldn't believe this if someone told me but this really seems to be some odd quirk with Samba (NOT other progs) and the R8169 network card. Possibly other hardware is involved here, too - using a SiS 746-based mainboard on the client. |
Quote:
/Aripari |
Hi all.
I encountered this problem myself on a new client (Slackware rather than XP...) with (you guessed it) an on-board Realtek card: Code:
$ lspci Old /etc/fstab entry Code:
//SERVER/homes /mnt/smb smbfs username=user,password=pass,fmask=0644,dmask=0755 0 0 Code:
//192.168.0.22/homes /mnt/smb cifs username=user,password=pass,file_mode=0644,dir_mode=0755 0 0 That seemed to ramp up the pace nicely - getting around 7-8 MB/sec now (reported by mc). Hopefully this helps somebody. |
I have Realtek 8169 gigabit NIC on a PCI Gigabit NIC/USB 2.0/IEEE-1394 combo card hooked up to a HINT Technologies PCI-PCI bridge, then hooked up to an Intel 82801BA, next hooked up to a Intel 82850, and finally hooked up to a 400 MHz quad-pumped bus being shared with RAMBUS memory. On my 100 megabit network and with a dying hub (not switch), I get close to 8 megabytes per second. I normally use smbfs. If I do get a 1 gigabit switch, I do not expect anything higher than 66 MB per second in full duplex mode.
PCI can not transfer 133 MB per second in full duplex mode because there is not enough bandwidth. In order to get 133 MB per second in full duplex mode, it will need a bus that can handle 266 MB per second. I never use midnight commander or mc to calculate the throughput. I use time with cp. Then I calculate the throughput afterwards using the time and file size. IMHO, the best way to test for network throughput is a file from a server and piping it to null on the client side. The selection of a file system matters how much throughput you want to read and write. XFS and JFS are high throughput file systems and they fight for 2nd best for reliability. EXT2/3 are low throughput file systems, but it is the most reliable. ReiserFS has poor throughput and poor reliability. In order to handle 133 MB per second, you will need to put at least four hard drives in RAID-0 (stripping). The worst of conditions, you will need eight hard drives in RAID-0. |
Own reply to posting 10 ;-):
The Samba issue with RTL8169S-based PCI cards has also been mentioned in the current c't magazine (issue 12/2008, page 158 - german). Interestingly, the issue comes up only in the measurements table and not in the actual article text. In the table, other PCI cards transfer about 50MBytes/Sec, but for the RTL8169 card no speed is given - instead a footnote states measured speed was <5MBits in test runs. Probably they couldn't make sense of that behaviour either ;-). I wonder why such a thing can happen. It's not like RTL8169-based cards and Samba servers are that rare... |
Slow samba
1 Attachment(s)
Did anybody get to the bottom of this?
Samba Version 3.5.5-68.fc13 I have the same problem but slower still. Samba used to be so quick. Regards |
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 ~] addopt this line Code:
netbios name = b1 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] |
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 |
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. |
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 |
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.
|
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 6103AFIK 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. |
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 |
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 |
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. |
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 02:54 PM. |