Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 
 

PCTFREE and PCTUSED Tips

Mike Ault Tips - August 5th, 2004

 

PCTFREE and PCTUSED

The PCTFREE and PCTUSED parameters tell Oracle when to link and unlink a block from the freelist chain.  The following discussion only applies if you are not using the new Automatic Segment Space Management (ASS Management).

The ASS management tablespace is new in Oracleand is implemented by adding the SEGMENT SPACE MANAGEMENT AUTO clause to the tablespace definition. ASM tablespaces automate freelist management and remove the ability to specify PCTFREE, PCTUSED, FREELISTS, and FREELIST GROUPS storage parameters.

The setting for PCTFREE sets the value for the percent of a block to reserve for updates. A block will remain on a FREELIST until it reaches blocksize * (1-(ptcfree/100)) full or greater. Here are the main issues with incorrect settings:

  • High migrated/chained rows - If PCTFREE is to small, adequate space may not be reserved in the block for update of variable sized rows in the block, or, may not have enough space for a complete row insert. In this case a block chaining will occur where the data is migrated to a new block and a pointer will be established from the old block to a new block.
     

  • High I/O - This will result in doubling the IO required to retrieve this data. For new data blocks, the space available for inserts is equal to the block size minus the sum of the block overhead (84-107 bytes) and free space (PCTFREE/100 * blocksize). When you update existing data Oracle uses any available space in the block. So, updates will eventually reduce the available space in a block to less than PCTFREE, the space reserved for updates but not accessible to inserts. This removes the block form the freelist on which it resides.

All professional DBA?s know that minimizing chained rows is a fundamental job role and they recognize that row migration (chaining) is a function of:

  • blocksize

  • PCFREE

  • load time average row length

  • Expected row expansion (bytes per row)

 

The un-link process

Blocks with total filled volume less than BLOCKSIZE ? overhead ? (blocksize*(1-(PCTFREE/100)) are available for inserts. When you issue an INSERT statement, Oracle checks a free list of the table for the first available data block and uses it if possible. If the free space in the selected block is not large enough to accommodate the data in the  INSERT statement, and the block is at least filled to the value PCTUSED, then Oracle will remove the block from the free list. Multiple free lists for each segment can reduce contention for free lists when concurrent inserts take place.

The Re-link Process

After processing a DELETE or UPDATE statement, Oracle checks to see if the space being used in the block is now less than (BLOCKSIZE ? overhead) * PCTUSED/100. If it is, then the block goes to the beginning of the transaction free list, and it is the first of the available blocks to be used in that transaction. However, it is only when the transaction commits, that the free space in the block becomes available for other transactions.

For tables with high levels of updates, setting PCTFREE to a high value is suggested, for blocks which are never updated, then set this to a low value. For example, for a high update table a setting of 40-50 is acceptable, while for a low or no update table (such as in a data warehouse) a setting of 5 or less is acceptable. PCTUSED must be set to less than 100-PCTFREE and should be set such that PCTFREE+PCTUSED is less than 100. If PCTFREE+PCTUSED=100 this can result in see-sawing of the block on and off the free lists which can be a performance issue.

 
If you like Oracle tuning, see the book "Oracle Tuning: The Definitive Reference", with 950 pages of tuning tips and scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.


 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.