Slow reading on XP sp3 network drive

Slow reading on XP sp3 network drive

Postby Marco Turco » Wed Mar 25, 2009 7:46 am

Hi all,
I have a really strange problem on Windows XP networks,
some customers reported me that my FWH app is very slow working on an
XP network environment.

I made some test about reading and writing from a client to a network
drive using this self-contained routine that create a file and then
read it (first with small data segments and then with big data
segments).


The result is this:
- using a Windows Vista client connected to a Windows Vista server all
is correct (see vista tests)
- using a Windows Vista client connected to a Windows XP server the
reading time is really strange because it is higher then the writing
time (see XP tests)
Note that I used a server the same computer (it has a dual boot XP/
Vista) so there isn't an hardware interference to analize the tests)


Any ideas about this high reading time on XP ?
I optimized the windows registry using the xharbour function
os_netregok()


Thanks


Marco


********************** test speed function **


Function TestNet()


cTest:=""
cFile:="Z:\test\testnet.net"


**
cTest:=cTest+"Testing drive "+p05+chr(13)+chr(10)
cTest:=cTest+"-"+chr(13)+chr(10)
cTest:=cTest+"Creating 10M file with 1000KB segments **"+chr(13)+chr
(10)
nStart:=seconds()
handle:=fcreate(cFile)
for i:=1 to 10000
fwrite(handle,space(1000))
next
fclose(handle)
nEnd:=seconds()-nStart
cTest:=cTest+"Done. "+str(nEnd,10,2)+" seconds required"+chr(13)+chr
(10)


cTest:=cTest+"-"+chr(13)+chr(10)
cTest:=cTest+"Reading 10M file with 1000KB segments **"+chr(13)+chr
(10)
nStart:=seconds()
handle:=fopen(cFile)
for i:=1 to 10000
cVar:=freadstr(handle,1000)
next
fclose(handle)
nEnd:=seconds()-nStart
cTest:=cTest+"Done. "+str(nEnd,10,2)+" seconds required"+chr(13)+chr
(10)


cTest:=cTest+"Testing drive "+p05+chr(13)+chr(10)
cTest:=cTest+"-"+chr(13)+chr(10)
cTest:=cTest+"Creating 10M file with 10000KB segments **"+chr(13)+chr
(10)
nStart:=seconds()
handle:=fcreate(cFile)
for i:=1 to 1000
fwrite(handle,space(10000))
next
fclose(handle)
nEnd:=seconds()-nStart
cTest:=cTest+"Done. "+str(nEnd,10,2)+" seconds required"+chr(13)+chr
(10)


cTest:=cTest+"-"+chr(13)+chr(10)
cTest:=cTest+"Reading 10M file with 10000KB segments **"+chr(13)+chr
(10)
nStart:=seconds()
handle:=fopen(cFile)
for i:=1 to 1000
cVar:=freadstr(handle,10000)
next
fclose(handle)
nEnd:=seconds()-nStart
cTest:=cTest+"Done. "+str(nEnd,10,2)+" seconds required"+chr(13)+chr
(10)


msginfo(cTest)
return


*************************
** results with a Vista server ***
Testing drive Z
-
Creating 10M file with 1000KB segments **
Done. 5.45 seconds required
-
Reading 10M file with 1000KB segments **
Done. 0.38 seconds required
Testing drive Z
-
Creating 10M file with 10000KB segments **
Done. 0.92 seconds required
-
Reading 10M file with 10000KB segments **
Done. 0.40 seconds required


** results with an XP server ************************************
Testing drive Z
-
Creating 10M file with 1000KB segments **
Done. 0.37 seconds required
-
Reading 10M file with 1000KB segments **
Done. 3.65 seconds required
Testing drive Z
-
Creating 10M file with 10000KB segments **
Done. 0.22 seconds required
-
Reading 10M file with 10000KB segments **
Done. 0.59 seconds required
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Slow reading on XP sp3 network drive

Postby Rick Lipkin » Wed Mar 25, 2009 12:46 pm

Marco

Have your customer look at their topology .. lots of performance issues can be traced to nic card speed configurations between the server and the switch it is plugged into.

Specifically, we had a SQL server that was 64 bit and it took almost a minute to do a full table scan with 25k records and the same application on a different SQL server running 32 bit was only 7 sec for the same table scan.

The solution ( as it turned out ) was to 'manually' match the speed of the nic port with the switch instead of 'auto negotiate' .. once both ports were set to the same max speed .. the performance problems STOPPED!!

Just my 2 cents worth ..

Rick Lipkin
SC Dept of Health, USA
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Slow reading on XP sp3 network drive

Postby Otto » Wed Mar 25, 2009 3:16 pm

Hello Marco,

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.

Best regards,
Otto

Attached an advice I got from James:

I don't know if you have already checked this, but there are certain registry changes that need to be made on PC's running record locking databases like DBFs.
Attached is a program that will test the registry and optionally make the changes for you. Note that you have to reboot after making the changes before they will become effective.

I suggest running the program on both the server and client PCs.

If you want to know more about this see the links in the message below. There is also a help file in the attached zip.

James

----------------------------
From: "Lorenzo Fiorini" <nospam@please.com>
Subject: Re: dbfcdx test with current cvs (linux)
Date: Wednesday, April 14, 2004 5:49 PM
Sylvain Robert wrote:
> Thank's for taking the time to test, I want to see if we have a problem
> under Windows !
I'm sure you know Windows optimistic locking issue...
To test "real" multiuser performance you have to disable optimistic locking.
http://www.dataaccess.com/whitepapers/o ... ching.html
http://www.drouillard.ca/Tips&Tricks/Samba/Oplocks.htm
http://www.witzendcs.co.uk/html/nt_networking.html
http://www.acaciacons.com.au/Support/FileCorruption.htm
regards,
Lorenzo Fiorini
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6336
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 56 guests