Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Samba] Re: Samba running slow

0 views
Skip to first unread message

Salman Moghal

unread,
Jan 27, 2007, 3:00:11 AM1/27/07
to
Here's my samba version in FC6:

samba-common-3.0.23c-2
samba-3.0.23c-2
samba-client-3.0.23c-2


----- Original Message -----
From: "Salman Moghal" <smo...@yahoo.com>
To: <sa...@lists.samba.org>
Sent: Saturday, January 27, 2007 2:45 AM
Subject: Samba running slow


> Hello everyone:
>
> Over the past few years I have been a happy samba user, running samba on
> Redhat / FC platforms. Recently I upgraded hardware, and Samba hasn't
> been performing well at all.. which makes me sad :-(
>
> The new hardware is Asus P5B board with a dual-core intel processor. This
> board has an onboard Realtek RTL8111/8168B gigabit ethernet controller,
> which was a hassle to setup. FC6 default kernel 2.6.18-x doesn't have
> drivers for it. Upgrading to the latest kernel 2.6.19-1 fixed that.
> Since then I have verified that both web and ftp servers are functioning
> normally. I use apache 2.2.3-5 and vsftpd 2.0.5-8. Downloading a 90MB
> file through apache and vsftp takes less than 1.5 minutes on my local LAN
> (LinkSys WRTGL router). However, if I mount a drive in XP and try to copy
> the same file over samba.. it takes over 20-25 minutes---weird! I looked
> through several online archives and suggestions.. however none seemed to
> work. So I decided to ask for help here.. Please help!
>
>
> Here are some details:
>
> Samba Server:
> Platform: Fedora Core 6 - kernel 2.6.19-1.2895.fc6
> Hardware: Asus P5B motherboard with on-board Realtek RTL8111/8168B
> gigabit ethernet controller
> Samba Client:
> Windows XP Pro (SP2)
> Router:
> LinkSys WRTGL
>
> Note: FC6 kernel 2.6.19-x uses r8169 kernel modules for this realtek
> ethernet controller..
>
> Samba config:
> [global]
> netbios name = JUPITER
> workgroup = HOME.NET
> server string = Linux Samba Server
> security = share
> encrypt passwords = yes
> smb passwd file = /etc/samba/smbpasswd
> hosts allow = 192.168.1. 127.
> guest account = samba
> log file = /var/log/samba/%m.log
> max log size = 50
> interfaces = 192.168.1.1/255.255.255.0
> local master = yes
> dns proxy = no
>
> # disable printing
> load printers = no
> printing = bsd
> printcap name = /dev/null
> disable spoolss = yes
>
> [scratch]
> comment = Scratch Directory
> path = /opt/scratch
> read only = no
> public = yes
> writable = yes
> guest ok = yes
> group = samba
> create mask = 0664
> directory mask = 0775
> ##write list = @root
>
> [web]
> comment = Web Root
> path = /var/www/html
> read only = no
> ##public = yes
> writable = yes
> group = samba
> create mask = 0664
> directory mask = 0775
> ##guest ok = yes
>
>
> ethtool info:
> Settings for eth0:
> Supported ports: [ TP ]
> Supported link modes: 10baseT/Half 10baseT/Full
> 100baseT/Half 100baseT/Full
> 1000baseT/Full
> Supports auto-negotiation: Yes
> Advertised link modes: 10baseT/Half 10baseT/Full
> 100baseT/Half 100baseT/Full
> 1000baseT/Full
> Advertised auto-negotiation: Yes
> Speed: 100Mb/s
> Duplex: Full
> Port: Twisted Pair
> PHYAD: 0
> Transceiver: internal
> Auto-negotiation: on
> Supports Wake-on: pumbg
> Wake-on: g
> Current message level: 0x00000033 (51)
> Link detected: yes
>
>
>
>
>

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Salman Moghal

unread,
Jan 27, 2007, 3:00:13 AM1/27/07
to

Salman Moghal

unread,
Jan 27, 2007, 3:50:08 AM1/27/07
to

I should have kept reading through the samba archive online. There was a
similar, very recent, reported problem:

http://groups.google.com/group/linux.samba/browse_frm/thread/8bf6e9791ae9b3cd/0a038c363be7ba2a#0a038c363be7ba2a

After adding these lines in smb.conf, copying a file over samba share was
lightening fast (just as fast as over FTP/HTTP connection):

socket options = TCP_NODELAY
oplocks = no
level2 oplocks = no

My eventual goal is to be able to play mp3 and movies over LAN. And I've
run into the same problem with streaming a file across (as mentioned in the
thread) -- streaming a file is very choppy.

Any ideas?


----- Original Message -----
From: "Salman Moghal" <smo...@yahoo.com>
To: <sa...@lists.samba.org>
Sent: Saturday, January 27, 2007 2:48 AM
Subject: Re: Samba running slow


> Here's my samba version in FC6:
>
> samba-common-3.0.23c-2
> samba-3.0.23c-2
> samba-client-3.0.23c-2
>
>
> ----- Original Message -----
> From: "Salman Moghal" <smo...@yahoo.com>
> To: <sa...@lists.samba.org>
> Sent: Saturday, January 27, 2007 2:45 AM
> Subject: Samba running slow
>
>

Tom Van den Eynde

unread,
Jan 27, 2007, 8:40:11 AM1/27/07
to
Hello,

I just read your thread in the mailing-list and I do experience exactly the
same problem.
I have the exact same hardware (Asus P5B, Core 2 Duo) and the same version
of kernel and samba. Actually I have tried the 'd' revision of samba but
that doesn't work either.
Unfortunately, I have not been able to solve it just yet and I too would
very much like to tackle this issue.

Now I am not a samba/kernel hacker but my gut feeling tells me that it is a
combination of the latest kernel 2.6.19-1 with samba. Thanks to the cutting
edge hardware, I cannot downgrade to an earlier kernel version to test as
this do not support all features of the mobo.

Today, I am planning on compiling the 2.6.19-2 kernel and see if that helps.
2.6.20 is also coming out soon but I don't see anything in the change log
what could lead to solving this issue.
Another approach might be to change the NIC to a standard PCI 100 Mbit card
which is well supported by the kernel for years, but I would very much like
to get it working in the current setup.

I will keep you posted if I find anything. I would really appreciate it if
you let me know when you are making progress too.

If someone else has ideas, I am also open for suggestions.

Kind regards,

Tom

Tom Van den Eynde

unread,
Jan 27, 2007, 10:30:08 AM1/27/07
to
Just a quick update : 2.6.19.2 kernel gives the same issues

Salman Moghal

unread,
Jan 28, 2007, 4:00:25 PM1/28/07
to
To get around this slowness issue -- a combination of asus mobo, its onboard
"Realtek RTL8111/8168B gigabit controller" and perhaps even the new kernel
2.6.19-1 -- I was suggested two things:

1- use "ethtool" to turn off "auto-negociation" feature
2- disable the on-board realtek card and use a standard PC100 10/100 network
card.

I tried to fiddle around with ethtool but couldn't disable auto-negociation.
Finally I disabled the onboard card and replaced it with an old LinkSys NIC.
The problem went away. I am now using Linksys card that uses "tulip" kernel
drivers (I was using before the upgrade and never had any problems). Also,
I have removed all the tweaks for oplocks from smb.conf.. and I'm not seeing
this problem. I'm still not sure what is the root cause:

- kernel 2.6.19-1 driver "r8169" for Realtek RTL8111/8168B gigabit
controller cards, or
- samba not being able to work with the network driver?

For now, I'm going to run with my current config until someone in the samba
dev community would be kind enough to test out this config and come up with
a fix. It would be ideal to get the Realtek RTL8111/8168B controller
working.

----- Original Message -----
From: "Tom Van den Eynde" <t...@vandeneynde.net>
To: "'Salman Moghal'" <smo...@yahoo.com>
Sent: Saturday, January 27, 2007 8:28 AM
Subject: [Bulk] RE: Samba running slow


> Hello,
>
> I just read your thread in the mailing-list and I do experience exactly
> the
> same problem.
> I have the exact same hardware (Asus P5B, Core 2 Duo) and the same version
> of kernel and samba.

> Unfortunately, I have not been able to solve it just yet and I too would
> very much like to tackle this issue.
>
> Now I am not a samba/kernel hacker but my gut feeling tells me that it is
> a
> combination of the latest kernel 2.6.19-1 with samba. Thanks to the
> cutting
> edge hardware, I cannot downgrade to an earlier kernel version to test as

> these do not support all features of the mobo.


>
> Today, I am planning on compiling the 2.6.19-2 kernel and see if that
> helps.
> 2.6.20 is also coming out soon but I don't see anything in the change log
> what could lead to solving this issue.
> Another approach might be to change the NIC to a standard PCI 100 Mbit
> card
> which is well supported by the kernel for years, but I would very much
> like
> to get it working in the current setup.
>
> I will keep you posted if I find anything. I would really appreciate it if
> you let me know when you are making progress too.
>

> Kind regards,
>
> Tom
>
> PS: I will reply to the list as well, as every extra info might be useful
> for the samba community.


>
>
> -----Original Message-----
> From: Salman Moghal [mailto:smo...@yahoo.com]
> Sent: zaterdag 27 januari 2007 9:51
> To: t...@vandeneynde.net
> Subject: Re: Samba running slow

> Importance: High
>
> Hello:
>
> I was browsing through samba archives and noticed that you also ran into
> the
>
> exact same problem as I have recently encountered with samba shares and
> file
>
> streaming. Recently, I also upgraded to a new hardware (Asus p5b board
> with
>
> on-board Realtek controller and dual-core processor) -- I use Fedora Core
> 6
> & samba version 3.0.23. Since the upgrade, samba hasn't worked the same..
> and it's painful since I have a lot of services that depend on samba
> shares.
>
> I would really appreciate any input / feedback / tips / work-arounds on
> this
>
> streaming issue..
>
> Regards
> Salman Moghal

simo

unread,
Jan 28, 2007, 4:10:13 PM1/28/07
to
On Sun, 2007-01-28 at 15:55 -0500, Salman Moghal wrote:

> I tried to fiddle around with ethtool but couldn't disable auto-negociation.
> Finally I disabled the onboard card and replaced it with an old LinkSys NIC.
> The problem went away. I am now using Linksys card that uses "tulip" kernel
> drivers (I was using before the upgrade and never had any problems). Also,
> I have removed all the tweaks for oplocks from smb.conf.. and I'm not seeing
> this problem. I'm still not sure what is the root cause:
>
> - kernel 2.6.19-1 driver "r8169" for Realtek RTL8111/8168B gigabit
> controller cards, or
> - samba not being able to work with the network driver?

Samba has no knowledge of drivers, it just uses the kernel interfaces.
If a network card does not work properly it is either an hardware
problem or a kernel driver problem.

--
Simo Sorce
Samba Team GPL Compliance Officer
email: id...@samba.org
http://samba.org

Tom Van den Eynde

unread,
Jan 30, 2007, 6:40:12 PM1/30/07
to
Thanks for the feedback. I will try to install another NIC this week and see
if I have the same results.

My guess still is the kernel driver. The only strange thing is that it only
effects Samba. All other network protocols are running fine.

I have seen that Realtek also provides a driver on their website:
http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=5&PFid=
5&Level=5&Conn=4&DownTypeID=3&GetDown=false

Unfortunately this driver causes my kernel to panic.

I have googled some more and found the following kernel bug report:
http://bugzilla.kernel.org/show_bug.cgi?id=7555

The status is closed for the moment there however.

Sherwood Botsford

unread,
Feb 1, 2007, 12:20:05 PM2/1/07
to
Salman Moghal wrote:
>
> I should have kept reading through the samba archive online. There
> was a similar, very recent, reported problem:
>
> http://groups.google.com/group/linux.samba/browse_frm/thread/8bf6e9791ae9b3cd/0a038c363be7ba2a#0a038c363be7ba2a
>
>
> After adding these lines in smb.conf, copying a file over samba share
> was lightening fast (just as fast as over FTP/HTTP connection):
>
> socket options = TCP_NODELAY
> oplocks = no
> level2 oplocks = no
>
> My eventual goal is to be able to play mp3 and movies over LAN. And
> I've run into the same problem with streaming a file across (as
> mentioned in the thread) -- streaming a file is very choppy.
>
> Any ideas?
>
>

