Strange DBF/CDX behaviour over network - Any ideas?

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Post Reply
User avatar
Stavros Spanos
Posts: 115
Joined: Thu Nov 12, 2015 4:59 pm
Location: Greece

Strange DBF/CDX behaviour over network - Any ideas?

Post by Stavros Spanos »

Hi all!

The last 20 years we work allmost all our apps over MS SQL , so my DBF experiance is really small..

We have a DBF/CDX app that deals with Mechanical Projects financial control. It has some DBF's that deal with work details (something like timesheets for workers), that we have to summarize when entering the project window.

Of course this should be built in SQL but for legacy reasons it still stands with DBF/CDX.

Sudently a new customer - with 3-4 users over network started complaining for bid delays WHEN A SECOND USER WAS USING THE PROGRAMM!.

We tried to reproduced in our office and were astonished to find out that a typical DO WHILE inside a scope containing 2800 records (we use the proper index of course) was taking:

- 0,5 seconds when only one user runs the programm
- 24 seconds when another user uses the files from another workstation

Is this as expected?? Do I miss something??

Any ideas appreciated.

Stavros
User avatar
Chris
Posts: 4961
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Strange DBF/CDX behaviour over network - Any ideas?

Post by Chris »

Hi Stavros,

Just to absolutely clear, this is with VO, is that right?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
wriedmann
Posts: 3775
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Strange DBF/CDX behaviour over network - Any ideas?

Post by wriedmann »

Hi Stavros,
if you are talking about VO: yes, that is it.
When only one user is using the database, the client caches a lot, so it is much, much, much faster.
I can only give you two solutions:
- cache whatever you can in your application
- change to SQL databases

AFAIK the difference is so large not because the multiuser access has slowed down so much, but because the single user access has speed up.

We have similar complaints from a lot of customers, and unfortunately ADS is no solution.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
OhioJoe
Posts: 131
Joined: Wed Nov 22, 2017 12:51 pm
Location: United States

Strange DBF/CDX behaviour over network - Any ideas?

Post by OhioJoe »

Stavros:

It's been awhile since I encountered this but your post jogged my memory. It might have something to do with Opportunistic Locking

Here's the relevant Microsoft article.

Here are the user instructions I added. (Can't remember when I wrote this, but it's on our website.)

Edit each computer's registry to disable Opportunistic Locking on both the clients and the server. (Note: Monkeying around with a computer's registry is dangerous, which means you should enlist the help of someone who knows how.)

To disable oplocks on a Windows client PC (the computer that accesses the server), change or add the following Registry value:

Code: Select all

HKEY_LOCAL_MACHINESystemCurrentControlSetServicesMRXSmbParameters OplocksDisabled = 1
To disable oplocks on the SERVER, change or add the following Registry value:

Code: Select all

EnableOplocks = 0 
Stavros, these instructions were intended for old Windows server editions so I don't know if it will help in your case. But this is one potential solution that should be relatively easy to test.
Joe Curran
Ohio USA
ngpollarolo
Posts: 20
Joined: Mon Feb 29, 2016 3:51 pm
Location: Nicaragua

Strange DBF/CDX behaviour over network - Any ideas?

Post by ngpollarolo »

Stavros

This is a reg file I use for the problem you have described. Run it in the server and in the terminals. It need Windows compatibility with SMB1 (Control panel, Programs and features, Turn Windows features on or off).
I hope this can help.
ngpollarolo
Posts: 20
Joined: Mon Feb 29, 2016 3:51 pm
Location: Nicaragua

Strange DBF/CDX behaviour over network - Any ideas?

Post by ngpollarolo »

REGEDIT4

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesMRxSmbParameters]
"OpLocksDisabled"=dword:00000001
"CscEnabled"=dword:00000001

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanServerParameters]
"EnableOplocks"=dword:00000000
"CachedOpenLimit"=dword:00000000
"autodisconnect"=dword:ffffffff
"EnableOpLockForceClose" = dword:00000001
"SharingViolationDelay"=dword:00000000
"SharingViolationRetries"=dword:00000000
"SMB2"= dword:00000000
"SMB1"= dword:00000001
"ConnectionNoSessionsTimeout"=dword:ffffffff

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanWorkstationParameters]
"UseOpportunisticLocking"=dword:00000000
"UtilizeNtCaching"=dword:00000000
"UseUnlockBehind"=dword:00000001
"UseLockReadUnlock"=dword:00000000
"EnableOpLocks"=dword:00000000
"EnableOpLockForceClose"=dword:00000001
User avatar
Stavros Spanos
Posts: 115
Joined: Thu Nov 12, 2015 4:59 pm
Location: Greece

Strange DBF/CDX behaviour over network - Any ideas?

Post by Stavros Spanos »

Thanks all for your effort to help.

Unfortunately the registry settings suggested didn't help. Nice things to find out 33 years after dealing with DBF's :-)
User avatar
Stavros Spanos
Posts: 115
Joined: Thu Nov 12, 2015 4:59 pm
Location: Greece

Strange DBF/CDX behaviour over network - Any ideas?

Post by Stavros Spanos »

THE SOLUTION

(I’m talking loud to myself, as though you hinted to it somehow I didn’t get it at first..)

Well just tested that if we put all DBF/CDX files in C:Appdirectory in ONE PC and run various instances from various windows users on this machine through RDP , all work fine and fast for all users.

On the contrary when accessing DBF/CDX files from a certain shared drive over a network the problem rises and access to files is dramatically slow when another PC uses any of them. The reasons for this are well described on this thread.

Thanks all for your thoughts and help!
User avatar
wriedmann
Posts: 3775
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Strange DBF/CDX behaviour over network - Any ideas?

Post by wriedmann »

Hi Stavros,
of course, the RDP solution is the best one.
For smaller customers, you can look to AADS: https://www.aads-worldwide.ch/
It transforms a Windows client machine in a terminal server (home versions excluded).
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
MJI
Posts: 17
Joined: Wed May 24, 2023 11:58 am

Strange DBF/CDX behaviour over network - Any ideas?

Post by MJI »

I would have suggested ADS, not used non ADS for multi user since AXS3 in the mid 1990s.

Always found the non client server RDDs too flakey for heavy multi user.
Post Reply