Salesforce

What is the RM Chain?

« Go Back

Information

 
TitleWhat is the RM Chain?
URL Name19021
Article Number000173436
EnvironmentProduct: Progress OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
What is the RM Chain?
How space is allocated for records?
How is space allocation handled within the database engine?
How does Progress allocate space for records in the database?
What is the RM (Record Manager) Chain?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
The Progress Database Manager maintains a list of blocks in the database which have free space in them, and are therefore eligible for record additions. This list is called the RM Chain. It is important to note that this list does not contain all blocks in the database; only those with space available for new records or updates to existing records in the block.

How space is allocated for records?

To find space to store a record, or a record fragment, the database manager first looks at the RM Chain to see if an existing record block with unused space is available.
  1. If the block at the head of the RM chain contains enough space to store the fragment while still leaving expansion space, and the block has unused record slots, then that block is used. The record is copied to the block and the amount of unused space in the block is updated.
  2. If the block at the head of the RM chain cannot be used to store the record, and it has less unused space than the free space constant, or if all the record slots have been used, it is removed from the RM Chain. Otherwise, it is moved to the tail end of the chain. In either case, the next block on the front of the RM Chain is considered and the process is repeated until sufficient space has been found or the search limits have been reached.
  3. To limit the search time, no more than 100 blocks on the RM Chain will be examined and removed from the chain at a time. No more than three blocks at a time will be examined and moved to the tail end. If either of these limits is exceeded during a search for space, the search for reusable space is abandoned and a Free Block is used.
  4. When no existing record block can be used, an unused block is allocated. The block is formatted as an RM block, and the record is stored in it.
  5. If the block is already on the RM chain, but now has less free space than the free space constant, or all the record slots are filled, then the block should be removed from the RM Chain. But, since the RM Chain is linked only in for forward direction, it can only be removed when it is the first block on the chain. If it is not the first block, it will be left in the chain. It will be removed later while searching for record space, if it should become the first block on the chain during the search.
The above discussion applies to Type I Storage Areas. With the introduction of Type II Storage Areas in OpenEdge 10, while the terminology remains, the behaviour or use and re-use changes. Refer to Article  VST's to monitor space in a Type II Storage Area?   
Workaround
Notes
References to Written Documentation:

Engine Crew Monograph, "Space: The Final Frontier," by Gus Bjorklund, Progress Software.

Progress Articles: 

Explanation of RM blocks and Free blocks.   
VST's to monitor space in a Type II Storage Area?   
000019823 , What does progress do when deleting records from the database?   
 
Keyword Phrase
Last Modified Date11/20/2020 7:37 AM

Powered by