IP generally is choppy. If you want to do this right, I think you need
switches that understand quality of service flags -- and then you have
to set those on the appropriate packets from your samba server.

However in many cases the MP3 / Video players have an adjustment for how
large a buffer cache to run ahead before starting to play. Having a
buffer that is sized to be 10-30 seconds of playing time will help a
lot for this.

Also look at your bandwidth.

Run iostat on your server. A 100 mbit (fast ethernet) connection
typically will get you 3-7 Mbytes per second. If you're well under
this, then the ethernet isn't the bottleneck. You don't mention if you
have gigabit everywhere, and have the ethernet infrastructure to support
it. If you have gigabit to the switch, and fast ethernet to the
desktop, you should be able to make streaming video work well.

You may want to look for specific software to handle streaming -- If you
do it as multicast, then multiple users who want the same stream don't
tie up your server nearly as much.

Of course I could be wrong about all this. Your milage may varry.

Aaron Kincer

unread,
Feb 1, 2007, 12:30:14 PM2/1/07
to
In pure mathematical terms, the maximum throughput on 100MB ethernet is:

100Mb / 8 = 12.5 MegaBytes per second.

That assumes, of course, a perfect world with a 100% efficient protocol.
Of course, this doesn't exist. So in network design, if you have one
100MB link from the switch your server is plugged into serving multiple
clients, then best case throughput is:

12.5 / N

Where N is the number of clients pulling data from the Samba server at
any moment in time. Gigabit is a bit better of course:

1000Mb / 8 = 125 MegaBytes per second

Assuming your server's hardware can sustain that throughput or more,
100MB switches with gigabit ports to cascade from the server backbone
are the most desirable. If your server can definitely sustain better
than the 125 MBps threshold (and you have load balanced NICs installed),
it would be beneficial to either place your heaviest users directly on
your server backbone or to have multiple cascaded switches.

0 new messages