Kbase P142370: Database, not including empty blocks, is substantially larger than the actual data size
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  05/03/2009 |
|
Status: Unverified
SYMPTOM(s):
Database, not including empty blocks, is substantially larger than the actual data size at a point in time
Many areas have database blocks with all record slots filled, but less than 50% of each database block is being used to store data at this point in time
Other areas have more than 50% usage of the block space but still have large amounts of space reserved for updates
Cluster size for all type II areas of the database are set to 512
FACT(s) (Environment):
Empty blocks due to the database structure are not considered in this calculation of the database size
All Supported Operating Systems
OpenEdge 10.x
FIX:
A database may take up more space than the actual data stored in the database. The size of the database, in this consideration, does not include empty blocks in its' calculation. Much of the difference between the size of the database (minus empty blocks) and the actual size of the data will vary depending on the amount of space reserved for updates due to the records per block (rpb) setting and the mean record size. Also The number of blocks set for the clusters in type II areas will have some influence on the difference.
On the rpb for example: if the mean record size is 493 for an area and we set the rpb to 8, then each block,on average, will have 8 times 493 (3944 bytes) of the 8K block space used up once all 8 record slots are filled. This then reserves over half the block just for updates to those records that already exist in the block. Since the record slots are filled this reserved space can only be use for updates.
If this database had 10 blocks with data, the database size would be 8 times 8192 = 81920 bytes in size, but the data size would only be 8 times 3944 = 39440 bytes. This example shows why a database may be substantially larger then the actual size of the data in the database.
Consider the cluster size as another reason for the possible size difference; a small amount of additional space can be required, but an entire cluster needs to be allocated. If an area has a cluster size of 512, then 512 database blocks will be added . If the database blocks are 8K, then about 4M will be used even if space for just one more record of 493 bytes is needed. Each object has its' own cluster set. Thus each table will go through this process of adding a cluster of 512 blocks when more space is required for the data in a table. Thus the size of the database is increased by 4M but the data size at that point in time is only increased 493 bytes. One could lower the cluster size to mitigate this difference if appropriate for the current design.
Depending on the cluster size and the rpb/mean record size, the difference between the actual data size and the size of the database can vary. The difference in size referenced in this solution is not static. The difference between the database size and the actual data size can be greatly influenced by design decisions.
There are additional factors that influence the size of the database related to the actual data size but the main two factors related here could account for a substantial difference even a doubling of the database size when compared to the actual data size.