This behavior can be observed (and changed) with gdb - highly experimental (t.ly/lqdJ0)!
Examples:
This behavior can be observed (and changed) with gdb - highly experimental (t.ly/lqdJ0)!
Examples:
This behavior can be observed (and changed) with gdb - highly experimental (t.ly/lqdJ0)!
Examples:
This behavior can be observed (and changed) with gdb - highly experimental (t.ly/lqdJ0)!
Examples:
The deferral can involve spinning in a tight loop up to 25 times (maximum hard-coded in kcrfw_defer_write).
The deferral can involve spinning in a tight loop up to 25 times (maximum hard-coded in kcrfw_defer_write).
Manually enabling and disabling adaptive lgwr evaluation trace for pipelined / overlapped redo writes:
Manually enabling and disabling adaptive lgwr evaluation trace for pipelined / overlapped redo writes:
As always, bpftrace is very useful for observing and studying undocumented behavior:
Trace write info array updates (LGWR/LGnn): t.ly/VV--a
Trace write info array scans (FG): t.ly/67R-J
As always, bpftrace is very useful for observing and studying undocumented behavior:
Trace write info array updates (LGWR/LGnn): t.ly/VV--a
Trace write info array scans (FG): t.ly/67R-J
The "redo synch time overhead" in Oracle is the difference between a FG's log file sync (LFS) wait end time and LGWR's redo write completion time.
LGWR and LG workers track the redo write completion times in the "write info array" in the SGA.
The "redo synch time overhead" in Oracle is the difference between a FG's log file sync (LFS) wait end time and LGWR's redo write completion time.
LGWR and LG workers track the redo write completion times in the "write info array" in the SGA.
gdb: I have the control
gdb: I have the control
The check occurs at query compile time (kkb), kkbkauxbll checks a session flag (at offset saddr + 0x1012) and raises an ORA-46385 if not set to 0x10 (on 19.26).
It’s not exposed in x$ksuse, but I haven’t yet checked where or how it’s set.
The check occurs at query compile time (kkb), kkbkauxbll checks a session flag (at offset saddr + 0x1012) and raises an ORA-46385 if not set to 0x10 (on 19.26).
It’s not exposed in x$ksuse, but I haven’t yet checked where or how it’s set.
This example illustrates how many workers lgwr assigns to handle a parallel write for each combination of "active redo strands" and "log write parallelism", assuming a maximum of 16 public redo strands (this is purely computational, not all combinations have been tested):
This example illustrates how many workers lgwr assigns to handle a parallel write for each combination of "active redo strands" and "log write parallelism", assuming a maximum of 16 public redo strands (this is purely computational, not all combinations have been tested):
Fast Sync wait behavior can be observed with the following bpftrace scipt: t.ly/9K1Mc
All of the above was tested on 19.26 (with RAC on Exadata).
Fast Sync wait behavior can be observed with the following bpftrace scipt: t.ly/9K1Mc
All of the above was tested on 19.26 (with RAC on Exadata).
Computation of the adaptive sleep duration is quite complex and based on additional runtime counters maintained by fg and bg processes in the sga struct kcrf_alfs_info_ (these are not exposed). Anyway, that's a rabbit hole for another day ... 🕵️♂️
Computation of the adaptive sleep duration is quite complex and based on additional runtime counters maintained by fg and bg processes in the sga struct kcrf_alfs_info_ (these are not exposed). Anyway, that's a rabbit hole for another day ... 🕵️♂️
On Exadata with pmemlog, the Fast Log File Sync dynamically tunes the log file sync sleep duration to balance responsiveness vs cpu ovherhead (spinning after wakeup).
Oracle tracks three wait variants via different session stat counters:
1. Sleep
2. Spin
3. Backoff Sleeps
On Exadata with pmemlog, the Fast Log File Sync dynamically tunes the log file sync sleep duration to balance responsiveness vs cpu ovherhead (spinning after wakeup).
Oracle tracks three wait variants via different session stat counters:
1. Sleep
2. Spin
3. Backoff Sleeps
It lets you enable and disable adaptive scalable lgwr, fast log file sync, and log parallelism. Highly experimental, of course!
Example 👇
It lets you enable and disable adaptive scalable lgwr, fast log file sync, and log parallelism. Highly experimental, of course!
Example 👇
The Fast Sync sleep duration used during log file sync waits is an adaptive moving average calculated every 3 sec by ckpt.
For the curious, more details in this python script: tinyurl.com/mrycy7zh
More explanations will follow some other time.
The Fast Sync sleep duration used during log file sync waits is an adaptive moving average calculated every 3 sec by ckpt.
For the curious, more details in this python script: tinyurl.com/mrycy7zh
More explanations will follow some other time.
perf's got you covered:
perf record -a -g -e mem:<addr>:w
perf's got you covered:
perf record -a -g -e mem:<addr>:w
When multiple strands are active, Oracle tends to deactivate them fairly aggressively: lgwr disables one strand on every 10th log write (hard-coded in kcrfw_redo_write_driver).
Example:
When multiple strands are active, Oracle tends to deactivate them fairly aggressively: lgwr disables one strand on every 10th log write (hard-coded in kcrfw_redo_write_driver).
Example:
With multiple active strands, the strand in step 1 is chosen randomly:
strand = rand_nr % active_strands.
If the RAL get fails (in 1. or 2.), rand_nr is incremented to retry with the next strand (wrapping to strand 0 if needed).
Examples:
With multiple active strands, the strand in step 1 is chosen randomly:
strand = rand_nr % active_strands.
If the RAL get fails (in 1. or 2.), rand_nr is incremented to retry with the next strand (wrapping to strand 0 if needed).
Examples: