Link to home
Start Free TrialLog in
Avatar of cmmonline
cmmonlineFlag for United States of America

asked on

Slow MS Access Backend on Samba Server

I just set up a new server Systemax 3.2Ghz Processor, 250 Gig Raid, 1 Gig RAM, 100MB NIC from server to each  Workstation. Im using Linux Mandriva 2006 as the OS, I set up Samba  3.0.20 to network to windows XP and Windows 2000 work stations. We are using an erp system that runs on a MS Access Format. The front end of the erp(interface forms and reports) is on the work stations and the Back end of the erp (the tables) is stored on the linux machine in a shared folder. below is a copy of what i have in the "smb.conf" file. The access is really slow when doing queries and opening forms and doing reports, i did have this on an xp machine for a while but it only allows 5 connections at a time and we have about 14-16 required . and sometimes the erp will not work at all until i do a "service smb restart" in a linux terminal window. What can i do to make this erp run at an efficient speed. I'm looking really bad because I boosted on how great Linux is I could really use some input on this.

-------------------------------------------------------
#smb.conf
#=========Global Settings===============

[global]
workgroup = AMS
netbios name = serverp
server string = serverp
security = SHARE
encrypt passwords = Yes
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
unix password sync = Yes
log file = /var/log/samba/%m.log
max log size = 0
#socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY SO_SNDBUF=65536 SO_RCVBUF=65536 IPTOS_LOWDELAY
lock spin time = 15
lock spin count = 30
dns proxy = No
hosts allow = all
# printcap name = etc/printcap
# load printers = yes
printing = lprng
preferred master = yes

[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0777
directory mask = 0777
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
guest ok = Yes
browseable = No
public = yes

[estimate1]
path = /home/Samba/dBase/Cabinet Database/Estimate
user = steve qb admin billm davec tsoda
create mask = 0777
directory mask = 0777
writeable = yes
read only = no

[erp]
path = /home/Samba/ERP
user = steve qb admin brendag danb hollis jims briank daleh pats ronl daveh adamm billm jerrys davec tsoda
create mask = 0777
directory mask = 0775
writeable = yes
read only = no

[bu1]
path = /home
user = steve qb admin
create mask = 0777
directory mask = 0775
writeable = yes
read only = no
ASKER CERTIFIED SOLUTION
Avatar of Kelly Black
Kelly Black
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Do you really have "100MB NIC from server to each  Workstation"?  Or do you mean you have "a 100Mb NIC?"

Meaning, you have 16 workstations, so you have 16 NICs in the server?

If you really have 16 NIC's, then you may be running into a lot of CPU overhead attempting to manage 16 NICs.

If you only have one 100 Mbps NIC then you may want to look at network utlization on the NIC.  That is not a lot of bandwidth for what appears to be a very data I/O intensive.
Avatar of noci
noci

OK, there are several things into play here:

ACCESS:
First access is a central database (file), but every system has it's own database engine running ==>
When a client ask for information the server might have to send a lot (possibly whole tables) of data to
the client(s).
Clients need to coordinate locking (extra overhead) for updating tables. (this is very much an architecture like Dbase-II or DBase-iV etc)
You would probably be better of with a database architecture like mysql, postgresql, oracle where data about queries can be shared and cached on the server. Also only the results of a query will travel the network not a multiple of your database.
How is you database organized, ie do you have indexes or are all queries full table scans.
The latter will cause a lot of traffic.
Indexing might mitigate the above problems a lot.
Try to optimize for locking & minimize full table reads. Explicitly open tables for read only use. Use indexes.
Samba should be able to help the locking issue. see above comment.

Or better try to move to a client/server database architecture in stead of a file sharing architecture.


Network:
You need to measure here. Is your server loaded? (iptraf can tell the bandwidth use).
Also check that all interfaces are correctly configured (The switch port & (client PC / Server) ) need to
agree.. If using a hum all ports need to be 100Mb / Half duplex.
With a switch you can choose half or full duplex but it MUST match. linking a half duplex port to a full port will
work at low traffic volumes and collapse to almost no traffic when the load on the interface is raised.
A HUB can be a lot slower than a SWITCH.
Also what switch are you using.., it's backplane, memory or architecture might restrict you.

Server:
Disks: Are these disks fast?
Are these IDE, SCSI, SATA disks? 7200, 10K 15K RPM?
You cant expect blindingly fast performance from 7200 IDE disks, but should expect it from either SATA,SCSI
15K RPM disks.

Clients:
What NIC's are used here also fast or 10Mbit ones.


Avatar of cmmonline

ASKER

kblack05 , I added the "name resolve order = wins lmhosts hosts bcast" to the smb.conf and that did the trick I do not know what it does but it works thanks alot.....also thanks for everyone else who replyed to the question.
All that does is change the order of how names are resolved to IP addresses.  What was the order before?

Technically it does not speed up the data transfers, but it speeds up the process of finding the IP address of which machine to talk to.  Which for small files that are accessed infrequently could make it appear that the transfer is faster.
Yes giltjr is correct to a degree. This because of the way Samba binds the port, and all of the name resolution checking involved. Sometimes if the system has a complex about who it, or the other computer, is, there will be major performance issues.

The system essentially gets locked in a state of requesting NS.

Re:name resolve order
This line in the configuration tells the system which order, and what sources, it obtains DNS information from. In this case it's using it's internal arp table, which is like a "list of neighbors" so to speak, and usually written in memory...

Most commonly, this problem is caused by a misconfigured hosts list on the computer (on linux it's /etc/hosts and /etc/resolv.conf)...in windows I think they still use SAMS? At any rate, refining these files can resolve performance issues for many types of applications, on all platforms...

Good luck and thanks...
Also you should check the kernel default values for:
(cat /path/to/filename)

/proc/sys/net/core/wmem_max  
/proc/sys/net/core/rmem_max
/proc/sys/net/core/rmem_default
/proc/sys/net/core/wmem_default

The values for the first two should be 8388608
The values for the second two should be 65536

Or you can run the following commands and/or add the following to /etc/rc.d/rc.local

echo 8388608 > /proc/sys/net/core/wmem_max  
echo 8388608 > /proc/sys/net/core/rmem_max
echo 65536 > /proc/sys/net/core/rmem_default
echo 65536 > /proc/sys/net/core/wmem_default

This tunes the TCP settings for the system to improve throughput...

(You can always use TCP Tweak Testing like at www.dslreports.com/tools to test these if you are concerned...)

I believe kblack05 gave you a bad typo
in the line:
 name resolve order = wins lmhosts hosts bcast
I don't believe hosts is an acceptable parameter.  It should be host not hosts.  If the first two fail to resolve anything and host is needed to succeed, it will likely fail if you have hosts.