![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Hello, I once read in the Pervasive docs (I don't remember when and where) that the maximum size of a user transaction is limited by the engine cache. Is this correct ? I did a test and updated a record for about 200,000 times in a single user transaction. The transaction log files grew to about 265 Mb, the cache is only 32 Mb. I don't see any limitation. Could it be this piece of information is some left over from a previous version of the engine (6.15) ? Thanks, Serge Nelissen C-LOGIC N.V. |
#2
| |||
| |||
|
|
Hello, I once read in the Pervasive docs (I don't remember when and where) that the maximum size of a user transaction is limited by the engine cache. Is this correct ? I did a test and updated a record for about 200,000 times in a single user transaction. The transaction log files grew to about 265 Mb, the cache is only 32 Mb. I don't see any limitation. Could it be this piece of information is some left over from a previous version of the engine (6.15) ? Thanks, Serge Nelissen C-LOGIC N.V. |
#3
| |||
| |||
|
|
The size of a transaction *IS* limited to the cache size, and you will get a Btrieve Status 100 returned if you exceed this. However, your test is flawed -- your updating a SINGLE record will only change a few pages in cache, and will not overflow it. To better test this -- open a file that has a size (on disk) of about 100MB. Start a transaction and start updating records (you don't necessarily need to actually change any data). When you have changed a large part of the file and exceeded the maximum dirty pages in cache, the transaction will fail and you'll get the Status 100 back. Goldstar Software Inc. Building on Btrieve(R) for the Future(SM) Bill Bach BillBach (AT) goldstarsoftware (DOT) com http://www.goldstarsoftware.com *** Pervasive.SQL Service & Support Classes *** Chicago: September 16-18: See our web site for details! S Nelissen wrote: Hello, I once read in the Pervasive docs (I don't remember when and where) that the maximum size of a user transaction is limited by the engine cache. Is this correct ? I did a test and updated a record for about 200,000 times in a single user transaction. The transaction log files grew to about 265 Mb, the cache is only 32 Mb. I don't see any limitation. Could it be this piece of information is some left over from a previous version of the engine (6.15) ? Thanks, Serge Nelissen C-LOGIC N.V. |
#4
| |||
| |||
|
|
Hi Bill. Have you read my other post ? I cannot believe that 350,000 inserts fit into 32 MB cache, so the limit must be imposed by something else than the cache size. And, status 2015 is returned, not 100. But, it isn't an ordinary status, but a MKDE-status and it is logged in Pvsw.log as : "07-11-2003 14:32:59 W3MKDE 000000B6 W3dbsmgr.exe WRKSNE1 E MicroKernel cannot get sufficient memory to complete the operation." I think we both need some explanation from Pervaisve :-) Thanks for answering, Serge PS Tested with V7 "Bill Bach" <bbach (AT) cncdsl (DOT) com> wrote in message news:3F0EEC95.39B2F2D9 (AT) cncdsl (DOT) com... The size of a transaction *IS* limited to the cache size, and you will get a Btrieve Status 100 returned if you exceed this. However, your test is flawed -- your updating a SINGLE record will only change a few pages in cache, and will not overflow it. To better test this -- open a file that has a size (on disk) of about 100MB. Start a transaction and start updating records (you don't necessarily need to actually change any data). When you have changed a large part of the file and exceeded the maximum dirty pages in cache, the transaction will fail and you'll get the Status 100 back. Goldstar Software Inc. Building on Btrieve(R) for the Future(SM) Bill Bach BillBach (AT) goldstarsoftware (DOT) com http://www.goldstarsoftware.com *** Pervasive.SQL Service & Support Classes *** Chicago: September 16-18: See our web site for details! S Nelissen wrote: Hello, I once read in the Pervasive docs (I don't remember when and where) that the maximum size of a user transaction is limited by the engine cache. Is this correct ? I did a test and updated a record for about 200,000 times in a single user transaction. The transaction log files grew to about 265 Mb, the cache is only 32 Mb. I don't see any limitation. Could it be this piece of information is some left over from a previous version of the engine (6.15) ? Thanks, Serge Nelissen C-LOGIC N.V. |
#5
| ||||||||
| ||||||||
|
|
Yes all the updates from the transaction have to fit in Cache How can 350,000 inserts of a 4K record fit in 32 MB cache ? |
|
or you will get a status 100. We get status 2015 |
|
Perhaps you may get an error allocating the aditional memory to handle it. Which _additional_ memory ? The cache is allocated at startup of the |
|
My question is, why is such a huge transaction being done. Well, we import data from import files (which is a batch process). During |
|
Is the use of a single transaction required? See above |
|
Can it be broken up into smaller chunks? If we know the exact status codes, we can display a message to the user to |
|
Keep in mind that no matter what you test for some user will go +1 on the size of the data set and -1 on the setting to handle it. Sorry, I don't understand this sentence (I speak Dutch) |
|
The actual answer is "it depends on which version you use". There was an internal change in behavior handling tansactions with Pervasive.SQL V8. Prior to Pervasive.SQL V8, yes the entire transaction has to fit in cache pages. Pervasive.SQL V8 moves some of the data structures outside the cache into system memory, but all the data pages still have to fit in L1. There is a side effect. Huge transactions displace cached data pages from the cache. This can adversely affect performance. Yes all the updates from the transaction have to fit in Cache or you will get a status 100. Perhaps you may get an error allocating the aditional memory to handle it. My question is, why is such a huge transaction being done. Transactions were designed to provide atomic updates across multiple files. They were not really designed to hold pending batch operations. The entire pending transaction must fit in memory (part of that "pending transactions not affecting the data files"). The simple answer is: It was not designed to do what you are trying to do. Is the use of a single transaction required? Can it be broken up into smaller chunks? Keep in mind that no matter what you test for some user will go +1 on the size of the data set and -1 on the setting to handle it. Leonard On Mon, 14 Jul 2003 10:01:50 +0200, "S Nelissen" <spam (AT) spam (DOT) com wrote: Hi Bill. Have you read my other post ? I cannot believe that 350,000 inserts fit into 32 MB cache, so the limit must be imposed by something else than the cache size. And, status 2015 is returned, not 100. But, it isn't an ordinary status, but a MKDE-status and it is logged in Pvsw.log as : "07-11-2003 14:32:59 W3MKDE 000000B6 W3dbsmgr.exe WRKSNE1 E MicroKernel cannot get sufficient memory to complete the operation." I think we both need some explanation from Pervaisve :-) Thanks for answering, Serge PS Tested with V7 "Bill Bach" <bbach (AT) cncdsl (DOT) com> wrote in message news:3F0EEC95.39B2F2D9 (AT) cncdsl (DOT) com... The size of a transaction *IS* limited to the cache size, and you will get a Btrieve Status 100 returned if you exceed this. However, your test is flawed -- your updating a SINGLE record will only change a few pages in cache, and will not overflow it. To better test this -- open a file that has a size (on disk) of about 100MB. Start a transaction and start updating records (you don't necessarily need to actually change any data). When you have changed a large part of the file and exceeded the maximum dirty pages in cache, the transaction will fail and you'll get the Status 100 back. Goldstar Software Inc. Building on Btrieve(R) for the Future(SM) Bill Bach BillBach (AT) goldstarsoftware (DOT) com http://www.goldstarsoftware.com *** Pervasive.SQL Service & Support Classes *** Chicago: September 16-18: See our web site for details! S Nelissen wrote: Hello, I once read in the Pervasive docs (I don't remember when and where) that the maximum size of a user transaction is limited by the engine cache. Is this correct ? I did a test and updated a record for about 200,000 times in a single user transaction. The transaction log files grew to about 265 Mb, the cache is only 32 Mb. I don't see any limitation. Could it be this piece of information is some left over from a previous version of the engine (6.15) ? Thanks, Serge Nelissen C-LOGIC N.V. |
#6
| |||
| |||
|
|
How about changing the import process? I would do something like this: Phase 1 import TXT data UNCHECKED to a holding table Phase 2 for each record in holding table start transaction check record in holding table if OK import it and delete it from the holding table end transaction At the end of one run all valid records will have been imported, all invalid record will be left in the holding table for correction. Phase 2 can be repeated as many times as necessary. Guy -- -------------------------------------------------------------------- Guy Dawson I.T. Manager Crossflight Ltd gnues (AT) crossflight (DOT) co.uk |
#7
| ||||||
| ||||||
|
|
I think this is a _very_ valuable idea. But, I see some problems/difficulties... 1. If the holding table is a Btrieve file, we need a special editor to make corrections in the Btrive file |
|
2. We import documents like invoices etc... Most of the time, they are numbered automatically. By skipping some (faulty) documents, we create documents whose document numbers are out of order. |
|
3. Sometimes data in one record is dependent of the previously imported record. Skipping records might cause problems. |
|
4. Some users want it to be all or nothing |
|
So, I prefer using one big transation, and I can live with a limitation about the size of it. I just need to know _exactly_ what the limitation is and why status 2015 is returned while status 100 is expected. |
|
But, your idea gives me inspiration for another method... Is there a method of _canceling_ a continous operation ? I could put the files in continous operation with STARTBU, do the import and end it with ENDBU if everything is OK. I could do a 'CANCELBU' (invented command) if something went wrong. Any idea if this could be possible ? Might be a nice feature request :-) |
#8
| |||
| |||
|
|
Hello, I once read in the Pervasive docs (I don't remember when and where) that the maximum size of a user transaction is limited by the engine cache. Is this correct ? I did a test and updated a record for about 200,000 times in a single user transaction. The transaction log files grew to about 265 Mb, the cache is only 32 Mb. I don't see any limitation. Could it be this piece of information is some left over from a previous version of the engine (6.15) ? Thanks, Serge Nelissen C-LOGIC N.V. |
![]() |
| Thread Tools | |
| Display Modes | |
| |