Page 1 of 2

Program slow down

PostPosted: Mon Aug 09, 2010 2:01 pm
by Marc Vanzegbroeck
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

Re: Program slow down

PostPosted: Mon Aug 09, 2010 5:33 pm
by James Bott
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

Re: Program slow down

PostPosted: Mon Aug 09, 2010 6:08 pm
by Marc Vanzegbroeck
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

Re: Program slow down

PostPosted: Mon Aug 09, 2010 6:53 pm
by Otto
Marc, what OS are you useing?
Regards,
Otto

Re: Program slow down

PostPosted: Mon Aug 09, 2010 7:19 pm
by Marc Vanzegbroeck
Otto,

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

Regards,
Marc

Re: Program slow down

PostPosted: Mon Aug 09, 2010 8:03 pm
by Otto
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

Re: Program slow down

PostPosted: Mon Aug 09, 2010 8:06 pm
by Enrico Maria Giordano
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

Re: Program slow down

PostPosted: Mon Aug 09, 2010 9:18 pm
by James Bott
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

PostPosted: Tue Aug 10, 2010 9:05 pm
by Marc Vanzegbroeck
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

Re: Program slow down

PostPosted: Tue Aug 10, 2010 10:12 pm
by James Bott
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

Re: Program slow down

PostPosted: Tue Nov 09, 2010 9:52 pm
by Marc Vanzegbroeck
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

Re: Program slow down

PostPosted: Tue Nov 09, 2010 10:37 pm
by Otto
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

Re: Program slow down

PostPosted: Wed Nov 10, 2010 6:19 am
by Marc Vanzegbroeck
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

Re: Program slow down

PostPosted: Wed Nov 10, 2010 7:46 am
by Otto
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

Re: Program slow down

PostPosted: Wed Nov 10, 2010 6:00 pm
by betoncu
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