Feedback
Did this article resolve your question/issue?

   

Article

How to force dirty data buffers to disk

« Go Back

Information

 
TitleHow to force dirty data buffers to disk
URL NameHow-to-force-dirty-data-buffers-to-disk
Article Number000113064
EnvironmentProduct: OpenEdge
Version: All supported versions
OS: All supported platforms
Other: Enterprise Database
Question/Problem Description
How to force dirty data buffers from shared-memory to disk ?
Are dirty buffers flushed to disk during a QUIET point or only after a quiet point is lifted?
Does quiescing the database flush modified data buffers from shared memory to disk?
Does an online dbanalys flush modified blocks to disk?
Does a full or incremental PROBKUP flush dirty buffers to disk?
Will an APW write dirty buffers to disk during a QUIET point or only after the quiet point is lifted?

Use Case: To ensure changes done by the committed transactions are not lost when the database is shutdown due to disk cache issues
Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution
1. TABANALYS does not flush the modified blocks on disk:
2. PROBKUP does flush modified blocks on disk:
3. PROQUIET ENABLE flushes the correspondent bi buffers to disk then ai buffers when the AI is switched, but it does not write dirty data buffers to disk. Modified buffers are flushed pre-PROQUIET and post-PROQUIET, not during PROQUIET

Consider the following demonstration:
$  prodb sports2000 sports2000
$  proserve sports2000 -B 128
$  prowin sports2000
 
FOR EACH customer EXCLUSIVE-LOCK: 
    ASSIGN customer.name = "x" + customer.name. 
    ASSIGN customer.name = SUBSTRING(customer.name, 2). 
END.

PROMON > R&D > Status: Buffer Cache:   
Status: Buffer Cache 
Total buffers: 130 
Used buffers: 130 
Modified buffers: 5

1. DBANALYS / TABANALYS does not flush modified blocks on disk:
         
$   proutil sports2000 -C dbanalys  

PROMON > R&D > Activity: Buffer Cache :
Database Buffer Pool  
Logical reads 6287  
Logical writes 0  
O/S reads 414  
O/S writes 0

PROMON > R&D > Status: Buffer Cache :
Modified buffers: 5

2. PROBKUP does flush modified blocks on disk:
         
$   probkup online sports nul 

PROMON > R&D > Activity: Buffer Cache :
Database Buffer Pool 
Logical reads 1082 
Logical writes 0 
O/S reads 933 
O/S writes 7 
PROMON > R&D > Status: Buffer Cache :
Modified buffers: 0

3.  PROQUIET does not flush modified buffers to disk
  • Modified buffers are flushed pre and post PROQUIET, not during PROQUIET
  • PROQUIET ENABLE flushes the correspondent bi buffers to disk then ai buffers when the AI is switched, but it does not write dirty data buffers to disk
Run the above code again.

PROMON > R&D > Activity: Buffer Cache :
Database Buffer Pool
Logical reads 1669
Logical writes 0
O/S reads 102
O/S writes 3
PROMON > R&D > Status: Buffer Cache :
Total buffers: 130
Used buffers: 130
Modified buffers: 120
Marked for ckp: 1
$   proquiet sports2000 enable

PROMON > R&D > Status: Buffer Cache :
Total buffers: 130
Used buffers: 130
Modified buffers: 118
Enable the APW during database quiesence, to assure the APW effect is demonstrated:
        
$   proapw sports2000

PROMON > R&D > Status: Buffer Cache :
Modified buffers: 118
$   proquiet sports2000 disable

Watch the "Status: Buffer Cache", wait while APWs flush all dirty blocks before shutting the database down:
Total buffers: 130
Used buffers: 130
Modified buffers: 0 ****

 

 
Workaround
Notes
Last Modified Date1/24/2020 1:48 PM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.