In this Document
|
|
Goal |
|
|
Solution |
| 'log file sync' Waits |
| Parameter: _use_adaptive_log_file_sync |
| Known Issues with "_use_adaptive_log_file_sync" set to TRUE |
|
|
References |
The document explains adaptive log file syncs introduced in 11.2 and the supporting parameter "_use_adaptive_log_file_sync" .
When a user session commits (or rolls back), the redo information
needs to be flushed to the redo logfile. The user session will post the
LGWR to write all redo required from the log buffer to the redo log
file. The user session waits on ‘log file sync’ while waiting for LGWR
to post it back to confirm all redo changes are safely on disk.
For further information on 'log file sync' waits and how to alleviate performance problems arising from high waits see:
For a list of known issues in 11.2 see:
The parameter “_use_adaptive_log_file_sync” was introduced in 11gR2
and controls whether adaptive switching between post/wait and polling is
enabled.
In 11.2.0.1 and 11.2.0.2 the default value for the
parameter is false. From 11.2.0.3, the default value has been changed to
true.
“_use_adaptive_log_file_sync” is a dynamic parameter that can be changed at system level.
Adpative Log File Sync
There are 2 methods by which LGWR and foreground processes can communicate in order to acknowledge that a commit has completed:
Initially the LGWR uses post/wait and according to an internal
algorithm evaluates whether polling is better. Under high system load
polling may perform better because the post/wait implementation
typically does not scale well. If the system load is low, then post/wait
performs well and provides better response times than polling. Oracle
relies on internal statistics to determine which method should be used.
Because switching between post/wait and polling incurs an overhead,
safe guards are in place in order to ensure that switches do not occur
too frequently.
All switches are recorded in LGWR's trace file with a time stamp and the string "Log file sync switching to ...":
Switch to polling:
Switch to post/wait:
Statistics on polling are stored in v$sysstat:
In the above example we see that polling is not occurring
The statistics are also included in the AWR report:
In the above AWR we see that polling is occurring
In the vast majority of cases adaptive log file sync improves the overall performance of log file synchronisation.
Following is a list of known issues.
As
these issues are fixed in 11.2.0.4 and 12.1, it is advisable to be at
least on one of these versions in order to avoid the known issues.
If there is a need to disable adaptive log file sync this can be done by setting _use_adaptive_log_file_sync = false either in the spfile and restarting the database or dynamically in memory.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31393455/viewspace-2130874/ ,如需转载,请注明出处,否则将追究法律责任。