Every COMMIT in Oracle is a synchronous handshake with the Log Writer (LGWR). The foreground session hands off its redo, waits for LGWR to flush that redo to the online redo logs, and only then returns control to the application. The wait event that covers this round trip is log file sync. When LGWR is slow, every committing transaction is slow. This is the most common “everything is uniformly slow” pattern in Oracle and the single most important latency signal to monitor.
The diagnostic power comes from comparing two events. log file sync is the client’s view: it spans posting LGWR, LGWR scheduling, the actual disk write, and LGWR posting back. log file parallel write is LGWR’s own view: pure I/O time. If both are high, storage is the bottleneck. If log file sync is high but log file parallel write is low, the problem is LGWR scheduling, CPU starvation, or the adaptive log file sync mechanism thrashing between post/wait and polling modes.
On modern SSD or NVMe storage, average log file sync should sit under 1ms. Above 3ms warrants investigation. Above 10ms is critical and means every commit in the system is paying a visible tax. SAN-backed redo logs tolerate higher baselines (under 5ms normal, above 20ms critical), but the same comparison logic applies regardless of storage class.
The signal in V$SYSTEM_EVENT is a cumulative average since instance startup. Variance matters as much as the average. A 2ms average with regular 100ms outliers usually indicates storage queueing or adaptive sync switching, both of which need different fixes than steady-state latency. In RAC, each instance has its own LGWR and its own redo thread, so a redo problem on one node can be invisible in cluster-wide aggregate views.
Common causes
| Cause | What it looks like | First thing to check |
|---|---|---|
| Redo log storage latency | log file sync and log file parallel write both elevated; iostat await on redo device is high | iostat -x 1 5 on the redo LUN |
| Redo logs sharing storage with data files | Latency rises during checkpoint or heavy DBWn activity | Confirm redo and data files are on separate volumes or ASM disk groups |
| LGWR CPU starvation | log file sync high, log file parallel write normal; CPU run queue saturated | OS load average, top, vmstat 1 |
| Adaptive log file sync thrashing | Spiky, high-variance log file sync with low log file parallel write | Hidden parameter _use_adaptive_log_file_sync |
| Commit storm | High commit count from autocommit or chatty ORM; per-commit redo is small | V$SYSSTAT user commits rate |
| Data Guard SYNC transport | log file sync elevated on primary when standby is slow or network is congested | LNS wait on SENDREQ, LGWR-LNS wait on channel |
| Redo log multiplexing to slow member | One member on NFS or shared storage drags down every write | V$LOGFILE member locations |
| Oversized redo log buffer | LGWR flushes large chunks, individual waits are long even if throughput is fine | LOG_BUFFER value |
Quick checks
-- log file sync average (system-wide, cumulative since startup)
SELECT EVENT, TOTAL_WAITS, TIME_WAITED_MICRO,
ROUND(TIME_WAITED_MICRO/NULLIF(TOTAL_WAITS,0)/1000, 2) AS avg_ms
FROM V$SYSTEM_EVENT WHERE EVENT = 'log file sync';
-- LGWR's actual I/O time (the comparison event)
SELECT EVENT, TOTAL_WAITS, TIME_WAITED_MICRO,
ROUND(TIME_WAITED_MICRO/NULLIF(TOTAL_WAITS,0)/1000, 2) AS avg_ms
FROM V$SYSTEM_EVENT WHERE EVENT = 'log file parallel write';
-- Sessions waiting on log file sync right now
SELECT SID, SERIAL#, EVENT, SECONDS_IN_WAIT, SQL_ID
FROM V$SESSION
WHERE EVENT = 'log file sync' AND STATE = 'WAITING';
-- Commit rate (sample twice, compute delta over interval)
SELECT VALUE FROM V$SYSSTAT WHERE NAME = 'user commits';
-- Redo generation rate (sample twice, compute bytes/sec)
SELECT VALUE FROM V$SYSSTAT WHERE NAME = 'redo size';
-- Redo log group configuration
SELECT GROUP#, THREAD#, MEMBERS, BYTES/1048576 AS size_mb, STATUS
FROM V$LOG ORDER BY GROUP#;
-- Redo log member locations (check for slow members)
SELECT GROUP#, MEMBER FROM V$LOGFILE ORDER BY GROUP#;
# OS-level redo device latency (Linux sysstat package)
iostat -x 1 5
# Check adaptive log file sync setting (hidden parameter; requires SYSDBA)
sqlplus -S / as sysdba <<'EOF'
SELECT KSPPINM, KSPPSTVL
FROM X$KSPPI k, X$KSPPCV v
WHERE k.INDX = v.INDX
AND KSPPINM = '_use_adaptive_log_file_sync';
EOF
How to diagnose
- Confirm
log file syncis actually elevated. On SSD/NVMe, anything above 3ms sustained warrants investigation; above 10ms is critical. Compare againstlog file parallel writerather than reading the absolute number alone.
- Pull
log file parallel writefrom the same view. This is the single most important comparison in Oracle performance diagnosis. The ratio between the two events tells you where the time is going.
flowchart TD
A["log file sync elevated"] --> B{"log file parallel write also high?"}
B -- "Yes, both high" --> C["Storage I/O bottleneck"]
C --> C1["iostat await on redo device"]
C --> C2["Redo on dedicated LUN?"]
C --> C3["SAN contention or SSD wear"]
B -- "No, sync high only" --> D["LGWR scheduling or CPU"]
D --> D1["CPU run queue saturated"]
D --> D2["Adaptive sync thrashing"]
D --> D3["LGWR starved by scheduler"]If
log file parallel writeis also elevated, the bottleneck is storage I/O. Skip to step 5.If
log file parallel writeis normal butlog file syncis high, the bottleneck is LGWR scheduling or CPU. Check the OS CPU run queue (uptime,vmstat 1,top). Verify LGWR is getting CPU time. Check the adaptive log file sync setting (the hidden parameter_use_adaptive_log_file_sync). LGWR posting latency is inflating the client view even though the underlying write is fast.For storage I/O bottlenecks, verify with OS-level tools.
iostat -x 1 5on the redo device showsawaitand%util. Confirm redo logs are on a dedicated volume, not shared with data files. Check for SAN path degradation, SSD wear-out, or filesystem journaling overhead. ext4 withdata=journaladds latency to redo writes. On VMware, check CPU ready time inesxtop(%RDY), because vCPU scheduling delay shows up inside Oracle wait events.Check commit volume. A commit storm (autocommit applications, chatty ORMs committing after every row) multiplies the impact of any per-commit latency. Sample
user commitsfromV$SYSSTATtwice to compute commits per second.If Data Guard is configured with SYNC transport, check standby-related events.
LNS wait on SENDREQandLGWR-LNS wait on channelon the primary indicate it is waiting on the standby. SYNC AFFIRM mode means every commit waits for the standby to write redo to its own standby redo logs before acknowledging.Check redo log group configuration. Undersized redo logs cause frequent switches, which amplify latency.
checkpoint not completemessages in the alert log indicate DBWn cannot keep up with log switches, not an LGWR problem. That is a DBWn write-path issue and has a different fix.If symptoms are spiky and high-variance, suspect adaptive log file sync. The mechanism switches LGWR between post/wait (semaphore-based) and polling (foreground sleeps and polls an SGA variable) modes. Known bugs in this switching can cause multi-second
log file syncoutliers on otherwise fast storage.
Metrics and signals to monitor
| Signal | Why it matters | Warning sign |
|---|---|---|
log file sync average wait | Primary commit latency indicator | >3ms on SSD, >10ms on SAN sustained |
log file parallel write average wait | LGWR’s actual I/O time, splits storage from scheduling | >10ms indicates slow redo I/O |
| Ratio of sync to parallel write | Localizes bottleneck to storage or LGWR | Sync much higher than parallel write means non-I/O overhead |
user commits rate | Commit volume amplifies per-commit latency | Sudden spike from application change |
redo size rate | Redo generation pressure on storage and archiver | Sustained high rate outside batch windows |
| OS I/O latency on redo device | Ground truth for storage performance | await rising independently of IOPS |
| CPU run queue | LGWR scheduling latency source | Run queue above CPU core count sustained |
log file switch (checkpoint incomplete) | DBWn cannot keep up with redo switches | Any sustained occurrence |
| Data Guard transport lag | SYNC standby slowness feeds back to primary | Growing lag on SYNC destinations |
Fixes
Redo log storage latency
If log file parallel write confirms storage is the bottleneck, the fix is faster or dedicated storage.
- Move redo logs to a dedicated LUN or ASM disk group, separate from data files. Redo writes are sequential and latency-sensitive; data file reads and DBWn writes are a different I/O profile and compete for the same spindles or flash channels.
- On SAN, verify the redo LUN is on the fastest tier and check for path degradation. Storage vMotion or snapshot operations on the redo LUN add invisible latency.
- On filesystems, use
data=writebackfor ext4 or raw ASM.data=journaldoubles write traffic and adds latency. - On NVMe or persistent memory, Oracle 21c+ supports “fast log file sync” for redo logs on PMEM, using adaptive sleep and spin in foreground processes for sub-microsecond commit latencies.
LGWR CPU starvation
If log file parallel write is normal but log file sync is high, LGWR is not getting CPU time when it needs to write or post back.
- Check CPU saturation system-wide. LGWR is a single process per instance and competes with all user server processes for CPU. On a saturated box, LGWR can be starved even though it runs at high priority.
- Verify hugepages are configured for the SGA. Without hugepages, page table overhead consumes memory and TLB misses add latency to every SGA access, including LGWR’s redo log buffer scans.
- Consider LGWR process priority tuning only if CPU contention is chronic. This is environment-specific and should be tested carefully before production rollout.
Adaptive log file sync thrashing
The hidden parameter _use_adaptive_log_file_sync (default TRUE from 11.2.0.3) lets LGWR switch between post/wait and polling modes. The intent is to pick the lower-overhead mode, but the switching itself can cause severe latency outliers.
If you see spiky, high-variance
log file syncwith normallog file parallel write, test disabling adaptive sync:-- Dynamic change; does not require a restart. -- WARNING: hidden parameter; test on a non-production node first and check support impact. ALTER SYSTEM SET "_use_adaptive_log_file_sync" = FALSE;This forces post/wait mode.
Many production DBAs run with this parameter set to FALSE permanently after experiencing thrashing. Post/wait overhead is negligible on modern systems.
Commit storms and oversized redo
If the commit rate itself is the problem, the fix is application-side.
- Batch commits in OLTP loops. Committing after every row in a bulk insert multiplies LGWR round trips by the row count.
- For non-critical data, consider asynchronous commit via
COMMIT_WRITE = BATCH, NOWAITat the session level. This returns control to the application before LGWR confirms the write, trading durability for latency. Never use this for financial or transactional data where durability is required.
- Check for unintended redo generation. Supplemental logging (required for GoldenGate) can multiply redo volume 2-5x.
NOLOGGINGoperations generate minimal redo but leave objects unrecoverable without a fresh backup and corrupt blocks on a standby unless the standby is rebuilt afterward.
Data Guard SYNC transport
If the primary’s log file sync is elevated and Data Guard is configured with SYNC (Maximum Availability or Maximum Protection mode), the primary is waiting for standby acknowledgment.
- Check
LNS wait on SENDREQandLGWR-LNS wait on channelevents on the primary. - Verify network bandwidth between primary and standby is sufficient for the redo generation rate.
- Consider switching to ASYNC (Maximum Performance mode) if the business allows. This decouples primary commit latency from standby and network performance.
- AFFIRM means the standby must write redo to its own standby redo logs before acknowledging. NOAFFIRM acknowledges on receive. AFFIRM is safer but slower.
Redo log sizing and grouping
Undersized redo logs cause frequent switches, which amplify latency and can trigger checkpoint not complete.
- Add more redo log groups. This gives DBWn more time to checkpoint before LGWR needs to reuse a log.
- Increase redo log group size. A common target is 15-30 minutes between switches under normal load. More than one switch per minute almost guarantees checkpoint issues.
- Check switch frequency with
V$LOG_HISTORY.
-- Log switch frequency by hour
SELECT TO_CHAR(FIRST_TIME, 'YYYY-MM-DD HH24') AS hour, COUNT(*) AS switches
FROM V$LOG_HISTORY WHERE FIRST_TIME > SYSDATE - 1
GROUP BY TO_CHAR(FIRST_TIME, 'YYYY-MM-DD HH24') ORDER BY 1;
These changes buy time but do not fix underlying storage latency. If the redo device is slow, larger logs just delay the problem.
Prevention
- Monitor
log file syncandlog file parallel writetogether as a ratio. Alert on either exceeding thresholds, but diagnose using the comparison. - Keep redo logs on dedicated, fast storage. This is the single highest-value architectural decision for Oracle write performance.
- Establish a baseline for commit latency during normal operation. Static thresholds are noisy; baseline deviation by hour of day catches regressions earlier.
- Test adaptive log file sync behavior under load before relying on it. If your workload triggers thrashing, disable it preemptively.
- For Data Guard SYNC deployments, size network and standby I/O for at least 2x peak redo generation rate.
- Review redo log switch frequency quarterly as workload grows. Sizing that was correct at 1000 TPS may be wrong at 5000 TPS.
How Netdata helps
- Per-second collection of
log file syncandlog file parallel writemakes the ratio that localizes the bottleneck visible without manual SQL sampling during an incident. - ML-based anomaly detection flags latency spikes and variance changes that static thresholds miss, including the spiky pattern characteristic of adaptive log file sync thrashing.
- Correlating Oracle wait events with OS-level disk latency, CPU run queue, and CPU utilization in a single timeline shows whether
log file syncspikes line up with storage contention, CPU saturation, or neither. - For Data Guard environments, transport lag metrics on the standby correlate with primary
log file syncto confirm whether SYNC transport is the source. - Composite alerting on
log file sync(latency elevated,log file parallel writealso elevated, TPS meaningful) reduces false positives from transient spikes that do not indicate real problems.
See Oracle Database monitoring with Netdata for the integrated view.
Related guides
- Oracle slow commit cascade: when redo storage degrades and every transaction waits
- Oracle ‘Checkpoint not complete’: redo log sizing, DBWn, and log-switch stalls
- Oracle redo log switch frequency: undersized logs and checkpoint pressure
- Oracle redo generation rate: capacity planning for archiving and Data Guard
- Oracle Database monitoring checklist: the signals every production instance needs
- How Oracle Database actually works in production: a mental model for operators
- Oracle Database monitoring maturity model: from survival to expert
- ORA-00257: archiver error, connect internal only until freed
- Oracle ‘Thread N cannot allocate new log’: the archive hang that masquerades as up
- Oracle archive log destination full: V$ARCHIVE_DEST_STATUS, the ERROR state, and space
- Oracle Fast Recovery Area full: db_recovery_file_dest_size, reclaimable space, and DELETE OBSOLETE
- Oracle RMAN backup failures: V$RMAN_BACKUP_JOB_DETAILS and silent RPO loss






