slowness

Re: slowness

Postby MarcoBoschi » Wed Sep 18, 2024 8:28 am

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"
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: slowness

Postby Otto » Wed Sep 18, 2024 11:58 am

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

viewtopic.php?f=3&t=19548&p=107235&hilit=smb&sid=a2dfa4ef0bd61a0324d28434495d5dfe#p107235

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6338
Joined: Fri Oct 07, 2005 7:07 pm

Re: slowness

Postby karinha » Mon Sep 23, 2024 3:49 pm

Code: Select all  Expand view  RUN

@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
karinha
 
Posts: 7832
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: slowness

Postby Rick Lipkin » Tue Sep 24, 2024 8:46 pm

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
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: slowness

Postby driessen » Wed Sep 25, 2024 7:32 am

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
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: slowness

Postby Otto » Wed Sep 25, 2024 8:02 am

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
Otto
 
Posts: 6338
Joined: Fri Oct 07, 2005 7:07 pm

Re: slowness

Postby Enrico Maria Giordano » Wed Sep 25, 2024 8:20 am

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
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: slowness

Postby driessen » Wed Sep 25, 2024 8:22 am

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
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: slowness

Postby MarcoBoschi » Wed Sep 25, 2024 8:42 am

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 view  RUN
#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
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: slowness

Postby Enrico Maria Giordano » Wed Sep 25, 2024 8:54 am

MarcoBoschi wrote:Today I hope to try again the enable Set-SmbServerConfiguration -EnableOplocks $false


Ok, keep us updated.
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: slowness

Postby Otto » Wed Sep 25, 2024 9:03 am

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
Otto
 
Posts: 6338
Joined: Fri Oct 07, 2005 7:07 pm

Re: slowness

Postby driessen » Wed Sep 25, 2024 9:04 am

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

Postby driessen » Wed Sep 25, 2024 9:05 am

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

Postby driessen » Wed Sep 25, 2024 12:01 pm

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
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 43 guests

cron