For Programmers: Free Programming Magazines  


Home > Archive > Clipper > October 2005 > W2k server oplock !









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author W2k server oplock !
Sylvain Robert

2005-02-22, 3:55 pm

Good Morning,

I began to work for a company who are using clipper 5.3 with DBFNTX. The
problem that I faced was when 2 different computer acces the same
database, the first one had a fast response reading data but at the
moment another process acces the same database it was 10 times slower
than the first one and the first process began to slow down. So I
suspect the infamous OPLOCK and I disable it on the server and
Workstation where I do my test. So now we obtain the same speed even if
I have 1 or 2 workstation reading the database it's 10 times slower than
executing the process on the server !. Same procedure: on the server
takes 1 second and on any workstation it takes 10 seconds !. IF I enable
OPLOCK it's as fast as working on the server until another station tried
to used the same data so it's a caching problem when OPLOCK is on so
it's not a good option because we always have more than 1 Workstation
working on those database !

IS there a way to speedup things for Workstation under MS network,
Novell is not an option here !

Question:

Anyone tested Andrew's file system under W2k server or Windows2003 server ?

Since I just read data in that part of the system where I see slowness
can adding READONLY clause to the use statement speedup things ?

Any hint will be appreciated !

--


Sylvain Robert

P.S.:if you want to write me directly remove the N O S P A M S from the Email
Sylvain Robert

2005-02-22, 3:55 pm

> Since I just read data in that part of the system where I see slowness
> can adding READONLY clause to the use statement speedup things ?


This didn't help !

I reduced the problem to a sample do while skip enddo this loop is done 230
times !

Opening the file in Exclusive mode gave an execution result of 0.00 seconds
like on the server !
Opening the file in Shared mode gave an execution result of 1.35 seconds !?
Opening ONLY the DBF without the NTX in shared mode gave a result of 0.00
!!!!

I have a question about th NTX file size. The index expression is based on a
FIELD C 6 in the database and the number of record is 61725 the NTX size is
1,034,240 byte is this normal ?.

Any good reading about this subject is welcome !

TY,

Sylvain


E. Fridman

2005-02-22, 8:55 pm

Sylvain,

NTX is known to work slow (sometimes very slow) when there are a lot of
identical index keys in the file. To test you might want to add " +
STR(RECNO,7,0)" to the index expression.

If you believe that you have a blown index just delete and rebuild it.

Sylvain Robert

2005-02-22, 8:55 pm

Hi E. ,
> NTX is known to work slow (sometimes very slow) when there are a lot of
> identical index keys in the file. To test you might want to add " +
> STR(RECNO,7,0)" to the index expression.
>
> If you believe that you have a blown index just delete and rebuild it.


First thank's for taking the time to read and answer it's really appreciated
!

I was aware of the NTX problem with multiple identical key, but if I
remember well this slowness
will happen only with REPLACE and APPEND BLANK. In my test I'm just doing
230 skip in a
DO WHILE.Anyway I had already tried to add l2bin(recno()) to the key
expression to avoid that kind of
situation and it didn't change anything I'm still having a slowness when
opening the database in SHARED mode
In exclusive mode it's really FAST on those workstation.I also test the same
sample program under Xharbour and have
the same result so I really suspect the MS LAN setting and I'm searching the
cause !

Thank you,

Sylvain



Ross McKenzie

2005-02-22, 8:55 pm

On Tue, 22 Feb 2005 09:57:00 -0500, Sylvain Robert
<S.Robert@nospamsvideotron.ca> wrote:

>Good Morning,
>
>I began to work for a company who are using clipper 5.3 with DBFNTX. The
>problem that I faced was when 2 different computer acces the same
>database, the first one had a fast response reading data but at the
>moment another process acces the same database it was 10 times slower
>than the first one and the first process began to slow down. So I
>suspect the infamous OPLOCK and I disable it on the server and
>Workstation where I do my test. So now we obtain the same speed even if
>I have 1 or 2 workstation reading the database it's 10 times slower than
>executing the process on the server !. Same procedure: on the server
>takes 1 second and on any workstation it takes 10 seconds !. IF I enable
>OPLOCK it's as fast as working on the server until another station tried
>to used the same data so it's a caching problem when OPLOCK is on so
>it's not a good option because we always have more than 1 Workstation
>working on those database !
>
>IS there a way to speedup things for Workstation under MS network,
>Novell is not an option here !


Hello Sylvain,

This may be way off target, but your symptoms (slow operations with
more than one PC) reminds me of the cpu release problem. Does your
Clipper 5.3 code include a means of releasing the cpu slices?

Regards,

Ross McKenzie
ValuSoft
Melbourne Australia

valusoft AT optushome DOT com DOT au

