Optimal number of records to commit using 5.0 engine.
Posted in 1994
The example here uses a table named 'owner_aging' with 165 bytes/record and 115 bytes of index/record. Comments are welcome. Our machine page size is 4096 bytes, as is our Informix buffer size. Each buffer has associated with it some overhead information (structures): - Page header: 24 bytes - Page-ending timestamp: 4 bytes --- 28 bytes/buffer - Slot table: 4 bytes/row inserted owner_aging row size 165 bytes owner_aging idx size 115 bytes (in a separate buffer from the data buffer) It follows that: Buffer Size - Buffer Overhead / Row Size + Slot Size = Optimal # Rows per Buffer (4096 - 28) / (165 + 4) = 24.07 Rows or 24 rows/buffer Now Informix has something called a 'Big Buffer' which is comprised of eight buffers. If we can force a write with eight buffers we will have one Big Buffer write. The function of a Big Buffer is to increase performance on large writes and reads. Therefore: 24 Rows * 8 buffers = 192 rows This would mean that your application can commit after every 192 rows to force a Big Buffer write. You could also multiply 192 by 10 to force 10 Big Buffer writes in a row by committing every 1920 records. It should be noted that the higher the number of records in a commit, the more likely the process will be delayed by checkpoint writes et cetera. It should also be noted that Informix does not allow more than 255 slot entries/buffer which places the limit on the number of rows/buffer at 255. Hope this can help you, Peter -- Peter Farley pef@alert.com