Program slow down

Program slow down

Postby Marc Vanzegbroeck » Mon Aug 09, 2010 2:01 pm

Hi,

A couple of months ago I already posted this problem.
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=17128&hilit=slow+network

Now I installed (another) program on a different client's network, with the same strange problem.

The program run fast till someone else open the program on a different PC an stay slow even the other person close tha application again. Only by restarting the program, it run fast again.

Here it was an upgrade from my old FW-16bit program to FWH 32-bit.
The 16-bit program stay fast even starting it again on a different PC.

So the hardware an operating-system is the same for both programm.

What can be the problem?

Regards,
Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Program slow down

Postby James Bott » Mon Aug 09, 2010 5:33 pm

Marc,

I reread the original thread. There are three things I noticed.

1) Nobody was able to recreate your problem.

2) We still don't know if an anti-virus is causing the problem. The app could run fast on one PC that either doesn't have an AV running or that has the AV to ignore DBFs and IDXs. The other PC may have an AV that isn't ignoring DBFs and IDXs so it is scanning the entire DBF and index each time a record is saved.

3) Your test example code is not a real-world example (seeking 1000 records). Better would be just a sample doing skips.

Also, have you upgraded your version of FWH and (x)Harbour? What version are you running? Note that I did run your EXEs here and was unable to recreate your problem.

Have you tested this on more than one network?

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Program slow down

Postby Marc Vanzegbroeck » Mon Aug 09, 2010 6:08 pm

James,

Like I already explaned I have this problem now also on another network of another client and also with another program.

I use FWH710 with bcc55 ans xHarbour 0.99.71 (Simplex)

Why should the antivirus doesn't slow down the program when nobody else is using it, and slow down when it is opened somewhere else.

Maybe I have to test it when you create my exe with a newer version of xHarbour.

Thanks,
Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Program slow down

Postby Otto » Mon Aug 09, 2010 6:53 pm

Marc, what OS are you useing?
Regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: Program slow down

Postby Marc Vanzegbroeck » Mon Aug 09, 2010 7:19 pm

Otto,

This client is using windows XP SP3
The other one was using Windows Vista.

Regards,
Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Program slow down

Postby Otto » Mon Aug 09, 2010 8:03 pm

Hello Marc,

this is from a support question I made to MS.
Ich hoffe, die erarbeitete Lösung ist zufriedenstellend für Sie.
Ich fasse die Anfrage noch einmal in Stichpunkten zusammen:

• Symptom - when accessing files on an network share say \\server\share on a Server 2008 (RTM or R2) a self developed application needs 3-7 secs to show the presence of the file
• Ursache - SMB 2.0 negotiation on each connection, protocol design
• Lösung - Disable SMB2.0
Sie können SMB 2.0 auf 2 Wege ausschalten:
Durch einen cmd.exe mit Administratorberechtigungen:

sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc config mrxsmb20 start= disabled


oder durch einen regedit.exe Modifizierung der Registry:

HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters

Value name: Smb2
Value type: REG_DWORD
0 = disabled
1 = enabled



Wenn Sie in aber SMB 2.0 in einen Netzwerkumgebung anwenden müssen, dann implementieren Sie, bitte den folgenden Kommandozeilen in cmd.exe mit Administratorberechtigungen:

Netsh int tcp set global RSS=Disabled
Netsh int tcp set global chimney=Disabled
Netsh int tcp set global autotuninglevel=Disabled
Netsh int tcp set global congestionprovider=None
Netsh int tcp set global ecncapability=Disabled
netsh int ip set global taskoffload=disabled
Netsh int tcp set global timestamps=Disabled

Wenn Sie weitere Fragen zu diesen Thema haben, bitte melden Sie sich bei mir per E-mail und ich würde Ihnen gerne antworten. Bis dann verbleibe ich,



Regrards,

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

Re: Program slow down

Postby Enrico Maria Giordano » Mon Aug 09, 2010 8:06 pm

Marc Vanzegbroeck wrote:I use FWH710 with bcc55 ans xHarbour 0.99.71 (Simplex)


I don't know if this can be of any help but FWH whatsnew says:

* New: FWH has been built using BCC 5.82. From now on we will use this Borland C version.
You can download BCC582 from: http://www.fivetechsoft.com/files/software/bcc582.zip

Please update your batch files and make files to use BCC582 instead of BCC55


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Program slow down

Postby James Bott » Mon Aug 09, 2010 9:18 pm

Marc,

From the previous thread:

"I retested using your EXEs and I get 0.047 seconds both with and without test.exe running on another PC." - James Bott

I can't explain why you are having a problem when I don't. I think it is not the app but something else causing the slowdown. I am using XP on my network. One is XP Pro and one is XP Home. One is cabled with 5e cable and the other is wireless with wireless N. Both show exactly the same speed with your test programs.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Marc Vanzegbroeck » Tue Aug 10, 2010 9:05 pm

James,

