Question

Problem with Samba share configuration slowing down our source control program

Asked by: fklein23

This particular problem is driving me nuts. We use a Clearcase derivative called Accurev for source control and we are controlling Linux code with it. Our house network is Microsoft Exchange Server, so that is where the Accurev database is stored. When I host the workspace on Exchange Server, we have negligible latency (3 seconds or so for a workspace update)

But when I try to host the workspace on Linux, the same update takes 75 seconds. Every single operation except just reading a text file from the workspace takes an enormous amount of time. I got a copy of the smb.conf file from a techie at Accurev and compared it to mine. The only difference was that his had this line in it:

I compared my smb.conf file to yours and they were identical except that I didnt have this line in it:

passdb backend = tdbsam

We have SELinux completely disabled and access our shares by IP address rather than by name, so I dont think samba passwords matter.

We do not have to enter passwords to access the shares. So whether we have used passwd or tdbsam doesnt seem important.

Our samba shares are completely open: "security = share" is the most of what's in there other than just specifying the base folders for the shares.

But I added that line to my smb.conf file and restarted samba anyway and saw no difference.

Accurev is disavowing any responsibility for the slowdown, saying that the fault MUST be with Linux and Samba. They also claim that no one else has this problem and MANY of their customers are using samba-hosted workspaces.

I have tried this with Fedora 5, CentOS 5.0 and CentOS 5.3 and have had virtually the same results.

Is it likely that the tdbsam option could be a meaningful difference?
If I wanted to use tdbsam instead of passwd, what would I have to do?
Since I don't explicitly have to enter passwords to access the shares, and have SELinux disabled, doesn't that eliminate it as a candidate for blame?

Any suggestions for fixing this problem would be welcome. Without being able to host workspaces on the machines on which we do our compiles, it makes effective source control much harder to enforoce.



This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-10-28 at 15:11:23ID24852903
Tags

Samba Linux CentOS Microsoft Exchange Server

Topics

Samba File Server

,

Linux Setup

,

CentOS

Participating Experts
2
Points
0
Comments
11

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Samba setup
    I hsve setup a samba server on a fedora 3 platform but am having trouble connecting from windows xp. xp seems to recognise the share but the password is not accepted (the password is right). the samba .config seems to be ok. I have set it up before but this is the first time ...
  2. Samba server
    Hi I did setup Samba server on Fedora 3. How can I create user and share a directory. I will connect using map network drive from Windows XP to connect to Samba server. Regards
  3. Samba config / performance
    Simple question. I want to know how I can specify the number of child processes samba spawns when it starts up? It seems to default to two and I wish to have more. Here's why, for I might be pursuing the wrong solution here. I do a lot of work with this samba server, from mu...
  4. samba printer
    acess denie un able to connect It show when I connect the printer that connect to linux samba server How can i fix

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: it4sohoPosted on 2009-11-03 at 14:47:14ID: 25734733

It sounds to me like you're experiencing some type of a timeout, thus delaying access.

You said: "We do not have to enter passwords to access the shares"

But regardless, I'm guessing that Samba is trying at least one of these:
 1) validating a user (the user you're logged in as on the client)
 2) validating a host (which probably involves a reverse DNS lookup or a NetBIOS query)

In either case, the request for data is having to timeout before access is being granted.

Try the following:
 A) force all access to the shares to be by "guest" user (there is a force user option for each share)
 B) enter the line below to optimize socket utilization (goes in the GLOBAL section):
socket options = TCP_NODELAY SO_RCVBUF=16384 SO_SNDBUF=16384
 C) as a last resort, disable logging (log level = 0)

Good Luck!

Dan
IT4SOHO

 

by: fklein23Posted on 2009-11-04 at 08:12:04ID: 25740787

I tried your suggestion.

I did not disable logging, because I have found not entries in either the messages or secure log during these delay times. I did find these entries in /var/lob/samba/log.smbd:

[2009/11/04 13:35:52, 1] smbd/service.c:close_cnum(1230)
  192.168.101.63 (192.168.101.63) closed connection to service sysroot
[2009/11/04 13:35:53, 0] smbd/server.c:main(944)
  smbd version 3.0.33-3.7.el5 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2008
[2009/11/04 13:36:33, 1] smbd/service.c:make_connection_snum(1033)
  192.168.101.61 (192.168.101.61) connect to service sysroot initially as user nobody (uid=99, gid=99) (pid 29840)
[2009/11/04 13:49:30, 1] smbd/service.c:close_cnum(1230)
  192.168.101.61 (192.168.101.61) closed connection to service sysroot
[2009/11/04 13:49:30, 0] smbd/server.c:main(944)
  smbd version 3.0.33-3.7.el5 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2008
[2009/11/04 13:50:09, 1] auth/auth_util.c:create_token_from_username(1156)
  lookup_name_smbconf for guest failed