Please consider a donation through the Red Cross to our friends affected by the tsunamis.
Sylvain Robert

2005-02-23, 3:55 pm

Ross,

>This may be way off target, but your symptoms (slow operations with
>more than one PC) reminds me of the cpu release problem. Does your
>Clipper 5.3 code include a means of releasing the cpu slices?
>
>

Yes it is and that's the first thing I check before suspecting OPLOCK
problem ! :). Remember
that for the test now I run the software from Workstation the server do
nothing !.I reduced the problem to a sample Do while with skip in it and
I obtain the same result in Clipper,Xharbour,Foxpro when database are
open in share mode. I know it's a MS thing but I give another shot to
this problem to see if I can cure it without installing NOVELL ! :).I
have some soltution to try and I'll report the result on this thread !

Thank you for taking the time to read and answer !

Best Regards,

Sylvain

--


Sylvain Robert

P.S.:if you want to write me directly remove the N O S P A M S from the Email
Nick Ramsay

2005-02-23, 8:55 pm

On Wed, 23 Feb 2005 08:40:06 -0500, Sylvain Robert
<S.Robert@nospamsvideotron.ca> wrote:

>Ross,
>
>Yes it is and that's the first thing I check before suspecting OPLOCK
>problem ! :). Remember
>that for the test now I run the software from Workstation the server do
>nothing !.I reduced the problem to a sample Do while with skip in it and
>I obtain the same result in Clipper,Xharbour,Foxpro when database are
>open in share mode. I know it's a MS thing but I give another shot to
>this problem to see if I can cure it without installing NOVELL ! :).I
>have some soltution to try and I'll report the result on this thread !
>


You could always use Linux running Samba ;-)

With the best will in the world, you're not going to make an NT server
work as well as Netware does with shared file applications. The best
you can hope for is that it's usable & stable...

Have you had a look at my page on NT networking & Clipper?

http://www.witzendcs.co.uk/html/nt_networking.html

Klas Engwall

2005-02-24, 3:55 am

Sylvain,

>I reduced the problem to a sample Do while with skip in it and
>I obtain the same result in Clipper,Xharbour,Foxpro when database are
>open in share mode. I know it's a MS thing but I give another shot to
>this problem to see if I can cure it without installing NOVELL ! :).I
>have some soltution to try and I'll report the result on this thread !


What network protocols are in use? Anything in addition to TCP/IP? If
so, make sure that the binding order/default protocol setting is
identical between all machines, including the server. Different
default protocols will cause delays similar to what you see.

HTH,
Klas

-------
klas dot engwall at engwall dot com

http://www.engwall.com/clipper/

The LFN Library for Clipper
The LanMan Library for Clipper
The NFPAT1A Timeslice release patch for the Nanforum Toolkit
Sylvain Robert

2005-02-24, 3:55 pm

Nick,

> You could always use Linux running Samba ;-)


:) Can be a solution !

>
> With the best will in the world, you're not going to make an NT server
> work as well as Netware does with shared file applications. The best
> you can hope for is that it's usable & stable...


That's probably true ! :). I think I'll consider using ADS for this
particular problem !

>
> Have you had a look at my page on NT networking & Clipper?
>
> http://www.witzendcs.co.uk/html/nt_networking.html


Yes and also all GOOGLE search with "Opportunistic locking" and "Slow
network" !!

Thank's for taking the time to read and answer !

Best Regards,

Sylvain

>



Sylvain Robert

2005-02-24, 8:55 pm

Klas,

> What network protocols are in use? Anything in addition to TCP/IP? If
> so, make sure that the binding order/default protocol setting is
> identical between all machines, including the server. Different
> default protocols will cause delays similar to what you see.


I didn't mention everything I already check on the network, but the protocol
and binding are one of those verification I made !

Thank's for taking the time to read and answer !

Any other idea is Welcome ! :)

Best Regards,

Sylvain


wferraz

2005-10-18, 1:55 pm

quote:
Originally posted by Sylvain Robert

This is a xbase model issue. Indexes (NTX or CDX) use implicit locking either on read and write. When this is combined with a EnableOplocks == 0, the result is exactly that you described.

ftp://ftp.alaska-software.com/docum...out_locking.pdf
ftp://ftp.alaska-software.com/docum...ng-Overview.pdf
http://msdn.microsoft.com/library/d...istic_locks.asp

The 3 articles above shed light on the problem.

I'm currently researching a solution to this since I also had have this kind of performance lack. The primary goal on kill oplocks is give better Data Coherency over networks - DBF/NTX or DBF/CDX don't like local cached environments.

I'll post another msg for you if I can find a solution.

Excuse my poor english.

Regards.

Walter Ferraz


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com