Hi, I have installed Samba 3.0.2a on a Sun Solaris 8 system using a binary package (which was compiled with no particlar option) downloaded from the www.sunfreeware.com web site. The Samba server is installed and configured with the Domain security level and has joined a Windows 2003 AD server (in native mode). I have created a share and a unix logon. The unix logon is associated to that share and is the same as the windows logon on the client box (which runs Windows XP). Anyway, even if it was not, I am using the usermaps.txt file to make sure that no matter the windows logon used, it will be associated to the already defined unix logon. I know, this may not be very secure for now, but it is only for testing purposes. I am performing some benchmarks that will reflect the way I am going to use Samba. Basically, I am copying/creating, via a simple C++ program running on the client box, the same 50 K-Bytes file about 10,000 times on the Samba share. Of course, the file is renamed with a sequence number so that at the end there are 10,000 newly created files on the share. As you might have guessed by now, I am not using Samba to simply replace a file server for windows users. I am using Samba so that a windows application (running in the background) can export files to another unix applications. NFS could have been an alternative, but Samba will integrate this export mechanism in a more transparent fashion. The problem I have right now is that sometime it takes about 350 sec to perform that test and a lot more times it takes about 700 sec. Each time, I am performing the same test without anything different. I noticed that when it performs faster, the smbd % CPU utilization is 5 to 8% and when it is slower, the smbd % CPU utilization is about 25 to 35%. When using a windows share on a windows server instead of Samba on an unix server, it consistently takes about 485 sec. Note 1: The network is not on any particular pre-existing load when performing the test. The same goes for the CPU. Note 2: Why not using Samba 3.0.4? Simply because there is no binary available for Solaris 8 and because compiling it is not working for us right now. Note 3: Why not using the ADS security level? For the same reason as note 2 : the ADS security level requires compilation with Kerberos and OpenLDAP development libraries. Any idea to help resolve this performance/stability issue? Regards, Marcello
On Tue, Jul 13, 2004 at 09:43:02PM -0400, Marcello Melfi wrote:> > I am performing some benchmarks that will reflect the way I am going to use > Samba. Basically, I am copying/creating, via a simple C++ program running on > the client box, the same 50 K-Bytes file about 10,000 times on the Samba > share. Of course, the file is renamed with a sequence number so that at the > end there are 10,000 newly created files on the share. As you might have > guessed by now, I am not using Samba to simply replace a file server for > windows users. I am using Samba so that a windows application (running in > the background) can export files to another unix applications. NFS could > have been an alternative, but Samba will integrate this export mechanism in > a more transparent fashion.Are you creating all these files in the same directory ? If so, that's your answer for why things are slow. Samba has to provide a case-insensitive lookup for a case-sensitive filesystem. Every time you try and create a file that doesn't exist Samba has to do a directory scan to see if the file exists in a different case. This is slow. Fix your app to create into different directories and you'll find it gets much faster. Jeremy.
Hi Jeremy, The C++ application was for testing purposes only. However, the real application we are using is a commercial package for which I do not have any control. In real life, that application will run on a few windows workstations and should export about 3000 to 4000 files per workstation. We were planning to have one directory per worstation within the samba share. Can't do it otherwise... Regardless of the above, why is it that sometimes I get very good results and many other times bad ones? I would expect that this case-insensitive thing be consistent and therefore always generates bad results. Do you have an explanation for this behavior! In any case, is there a way to stop this lookup? For example, always use uppercase or something like that... Note: I really appreciate you for taking the time to respond! Bye, Marcello -----Original Message----- From: Jeremy Allison [mailto:jra@samba.org] Sent: July 13, 2004 21:50 To: Marcello Melfi Cc: samba@lists.samba.org Subject: Re: [Samba] Samba performance/stability issue... On Tue, Jul 13, 2004 at 09:43:02PM -0400, Marcello Melfi wrote:> > I am performing some benchmarks that will reflect the way I am going > to use Samba. Basically, I am copying/creating, via a simple C++ > program running on the client box, the same 50 K-Bytes file about > 10,000 times on the Samba share. Of course, the file is renamed with a > sequence number so that at the end there are 10,000 newly created > files on the share. As you might have guessed by now, I am not using > Samba to simply replace a file server for windows users. I am using > Samba so that a windows application (running in the background) can > export files to another unix applications. NFS could have been an > alternative, but Samba will integrate this export mechanism in a moretransparent fashion. Are you creating all these files in the same directory ? If so, that's your answer for why things are slow. Samba has to provide a case-insensitive lookup for a case-sensitive filesystem. Every time you try and create a file that doesn't exist Samba has to do a directory scan to see if the file exists in a different case. This is slow. Fix your app to create into different directories and you'll find it gets much faster. Jeremy.
Maybe Matching Threads
- Samba's ADS security mode on Sun Solaris
- Small bug with Samba 3.0.7's smbd process (or just a bad compilation)???
- Joining Samba 3.0.2 vanilla to ADS
- Issues/Questions about Samba 3.x.x versus it's Worki ng Status
- 2 log files for the same client workstation accessing a Samba sha re