slowness

User avatar
MarcoBoschi
Posts: 1070
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: slowness

Post by MarcoBoschi »

Tim,
Unfortunately, we have no alternatives available. It is very sad.
In my opinion some solutions there should be when Jimmy says
when DBF is used in Share Mode only Once, it will use SMB "Exlusive Locking" Mode
as soon when DBF was opened second Time it will switch into "Opportunistic Locking"
Marco Boschi
info@marcoboschi.it
User avatar
Otto
Posts: 6378
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: slowness

Post by Otto »

Marco,
here I posted the setup for SMB-2 back in 2010.

https://forums.fivetechsupport.com/view ... fe#p107235

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
karinha
Posts: 7884
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: slowness

Post by karinha »

Code: Select all | Expand

@ECHO OFF

net use M: \\SERVIDOR\c /yes

M:
cd\DIRECTORY
START YOURAPP.EXE
EXIT
 
??

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
Rick Lipkin
Posts: 2668
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: slowness

Post by Rick Lipkin »

To All

Like Otto mentioned in one of his posts ... when I start my .EXE on a network or local app I test for the local workstation folder "C:\dbtmp" and when I write reports I always create my temp .dbf's and .cdx's on the local machine "C:\dbtmp\ ......,,dbf Order "C:\dbtmp\..... .CDX and open the reports from the common network drive ... and when I am done with the report I delect the local \dbtmp files ..

I have done this for years in shared very large Novell networks and never had a speed issue ..

Rick Lipkin
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: slowness

Post by driessen »

I just noticed this topic.
And I can only share my experiences on this matter.

I also use DBF and CDX on network and on different kind of servers (Windows, Linux, NAS, ...).
It has been many years ago that I had any speed problem.

I remember the SMB2 problem on old Windows versions, but since Windows 7, I never experienced the problem again.

I have database which often are as big as 2 GB with sometimes more than 50 indexes in the CDX.

So, I get the impression that something must be wrong in the hardware is speed is a problem.

This happened to my twice, but meanwhile more than 10 years ago: a customer of mine was experiencing that my software was running very slowly. I spook about it with his PC-supplier.
Suddenly the supplier suggested to replace the motherboard of the PC, although all other software was running just fine. He replaced the motherboard and the problem was completely gone.
One year later, I had the same problem on the system of another customer. The same action solved the problem.

Just saying.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
Otto
Posts: 6378
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: slowness

Post by Otto »

Michel,
>often are as big as 2 GB.

I assume these are DBF files with memo fields.
If I’m right, how large are your DBF files and your FPT files?
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: slowness

Post by Enrico Maria Giordano »

Michel,

Did you try my sample? It demostrates that there is a problem that is not related with the specific PC or network.
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: slowness

Post by driessen »

Otto,

I never use fpt-files for memos.
In stead, I create fields of 2000 or more characters and handle like they are memos.
If a fpt-files gets corrupted, I experienced problems to open the DBF-file.
So I decided not using FPT-files anymore.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
MarcoBoschi
Posts: 1070
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: slowness

Post by MarcoBoschi »

Michel,

Did you try my sample? It demostrates that there is a problem that is not related with the specific PC or network.
The question of Enrico is This is the question of my post .

Please Michel Try this

Code: Select all | Expand

#include "Dbinfo.ch"


REQUEST DBFCDX
REQUEST DBFFPT


FUNCTION MAIN()

    LOCAL nSec

    RDDSETDEFAULT( "DBFCDX" )

    SET DBFLOCKSCHEME TO DB_DBFLOCK_CL53EXT

    USE \\yourserver\yourfolder\yourdbf SHARED

    SET INDEX TO \\yourserver\yourfolder\yourcdx

    nSec = SECONDS()

    WHILE !EOF()
        SKIP
    ENDDO

    ? SECONDS() - nSec

    INKEY( 0 )

    RETURN NIL
all your experiences are very interesting but the problem is well explained in this post. As Enrico has always done, he created a minimalist example with which the problem is evident.
I have tried this in different situations. Today I hope to try again the enable Set-SmbServerConfiguration -EnableOplocks $false
Marco Boschi
info@marcoboschi.it
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: slowness

Post by Enrico Maria Giordano »

MarcoBoschi wrote:Today I hope to try again the enable Set-SmbServerConfiguration -EnableOplocks $false
Ok, keep us updated.
User avatar
Otto
Posts: 6378
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: slowness

Post by Otto »

Michel,

good to hear that this works in practice as well.
I didn't even know that such large fields could be used.

But now that I'm working more with the DBF format due to the php4dbf low-level access, there really seems to be no limit here.
Thank you for sharing this idea.

I bypass the FTP issue with external files.

Have you never had problems with index files?
In the future, I also want to avoid using index files and instead create ad-hoc hashes or arrays with fields like index number and record number, and then only read those data from the DBF.
As I mentioned, I usually work with small databases. It works well and, as I believe, also quickly.

I think that if you use such large fields as you do, you have to read record by record from the disk and only take the fields you currently need to keep the payload as small as possible.

However, I have noticed almost no speed difference when I read the entire DBF and create the filter (which is practically an index) in memory, compared to reading record by record and applying the filter immediately.

Best regards,
Otto



Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: slowness

Post by driessen »

Marco,

I never have seen this line before : SET DBFLOCKSCHEME TO DB_DBFLOCK_CL53EXT

Please, can you explain this to me?

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: slowness

Post by driessen »

Otto,

Thanks a lot for this info.
I'm going to have a look at it in the coming days.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: slowness

Post by driessen »

And where do I get dbInfo.ch?
It is not included in FWH?

Thx.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
Post Reply