Did you test it with a server, or with 2 PC's?
If you tested it with 2 PC's, did you try to start test and test1 on both PC's.
I saw when test1 is executed on the PC holding the files on his local disk, and test on the other one, it doesn't slow down.
Executing test on the PC with the files and test on the other, it slow down.

Trying on a server, it alway's slow down :cry:

Otto,

I tryed your suggestion, but without any result.

Regards,

Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Program slow down

Postby James Bott » Tue Aug 10, 2010 10:12 pm

Marc,

OK, I just reran your test programs. I slightly modified one to run 20 cycles and then report the average time.

I copied all the programs to a directory on the server (an old Win 98 PC).

test.exe
test1.exe
planning.dbf
planning.cdx

There are two PCs connected to this server. PC1: XP Home and wired to the server. PC2: XP Pro wireless to the server.

PC2 test.exe
PC1 test1.exe

2.7 seconds average

Then doing the opposite

PC1 test.exe
PC2 test1.exe

6.5 seconds average

Then without running test.exe:

PC1 test1.exe 2.6 seconds average
PC2 test1.exe 6.6 seconds average

Summary
PC1 (wired)
With test.exe 2.7 seconds
Without test.exe 2.6 seconds

PC2 (wireless)
With test.exe 6.5 seconds
Without test.exe 6.6 seconds

There is no significant speed change in test1.exe when running test.exe on another PC.

If you want to run my EXEs on your system, let me know and I will email them to you. Send me your email address (jbott at compuserve dot com).

Below is my modified test1.prg.

Regards,
James
Code: Select all  Expand view

/*
Program: Test1.prg
Purpose: Test for Marc Vanzegbroeck
Problem: Slowdown on network when 2nd PC opens file
*/


#INCLUDE "FiveWin.ch"
REQUEST DBFCDX
FUNCTION test1()
   local oWnd, i
   local t := seconds()
   local vstruct:={}
   local nSum:=0,j

   field nr

   RDDSETDEFAULT("DBFCDX")

   IF !file('planning.dbf')
      aadd(vstruct,{'NR','N',10,0})
      dbcreate('planning',vstruct)
      use planning new shared
      FOR i=1 to 1000000
          appe blank
          repl nr with i
      NEXT
      index on str(nr) tag test
   ENDIF
   use planning new shared
   ordSetFocus( 'TEST' )

   // Average 20 runs
   for j:=1 to 20

      T := seconds()

      FOR i = 1 to 1000
         seek str(92*i,10)
      NEXT i

      nSum:= nSum + seconds()-t

   next j

   msgInfo( nSum/20, "Average of 20 cycles")

RETURN nil
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Program slow down

Postby Marc Vanzegbroeck » Tue Nov 09, 2010 9:52 pm

Hi,

I just install my program on a customer network and have also here the same problem. Before they where usinf mij 16bit version of my FW-application without slowing down.
I still don't why it slow down on my network and on my customer networks, and not James's network.

The configuration of this customer network is as server WHS, and the workstations are Windows XP SP3

Regards,
Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Program slow down

Postby Otto » Tue Nov 09, 2010 10:37 pm

Marc, have you tried to disable smb2?

sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc config mrxsmb20 start= disabled


• Symptom - when accessing files on an network share say \\server\share on a Server 2008 (RTM or R2) a self developed application needs 3-7 secs to show the presence of the file
• Ursache - SMB 2.0 negotiation on each connection, protocol design
• Lösung - Disable SMB2.0
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: Program slow down

Postby Marc Vanzegbroeck » Wed Nov 10, 2010 6:19 am

Otto,

I will try this and let you know the result.
It's very strange that with the 16bit FW-version of the application it doesn't slow down, only with FWH.

Thanks,
Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Program slow down

Postby Otto » Wed Nov 10, 2010 7:46 am

Hello Marc.
This is what I found so far.
Best regards,
Otto


XP benutzt NetBios Port 139 zum "kommunizieren". XP "verwendet" dabei SMB1
Win7 "kommuniziert" aber gewöhnlich "direkt" über Port 445. Win7 "verwendet" dabei SMB2



viewtopic.php?f=3&t=15076&start=0&hilit=commit

It seems that COMMIT of Clipper 5.2e doesn't really write on disk. I just made the test using that version and it was almost instantaneous.





viewtopic.php?f=3&t=15019&p=77651&hilit=slow#p77651

I had a similar problem with XP as a file server.

I noticed the speed problems only if a dbf-file was opened by more than one user at the same time.
To resolve the problem I changed all my programs and try to open the dbf-files as short as possible.



viewtopic.php?f=3&t=15019&p=77651&hilit=performance#p77651
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: Program slow down

Postby betoncu » Wed Nov 10, 2010 6:00 pm

A couple of years ago I have faced a problem which is very similar to your case.
In my case there was a cabling problem.
The server was connected to the switch with a 4-wired cable, while the clients were connected with 8-wired cables.
I hope your case is the same and you solve your problem.

Birol Betoncu
Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 83 guests