After I made the changes you suggested (except the turning off logging, which I reserve for a last resort...)
I stopped Accurev and restarted it and I got an error popup that looked like the attached picture. Previously, I just had long delays after initial startup, the pop-up error is new. Once I click OK on the pop-up, things still work, but with the same long delay.

One thing that I have consistently had problems with is browsing to a Samba share by name.  
If I want to look at a file on /etc/samba/ for instance, on a the Linux samba share 'sysroot' (see the code snippet, where I pasted my smb.conf file). I can do it two ways:

1. browse to workgroup Linux click on ASSETx and then to \sysroot\etc\samba\
OR
2. browse directly to \\192.168.101.65\sysroot\etc\samba\

Method 1 ALWAYS takes a long time and often results in the browser pane getting hung up and having to be killed. I usually never even get to see the ASSETx object.

Method two (which is how I do it in Accurev) always works instantly and I've been using this samba conf file with minor variations on a dozen Linux boxes here every day for 4 years with no issues at all.  Using this method, file copies, editor reads and writes, BeyondCompare, AraxisMerge, etc. ALL work flawlessly.

But with this one application, Accurev, I have these extremely long delays.

I am behind a really secure firewall, so I have all the Linux security disabled and always run as root. They are  strictly engineering development platforms.  I wrestled with Samba and Windows ADS for weeks until it made me insane, so I removed all the security s**t and opened the shares up to the public and since then, everything has run smoothly (until Accurev).

So I wonder if I should make all the files in my primary share owned by root and set up smb.conf share to force user = root, rather than guest?

I'm going to try that and see what happens.

        workgroup = LINUX
        netbios name = ASSETx
        server string = Samba Server
        security = SHARE
        socket options = TCP_NODELAY SO_RCVBUF=16384 SO_SNDBUF=16384
        hosts allow = 192.168. 
[homes]
        comment = Home Directories
        valid users = %S
        read only = No
        create mask = 0666
        directory mask = 0775 
[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        browseable = No 
[source]
        path = /source
        read only = No
        guest ok = Yes 
[data]
        path = /data
        read only = No
        guest ok = Yes 
[datalogs]
        path = /datalogs
        read only = No
        guest ok = Yes 
[root]
        path = /root
        read only = No
        guest ok = Yes 
[sysroot]
        path = /
        read only = No
        guest ok = Yes
        force user = guest 
[development]
        path = /development
        read only = No
        guest ok = Yes 
[beacon]
        path = /beacon
        read only = No
        guest ok = Yes 
[workspaces]
        path = /workspaces
        read only = No
        guest ok = Yes
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:

Select allOpen in new window

 

by: it4sohoPosted on 2009-11-04 at 10:43:16ID: 25742434

The issue won't be with the OS, and I suspect it isn't even with Samba... I still maintain the issue is a networking timeout of some type.

I won't go into the problems with sharing / as sysroot -- I assume you're not stupid, just "trying everything"

Try adding the following lines to your [global] section:

        smb ports = 445 139
        name resolve order = host wins bcast

This will force Samba to listen on (and prefer communications on) port 445 over the older port 139.
Then it will resolve host named based on your /etc/hosts file first -- and you can easily dummy up entries for your entire LAN to make sure lookups (rather, reverse lookups) are uber-fast!

Awaiting results....

Dan
IT4SOHO

 

by: fklein23Posted on 2009-11-04 at 14:15:49ID: 25744611

Dan, that seems to have helped a little.
I think the slowdown is reduced to something closer to 20 or 30 times slower, rather than 75 times slower!

Got any more ideas? I think that the slowdown should be 4 or 5 times slower, which would be manageable, and is something like the slowdown I'd expect based on what we've seen for doing other things, like moving gigabytes of files across the Samba transport layer versus from one Windows folder to another.

I'll try setting up the hosts file and get back to you.

Thanks a bunch - Frank

 

by: fklein23Posted on 2009-11-05 at 15:30:28ID: 25755265

Strangely, the gains I thought we picked up yesterday have mysteriously vanished.
I'm back to 70 times slower :-)
I thought your suggestions were great and should have worked, but somehow yesterday must have been an exceptional coincidence.

 

by: it4sohoPosted on 2009-11-06 at 10:18:56ID: 25761563

Frank....

Let's try to clear something up here... understand that there is a different set of problems
 a) setting up the TCP connection, and
 b) using (transferring data) on that connection.

I've been assuming that the issue is in the first part -- setting up the connection. Perhaps the issue is in part b, the actual transfer of the data. This would lead me to look at the NIC card itself (I know, for example, that some older linux drivers for some of the realtek chipsets could be very slow), or the infrastructure (as in, the switch/router that is connecting the devices (in this instance, I've had situations where clients try to send fast data through the router's switch  -- in other words, file transfers on the LAN that route through the router -- that have had this type of a problem. Most "small business" routers are not designed for high speed data throughput... they're routers, not switches. In my case, replacing the router with a "real" switch with some decent throughput capabilities solved our problem).

