Solved

Multi-User very SLOW

Posted on 2010-08-24
10
1,431 Views
Last Modified: 2013-11-24
A user of one of our programs is able to update and save very quickly (although not as quick as others) UNTIL another user logs onto the database.  She becomes unacceptably slow.  The other users are not really affected, although they are a little slower in multi-user mode.

Any ideas?
0
Comment
Question by:fmoore0001
  • 5
  • 3
  • 2
10 Comments
 
LVL 41

Accepted Solution

by:
pcelba earned 250 total points
ID: 33514229
The application cannot be the problem source most probably because I suppose it is installed same way at each workstation.

Ask users to swap their workstations. If the problem persists then check network hardware and connection of the problematic workstation. WKST reinstallation is the last attempt to fix the problem.

It could also be caused by some setting in user profile. The easiest solution is to create a new user in such case.
0
 
LVL 29

Assisted Solution

by:Olaf Doschke
Olaf Doschke earned 250 total points
ID: 33514816
Nothing within VFP. Opportunistic locking, an OS level setting. All file based databases like foxpro and other isam databases, access and other are affected. This needs to be turned off.

This can only be turned off when using SMB1 instead of SMB2. It's not only a PITA because of the slow down, it also is a reason for corrupt dbf headers and indexes.

Here's the longwinded explaination and how tos: http://www.dataaccess.com/whitepapers/opportunlockingreadcaching.html

Besides turning off opportunistic locking, Index your data appropriately to support rushmore optimization.

Bye, Olaf.
0
 
LVL 41

Expert Comment

by:pcelba
ID: 33515177
Olaf, why oplocks disabling should speed the app up? I would suppose opposite effect.
0
 

Author Comment

by:fmoore0001
ID: 33515967
Guys,

I found the solution, and not one you would necessary expect, from a Carl Warner notation in another areas.

Visual Foxpro apparently has some problems with large memory and paging, where it is attempting to balance RAM in physical memory and disk memory, and the setup for the disk memory is slowing it down because it has so much available on modern computers.  I guess Bill Gates still thinks 640K is plenty of memory for a computer (he actually said this).

In any case, use the command =SYS(3050, 1, 100000) to set the memory limit to 10 megabytes.  This will force the program to use the physical instead of disk memory.  As soon as I did  this the program kicked into high gear again.  Whoda thunk it?

The Microsoft article is at:
http://support.microsoft.com/default.aspx?scid=kb;en-us;176483&Product=fox
0
 

Author Closing Comment

by:fmoore0001
ID: 33515986
Thanks guys.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 33516199
Why oplocks do slow down? Well, you see a slowdown when secondary users come into the system. Oplocks explains that, because the mechanism cahes files (whole files) for the first user as long as it's the only user and enables that single user to use a file as if it had exclusive access to the file and the file as local.

That's making it fast until the lock is broken by a second user wanting access to the same file. When the lock is broken all cached differences are written which slows down the process for that first user and others.

Bye, Olaf.
0
 
LVL 41

Expert Comment

by:pcelba
ID: 33516936
Yes, that could explain slownest for all users accessing the same file but not the only one user.
0
 
LVL 41

Expert Comment

by:pcelba
ID: 33517009
SYS(3050,1,10000000) is very close to switching the cache off which results into less effect of oplocks and it could explain the speed improvement.

But still, I have to say, the solution is a kind of magic and it would need some more investigations...
0
 
LVL 29

Expert Comment

by:Olaf Doschke
ID: 33519032
No, the foxpro cache has nothing to do with oplocks, oplocks and read ahead caching is done outside of the foxpro runtime and not influenced by minimizing  the foxpro cache. Oplocks are also not to be confused with foxpros record locking or buffering techniques.

I can only say that I already got a few feedbacks confirming turning off oplocks help. You may simply do so and observe if behaviour changes.

Bad news is that once oplocks is turned off the first user of the system does not have the speedup oplocks do provide, but that's not very tragical as long as the overall performance is okay by indexes and rushmore optimization. Unfortunately the benefit is lost, but the overall better performance for file based databases is without oplocks. oplocks do help quite good for editing word docs stored on a network share, where it's typical only one user has write access anyway, but it's causing more problems than benefits for files in concurrent use.

What I never did was use some tcp/ip paket sniffer and compare network traffic with and without oplocks enabled. I'm pretty sure that would shed a light on the mechanism and what exactly happens, when the oplock is broken. You may give that a try. Wireshark is one recommendable paket sniffer, you also need to install winpcap, but wireshark will also tell you. It's easy to use, you filter for eg SMB packets and log them. Then do some operations on a dbf from one client alone, then do something on a secon client and do that with and without oplocks enabled to see what differs.

Bye, Olaf.
0
 
LVL 41

Expert Comment

by:pcelba
ID: 33519163
So, what we would need is to selectively set oplocks for certain files (or folders) only. I hope MSFT will allow it in the future.

Thanks for the explanation Olaf.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

The canonical version of this article is on my web site here: http://iconoun.com/articles/collisions/ A companion presentation is available here: http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Viewers will learn the different options available in the Backstage view in Excel 2013.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now