When I have a DBF file opened on a network in SHARED mode, if another computer tries to open the same file in SHARED mode all actions like LOCATE, COPY, INDEX, anything that looks at all records are very very slow.
Something like 0.34 seconds, goes to 9.00 seconds. This is a very bug difference.
I tried a few scenarios:
Open files in Shared mode - slow
Open files in Exclusive mode - slow
Other functions works fine. Like GO, RLOCK(), COMMIT, REPLACE etc. If i´m on one record, it´s fine. But everything that looks at all the records, or have a FOR in it, is very slow.
Example: 1
I use 3 computers:
Computer 1 has a shared folder
Computer 2 - open file in shared mode, in a loop using LOCATE - results for each locate 0.34 seconds.
Computer 3 - open same file in shared mode - only that
Computer 2 - now takes 9.10 seconds.
Example: 2
I use 3 computers:
Computer 1 has a shared folder
Computer 2 - open file in exclusive mode, in a loop using LOCATE - results for each locate 0.34 seconds.
Computer 3 - open same file in shared mode or exclusive mode - only that
Computer 2 - now takes 9.10 seconds.
This does not happen when you share the file on one computer. It´s only with multiple computers.
So the question: Is it possible to have multiple DBF shared with xBase++ 2.0 ?
Should I use ADS or SQL ?
USE SHARED EXCLUSIVE SLOW ON NETWORK
Re: USE SHARED EXCLUSIVE SLOW ON NETWORK
You shouldn't have that much of a difference in speed, even without ads or SQL...
Have you checked that your indexes result in unique entries...
i.e. index on zipcode to x may produce multiple records with the same key...
index on zipcode+str(recno(),10) will produce unique keys and result in faster access...
The use of locate will never produce as quick a result as a seek w/ the correct index...
Have you checked that your indexes result in unique entries...
i.e. index on zipcode to x may produce multiple records with the same key...
index on zipcode+str(recno(),10) will produce unique keys and result in faster access...
The use of locate will never produce as quick a result as a seek w/ the correct index...
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Re: USE SHARED EXCLUSIVE SLOW ON NETWORK
Yes, it's true that sharing files across a network is going to be slower.
Rather than spending the money on ADS (Client/Server), you should look at making a few code changes which will replace locates with seeks. If you must do a locate, make sure to OrdSetFocus(0) first. This will insure that the locate doesn't traverse the index.
Rather than spending the money on ADS (Client/Server), you should look at making a few code changes which will replace locates with seeks. If you must do a locate, make sure to OrdSetFocus(0) first. This will insure that the locate doesn't traverse the index.
The eXpress train is coming - and it has more cars.
Re: USE SHARED EXCLUSIVE SLOW ON NETWORK
Guys, thank you.
I ran some tests and the problem was caused by Kaspersky anti-virus version 10.
I made the tests with Windows 10 with Defender, Windows 7 with kaspersky and Windows XP with no anti-virus.
I found out that XP and Windows 10 was ok. Windows 7 was causing the problem. By removing the Kaspersky anti-virus, the problem is solved.
Roger, you may remove this post because the problem is not with xBase. Or leave it if you think it could help someone.
Best regards Guys,
Very happy, problem solved.
I ran some tests and the problem was caused by Kaspersky anti-virus version 10.
I made the tests with Windows 10 with Defender, Windows 7 with kaspersky and Windows XP with no anti-virus.
I found out that XP and Windows 10 was ok. Windows 7 was causing the problem. By removing the Kaspersky anti-virus, the problem is solved.
Roger, you may remove this post because the problem is not with xBase. Or leave it if you think it could help someone.
Best regards Guys,
Very happy, problem solved.
Re: USE SHARED EXCLUSIVE SLOW ON NETWORK
I think that leaving the post will benefit us all much more.Roger, you may remove this post because the problem is not with xBase. Or leave it if you think it could help someone.
I hadn't thought about anti-virus being the culprit, but I have heard this before with database issues.
Was the anti-virus on all of the computers?
Was it on the server?
The eXpress train is coming - and it has more cars.
Re: USE SHARED EXCLUSIVE SLOW ON NETWORK
I was very surprised to see that the anti-virus had this behavior on a DBF file.
This is what I know.
It does not matter what type of anti-virus is on the server/master shared folder side. It matters only on the client side.
Tests were done with
Windows XP pro
Windows 7 pro
Windows 10 pro
Windows 2003 SBS
Windows 2008 SBS
Windows 2012 server
If I open file SHARED or EXCLUSIVE on windows 10 with defender, if another station with Kaspersky try to open file in SHARED mode with success or in EXCLUSIVE mode with neterr() = .t. the first computer will dramatic slow down. 0.34 seconds to 19.12 seconds per loop.
The reverse
If I open file SHARED or EXCLUSIVE on windows 7 with kaspersky, if another station with no Kaspersky try to open file in SHARED mode with success or in EXCLUSIVE mode with neterr() = .t. the first computer will no see a difference. 0.34 seconds to 0.39 seconds.
With the Windows 7 and the Kaspersky end point version 10
When you access a file that is open in shared mode by computer 1 (windows 10 no kasperky) from computer 2 (windows 7 and kaspersy), a drastic slow down will occur on computer 1 that is executing the same loop with some commands like COPY, LOCATE, INDEX or other command with a FOR. Other commands that are limited to only one record will not be affected by slow down, like REPLACE, COMMIT and read.
The same happens when you use a file in EXCLUSIVE mode. You try to open the file from another computer, SHARED or EXCLUSIVE and the computer 1 will have a dramatic slow down.
When you terminate application or even shut down the other computers, the slow down persists on the computer 1.
When you close file and re-open file from computer 1, normal speed is restored.
I fund out that this was caused by Kaspersky Anti-Virus, I was using the version Kaspersky End Pont Security for Business version 10. We uninstalled teh kaspersky, re-install, register, update, and same behavior.
I use now Windows 10 with Windows defender. This problem is not there.
I installed Windows defender on Windows 7 computer. - no problem
I installed Windows Defender via Windows essentials for Windows xp. no problem.
I did not test Norton, Mc Afee, Avast etc.
Best regards
Alexandre
This is what I know.
It does not matter what type of anti-virus is on the server/master shared folder side. It matters only on the client side.
Tests were done with
Windows XP pro
Windows 7 pro
Windows 10 pro
Windows 2003 SBS
Windows 2008 SBS
Windows 2012 server
If I open file SHARED or EXCLUSIVE on windows 10 with defender, if another station with Kaspersky try to open file in SHARED mode with success or in EXCLUSIVE mode with neterr() = .t. the first computer will dramatic slow down. 0.34 seconds to 19.12 seconds per loop.
The reverse
If I open file SHARED or EXCLUSIVE on windows 7 with kaspersky, if another station with no Kaspersky try to open file in SHARED mode with success or in EXCLUSIVE mode with neterr() = .t. the first computer will no see a difference. 0.34 seconds to 0.39 seconds.
With the Windows 7 and the Kaspersky end point version 10
When you access a file that is open in shared mode by computer 1 (windows 10 no kasperky) from computer 2 (windows 7 and kaspersy), a drastic slow down will occur on computer 1 that is executing the same loop with some commands like COPY, LOCATE, INDEX or other command with a FOR. Other commands that are limited to only one record will not be affected by slow down, like REPLACE, COMMIT and read.
The same happens when you use a file in EXCLUSIVE mode. You try to open the file from another computer, SHARED or EXCLUSIVE and the computer 1 will have a dramatic slow down.
When you terminate application or even shut down the other computers, the slow down persists on the computer 1.
When you close file and re-open file from computer 1, normal speed is restored.
I fund out that this was caused by Kaspersky Anti-Virus, I was using the version Kaspersky End Pont Security for Business version 10. We uninstalled teh kaspersky, re-install, register, update, and same behavior.
I use now Windows 10 with Windows defender. This problem is not there.
I installed Windows defender on Windows 7 computer. - no problem
I installed Windows Defender via Windows essentials for Windows xp. no problem.
I did not test Norton, Mc Afee, Avast etc.
Best regards
Alexandre
Re: USE SHARED EXCLUSIVE SLOW ON NETWORK
Third-party Anti Virus software isn't always a better solution than the software built-in to Windows or web browsers.
Many years ago, when we were using Windows 95 or Windows XP, that was not necessarily true, but Microsoft, Google, and others have learned a lot about security over the years.
Also, if you get your email via Gmail you are much less likely to acquire a virus in an attachment.
I have been using Gmail for over 10 years.
Read the below articles.
http://www.forbes.com/sites/ygrauer/201 ... 29adc29085
https://www.sciencedaily.com/releases/2 ... 161650.htm
I still have an anti virus installed. I use ESET.
I have not been hit by anything in over 10 years.
Why is there no "knock on wood" smilie? This will have to do.
Many years ago, when we were using Windows 95 or Windows XP, that was not necessarily true, but Microsoft, Google, and others have learned a lot about security over the years.
Also, if you get your email via Gmail you are much less likely to acquire a virus in an attachment.
I have been using Gmail for over 10 years.
Read the below articles.
http://www.forbes.com/sites/ygrauer/201 ... 29adc29085
https://www.sciencedaily.com/releases/2 ... 161650.htm
I still have an anti virus installed. I use ESET.
I have not been hit by anything in over 10 years.
Why is there no "knock on wood" smilie? This will have to do.
The eXpress train is coming - and it has more cars.
Re: USE SHARED EXCLUSIVE SLOW ON NETWORK
Finally I never found a solution to the Kaspersky file locking. So now I use Defender with Windws 10 and Windows 7.
Case solved.
Case solved.
Last edited by alepap on Sun Sep 04, 2016 9:52 am, edited 1 time in total.
Re: USE SHARED EXCLUSIVE SLOW ON NETWORK
When Kaspersky was installed did you add exclusions? Normally we exclude the data folder from all virus scans and add our application as an excluded application.
Re: USE SHARED EXCLUSIVE SLOW ON NETWORK
I have been using Kaspersky Security Center on all of my servers for several years. The only real problems I had were with the System Watcher Option which would not let the program create an indexed file. Adding the exclusions fixed that. If you use the policy options you can push down an active policy to all your workstations. In the 'general settings' for Managed computers you should add exclusions for the network drives where your programs and data are stored. Also under that in the settings for file anti virus you should uncheck the monitor network drive box. This should speed things up a lot.
Kaspersky can be confusing. They charge about $2,000 to take a full course in it at one of their seminars. Their support people are pretty good at helping you configure the system to your liking.
BTW Enabling System watcher supposedly will catch the Cryptolocker virus BEFORE it starts the encryption process.
It acts like User Account Control and will alert the user that something questionable is about to happen.
I hope I never encounter it again. I have seen it hit twice at installations where the AV was questionable.
Bob Volz
Kaspersky can be confusing. They charge about $2,000 to take a full course in it at one of their seminars. Their support people are pretty good at helping you configure the system to your liking.
BTW Enabling System watcher supposedly will catch the Cryptolocker virus BEFORE it starts the encryption process.
It acts like User Account Control and will alert the user that something questionable is about to happen.
I hope I never encounter it again. I have seen it hit twice at installations where the AV was questionable.
Bob Volz