This is a rather curious issue... makes one think!!!

Dan
IT4SOHO

 

by: fklein23Posted on 2009-11-10 at 07:09:04ID: 25786078

I don't think transferring the data is the problem. I have 4 years of data with a dozen nodes that have run across different distros of Linux (RH 9, Fedora 3,4,5 and 6 and CentOS 5.0 and 5.3) Different kernels (2.4 and 2.6)

And the data transfer rate of files (many terabytes have been transferred by this time, at the rate of several hundred megabytes per day) between Linux (on about 12 different nodes every day) to and from a Microsoft Exchange based server with some slowdown relative to the speed of transferring within the same computer, but the slowdown between Linux and MS Exchange Server is no slower that between My PC and the Exchange server. Of course we pay a time penalty for using Ethernet instead of SATA, but NOT a factor of 70+

In every case, the data path is the same regardless of whether I am using Microsoft File Copy, BeyondCompare, scp, tftp, ftp, telnet or whatever...

The only place we've seen this slowdown is with this particular database application (Accurev). Nowhere else have we seen this. I can't understand how this could possibly be using a different set of routings than the other applications. I will ask my IT manager again, but he assures me it's the same.

The same NICs were in use for all these applications. The same protocol settings. Everything the same.

I really liked and appreciated the suggestions you made before, I think they were on the right track. It seemed that one day when I tried it i saw a measurable improvement, but the next day that improvement vanished. I just need to know where to look to try and figure out where the other network configuration items are that might be fruitful places to look.

I really think that a likely place to look is this question:
Why is it impossible for me to use named file servers with Samba? Why is the only way I can resolve node identities by using raqw IP addresses? That has consistently been a problem and I'd just bet that part of the problem I am seeing with Accurev is the result of attempts within that database to use named server nodes on the Linux workgroup. I just don't know how to probe this part of our system to see why this is a problem or to determine if that is what Accurev is inf fact doing.

Thanks again. I appreciate your input and would like to continue the discussion.

 

by: aijrealPosted on 2010-04-15 at 01:44:11ID: 30797053

Ditch Accurev, and get VersionOne! Sometimes you have to measure value and performance with the Oh so important "help"! you get from customer service.   It sounds to me that Accurev sat on those hands to help you! Did they even offer to get their technical grade programmers involved in overcoming our issue?   It sounds like some, "front" user/salesman who doesn't know Squat, says.   "Too bad, I got paid, so go away"!   I'd be pissed!  Get accurev on the phone, and demand for them to get you in touch with thier "real" programmers!    Because my guess is: that database is attempting to use named server nodes on the Linux workgroup!     That's why you got the glitch/improvement because when you first attempted to resolve it, the "cache" of your page ignored the inital refresh.   That's why you saw an improvement!    Get Accurev on the phone again, and demand a "real" programmer to help configure Accurev's stream browser S@%T to disallow it's behavior.   Bottom line.  Make them Bite Back!

 

by: aijrealPosted on 2010-04-15 at 02:04:07ID: 30799042

I actually think you may like this solution better:

http://www.axosoft.com/ontime/try_ontime_free

 

by: fklein23Posted on 2010-04-15 at 12:31:40ID: 30855854

aijreal:
Thanks for hanging in there with me.
We are not going to change from Accurev.
We invested a lot in the learning curve and really like the stream-based architecture.
I used to be a ClearCase user, and trust me on this one, ClearCase is WAY more difficult to use than any of the competition.
But still, migration to another system, after we have a huge source repository --> we just aren't going to go there.
This review says it all.
http://www.bxgrant.com/entry/14
He talks about the problems with Accurev and contrasts it with subversion. He is spot on in everything he says.
We have also made good use of the Accuwork tool that is packaged with Accurev. It allows us to track bugs in a very powerful way.
But this Windows <--> Samba <--> Linux connection is simply problematic.
It is problematic not only because of Accurev, but just using named Linux shares through a Windows explorer is a complete bust. I am thoroughly convinced that these two problems are connected and that Windows is the culprit. If Accurev is using named shares, we are sunk.

I am going to try going at this a different way. Perhaps I will try to mount a shared file area on my laptop from Linux.
Then I don't have to host the workspaces on Linux, I can leave them on XP and access them from Linux when I am compiling.

Thanks - Frank

 

by: fklein23Posted on 2010-06-21 at 11:44:17ID: 33039102

I suppose I should close the loop on this issue.

Finally, I put in a Windows share and mounted it from Linux.
This method worked fine. I just changed the Makefile to put object files in a special directory and always assume the source file is in a share area on the developer's PC. The result was very gratifying and now we do not have to keep all those copies of the source code residing on Linux boxes. This allows a much more streamlined development process.

Thanks for all your input, folks, I appreciate it.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...