Himanshu Thapar
2009-Aug-05 23:42 UTC
[Samba] Tuning the performance of Samba over LAN network to improve I/O performance
Hello friends, I am trying to test NAS I/O performance over a network and trying to see the numbers for write and read speed. I have successfully configured and ran a lot of tests. However the numbers have not increased, I have reached a bottleneck. I tried playing around with the smb.conf file including all possible variations like, socket options = TCP_NODELAY SO_RCVBUF=(tried values like 8192, 65535, 131070) SO_SNDBUF=(tried 8192, 65535, 131070) log level = 0 or 1 max xmit = used different numbers ( like 8192 to 65535) I also tried using read raw = yes write raw = yes but the numbers or the write and read performance does not improve. My setup is as follows: I have a Linux machine running ubuntu which is the host and I have it connected to a Windows XP machine over the network and there is also an E-SATA which I mount and try to test on. There is Iozone3 and samba server running on linux. I also have samba on the network. The approximate average numbers I am getting over LAN are: Write: around 23Mbits/sec Read: around 33Mbits/sec Please let me know of cases I can try and shoot up the performance. Any help is appreciated. Thanks.
Miguel Medalha
2009-Aug-06 00:03 UTC
[Samba] Tuning the performance of Samba over LAN network to improve I/O performance
> The approximate average numbers I am getting over LAN are: > > Write: around 23Mbits/sec > Read: around 33Mbits/sec > >Do you really mean Megabits? Or MegaBytes? 33 Megabits (about 4 MB/sec) would be VERY abnormal! Do you have "use sendfile = yes" in your smb.conf? It can be a global option or a per-share option.
Jeremy Allison
2009-Aug-06 00:03 UTC
[Samba] Tuning the performance of Samba over LAN network to improve I/O performance
On Wed, Aug 05, 2009 at 06:42:07PM -0500, Himanshu Thapar wrote:> > I tried playing around with the smb.conf file including all possible > variations like, > > socket options = TCP_NODELAY SO_RCVBUF=(tried values like 8192, 65535, > 131070) SO_SNDBUF=(tried 8192, 65535, 131070)Remove these. You won't second guess the kernel.> log level = 0 or 1 > max xmit = used different numbers ( like 8192 to 65535)Also, don't touch the above, expecially max xmit.> I also tried using > read raw = yes > write raw = yesNot used on an XP client.> My setup is as follows: > I have a Linux machine running ubuntu which is the host and I have it > connected to a Windows XP machine over the network and there is also an > E-SATA which I mount and try to test on. There is Iozone3 and samba server > running on linux. > I also have samba on the network. > > The approximate average numbers I am getting over LAN are: > > Write: around 23Mbits/sec > Read: around 33Mbits/secSeems low, what filesystem/network card are you using ? Jeremy.
Jeremy Allison
2009-Aug-06 00:26 UTC
[Samba] Tuning the performance of Samba over LAN network to improve I/O performance
On Wed, Aug 05, 2009 at 07:11:54PM -0500, Himanshu Thapar wrote:> For the numbers I am getting....Writing averages around 23Mbytes/sec and > Reading averages around 33Mbytes/sec. I am aiming for 30 plus for writing > and around 40 for reading. Both seem to be reasonable.True, but first use hdparm to see what your raw disk numbers should be. Also you first posted Mbits/sec, not Mbytes, which were *very* low numbers :-). Jeremy.
Jeremy Allison
2009-Aug-06 00:46 UTC
[Samba] Tuning the performance of Samba over LAN network to improve I/O performance
On Wed, Aug 05, 2009 at 07:34:51PM -0500, Himanshu Thapar wrote:> Thank you....Okay......can you explain how can I go about with hdparm or > guide me to an appropriate link. Also how will this help me in diagnosing > the current problem?Sorry, you need to learn to use hdparm before you can do any performance diagnostics. Google for the command, and read up on it. Jeremy.
Miguel Medalha
2009-Aug-06 01:08 UTC
[Samba] Tuning the performance of Samba over LAN network to improve I/O performance
> How can I go about configuring my LAN hardware to use Jumbo Frames? >That would be a too long conversation and now I don't have the necessary energy. You can Google for Linux Jumbo Frames. You must identify your LAN card and see its specifications. Also, you need to be sure that your switches support Jumbo Frames. I am on a Red Hat system and in my case the file "/etc/sysconfig/networking/devices/ifcfg-eth#" contains the following line: MTU=9014 This is for a Intel Gigabit LAN card. I don't know it resides in the same place with Ubuntu. Look for the ifconfig command and study its parameters. As for hdparm: You can see your hard disks transfer rates by executing the following: hdparm -t /dev/hd(x) where x is the letter of your particular drive. This is for ATA drive. In the case of SATA or SCSI, it would be /dev/sd(x). This will give you the throughput of your drive *inside* your system. You can now try to make your LAN transfers get as close to that as possible. As an example, in one of my systems the command "hdparm -t /dev/sda" gives me the following output: /dev/sda: Timing buffered disk reads: 350 MB in 3.01 seconds = 116.18 MB/sec I am not in a position now to give you the LAN throughput of this system. I hope that this helps somewhat.
Rob Shinn
2009-Aug-06 01:47 UTC
[Samba] Tuning the performance of Samba over LAN network to improve I/O performance
On Wed, Aug 05, 2009 at 05:46:19PM -0700, Jeremy Allison wrote:> On Wed, Aug 05, 2009 at 07:34:51PM -0500, Himanshu Thapar wrote: > > Thank you....Okay......can you explain how can I go about with hdparm or > > guide me to an appropriate link. Also how will this help me in diagnosing > > the current problem?The following thread on Ubuntu Forums is an excellent guide to hdparm: http://ubuntuforums.org/archive/index.php/t-16360.html Also, read the man page.
Helmut Hullen
2009-Aug-06 06:10 UTC
[Samba] Tuning the performance of Samba over LAN network to improve I/O performance
Hallo, Himanshu, Du meintest am 05.08.09:> The approximate average numbers I am getting over LAN are:> Write: around 23Mbits/sec > Read: around 33Mbits/secTry "netio" for checking the possible transfer rate: http://arktur.de/Wiki/Zusatzprogramme:netio Viele Gruesse! Helmut
Steve Chupack
2009-Aug-06 12:39 UTC
[Samba] Trust relationship and "trusting" member servers
I'm in the process of migrating from a Samba PDC to a Win2k3 PDC (all member servers will remain as Samba boxes). NEWDOMAIN = new Win2k3 PDC OLDDOMAIN = current samba PDC OLDDOMAIN_MEMBER = a current samba box that's a member of OLDDOMAIN I've successfully established a trust relationship between OLDOMAIN and NEWDOMAIN where OLDDOMAIN trusts NEWDOMAIN. Users in NEWDOMAIN have full access to resources on the OLDDOMAIN PDC. Where I'm stuck is granting access to OLDDOMAIN_MEMBER to users in NEWDOMAIN. OLDDOMAIN_MEMBER is joined to OLDDOMAIN and works as expected (Users in OLDDOMAIN can access resources on OLDDOMAIN_MEMBER. But users in NEWDOMAIN do not. Can someone help with the general concept here? Should it work as I've configured it? Does OLDDOMAIN_MEMBER need to be running winbind against OLDDOMAIN PDC, or even NEWDOMAIN? (although I don't see how the latter would work without moving OLDDOMAIN_MEMBER to NEWDOMAIN). Sorry if this is confusing -- tried to make it as clear as possible. Steve