My applications that utilize DBFNTX run really fast with one user and really slow with 2 or more users logged in at the same time.
Has anyone experienced this?
Harbour 3.2.0
BCC 5.82
Fivewin version 13.02
Thanks in Advance.
don
www.laapc.com
My applications that utilize DBFNTX run really fast with one user and really slow with 2 or more users logged in at the same time.
Has anyone experienced this?
Harbour 3.2.0
BCC 5.82
Fivewin version 13.02
Thanks in Advance.
don
Yes I do.
How many indexes do you have?.
Since when are you suffering this?.
Lucas,
It is quite normal that ntx is becoming slower if the number of users is increasing.
For each index, a ntx-file is created. If you open a DBF-file with its ntx-files, every file takes a file handle.
In my application, I open 38 different files with at least 7 indexes per file. This means (1 x 38) + (7 x 38) = 304 file handles per user.
If you have 5 users, that means 1520 file handles on your server.
I experienced too that my application was becoming slower and slower.
I changed to CDX indexing. For 1 DBF-file, only 1 CDX-file is opened. In my excample that would mean 74 file handles per user.
If you have 5 users, that means 370 file handles on your server.
After having made the change, my application ran fine again.
Your antivirus can also be the cause of slowing down your application. Try it out with the antivirus disabled. I had this problem with some old versions of Norton. The current versions are OK.
Hope to have helped you.
Regards,
Michel D.
Genk (Belgium)
I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773
Hello,
Thank you very much. Yes, I switched to DBFCDX many years ago.
Now I use CDX with various Tags and only one .cdx file per dbf, but in Network, with 3 or more users it is quite slow.
We are now moving to ADO and the problem has gone away
.
With ADS there was an increase on speed, but not very very much.
I did not find what was the problem with > 3 users and DBF to be such slow. With ADO and Access, for example, same network and a database of 8.000 records the speed is almost like the local PC.
Harbour leaders are not very much interested on Windows, so they don麓t pay many attention on those issues, and it is hard to trace the problem.
Lucas,
search for SMB on the forum.
What OS do you use.
Best regards,
Otto
Otto,
Windows XP and Windows 7 mostly.
I do not use mapped drives, just \server\folder, so I taought SMB was not the cause:
viewtopic.php?f=3t=21740p=115743hilit=smb#p115743
Interesting post also:
https://en.wikipedia.org/wiki/Server_Message_Block
Do you know if Harbour function OS_NetRegOK() disables SMB?.
Thank you.
&&&
#include "directry.ch"
#include "hbwin.ch"
/* NOTE: To change any of these registry settings
聽 聽 聽 聽 聽Administrator rights are required by default in Windows. [vszakats] */
FUNCTION win_osNetRegOk( lSetIt, lDoVista )
聽 聽LOCAL bRetVal := .T.
聽 聽LOCAL cKeySrv
聽 聽LOCAL cKeyWks
聽 聽hb_default( @lSetIt, .F. )
聽 聽hb_default( @lDoVista, .T. )
聽 聽IF ! lDoVista .AND. hb_osIsWinVista()
聽 聽 聽 /* do nothing */
聽 聽ELSEIF hb_osIsWin9x()
聽 聽 聽 bRetVal := win_regQuery( WIN_HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Services\VxD\VREDIR", "DiscardCacheOnOpen", 1, lSetIt )
聽 聽ELSE
聽 聽 聽 cKeySrv := "System\CurrentControlSet\Services\LanmanServer\Parameters"
聽 聽 聽 cKeyWks := "System\CurrentControlSet\Services\LanmanWorkStation\Parameters"
聽 聽 聽 IF lSetIt
聽 聽 聽 聽 聽lSetIt := ! hb_osIsWinNT() .OR. wapi_IsUserAnAdmin()
聽 聽 聽 ENDIF
聽 聽 聽 /* Server settings */
聽 聽 聽 bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeySrv, "CachedOpenLimit", 0, lSetIt )
聽 聽 聽 bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeySrv, "EnableOpLocks", 0, lSetIt ) /* Q124916 */
聽 聽 聽 bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeySrv, "EnableOpLockForceClose", 1, lSetIt )
聽 聽 聽 bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeySrv, "SharingViolationDelay", 0, lSetIt )
聽 聽 聽 bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeySrv, "SharingViolationRetries", 0, lSetIt )
聽 聽 聽 IF hb_osIsWinVista()
聽 聽 聽 聽 聽/* If SMB2 is enabled turning off oplocks does not work, so SMB2 is required to be turned off on Server. */
聽 聽 聽 聽 聽bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeySrv, "SMB2", 0, lSetIt )
聽 聽 聽 ENDIF
聽 聽 聽 /* Workstation settings */
聽 聽 聽 bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeyWks, "UseOpportunisticLocking", 0, lSetIt )
聽 聽 聽 bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeyWks, "EnableOpLocks", 0, lSetIt )
聽 聽 聽 bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeyWks, "EnableOpLockForceClose", 1, lSetIt )
聽 聽 聽 bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeyWks, "UtilizeNtCaching", 0, lSetIt )
聽 聽 聽 bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeyWks, "UseLockReadUnlock", 0, lSetIt )
聽 聽 聽 IF hb_osIsWinVista()
聽 聽 聽 聽 聽bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeyWks, "FileInfoCacheLifetime", 0, lSetIt )
聽 聽 聽 聽 聽bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeyWks, "FileNotFoundCacheLifetime", 0, lSetIt )
聽 聽 聽 聽 聽bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeyWks, "DirectoryCacheLifetime", 0, lSetIt )
聽 聽 聽 ENDIF
聽 聽 聽 IF hb_osIsWin2K()
聽 聽 聽 聽 聽bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Services\MRXSmb\Parameters", "OpLocksDisabled", 1, lSetIt )
聽 聽 聽 ENDIF
聽 聽ENDIF
聽 聽RETURN bRetValI have a Harbour / Fivewin application that uses MSSQL tables via Mediator (3rd party RDD from OTS software).
Does ADO provide MSSQL and MySQL seamlessly using harbour RDD database "regular" commands, like USE, SKIP, SEEK, DELETE, PACK, COPY, etc. and regular function calls like dbskip, dbdelete, dbpack, dbappend, etc. ??
if yes, is the conversion path relatively seamless (within reason of course)?
Don,
ADO does not work like a RDD, please take a look at samples\adoxbr01.prg.
I did not get Mediator working not a reply from OTC, so that麓s why I choose SQLRDD, but it did not work as expected.
Your problem happens with DBF stand alone or with Mediator?.
That's an odd topic.
for reading files either individually or especially en masse Mediator is faster than DBF, especially with 2+ users.
If I use sql commands like SELECT * etc, Mediator is very fast.
the coding is 99% harbour compatiable using conventional programming syntax.
i've had good luck with Mediator for about 5 years now.
But, Mediator's updating of tables is much slower than dbf updating. especially when cycling thru a large file. almost 2 times longer.
I suspect tons of logging on the server side slows it down. in these cases, I found it was better to rewrite the code from a do while loop to selecting a temporary result set and working with sql commands.
so, for processes that have lots of database updates it's much faster to run in DBF mode than Mediator with one user at a time. as more users get added my guess is the difference gap would close but I can't be certain of this as I've not tested it.
we have applications that run on mediator RDD and and others that use dbfntx RDD.
There are always multi user configurations, many times across a wan. in the wan cases, we require terminal server or citrix metaframe. this actually makes the .dbf system run better because everything is housed on a huge virtual server with lot's of horsepower. the users see better performance in these cases.
I was just wondering if it might be time to investigate other routes to MSSQL.
I was just wondering if it might be time to investigate other routes to MSSQL.
Get-SmbServerConfigurationEnableSMB1Protocol : False
EnableSMB2Protocol : True
FileInfoCacheLifetime
FileNotFoundCacheLifetime
DirectoryCacheLifetimeJimmy wrote:i saw Comments about SMB ...
many of these Comment are "outdate", while for SMB1, and not valid when using Windows 10 / 11
Note : it is NOT recommended to use "older" OS than Windows 10 any more
Jimmy wrote:are you using "Drive-Letter" or UNC-Path![]()
Jimmy wrote:Programmer like to "open" as much as possible and "leave" all "open" ...
that you can do with Single User App but it is not recommend in Network
Jimmy wrote:do NOT use OLD SMB1 "Hack" on Windows 10 / 11