Host CPU Saturation Driven by Hard Parse Storm [Resource Contention]Resource Contention · Host CPU Saturation Driven by Hard Parse Storm
Host CPU saturation (approaching 100% utilization with elevated OS run queues) driven by massive concurrent Cost-Based Optimizer compilations (Hard Parses). Because CPU starvation delays every process in the OS scheduler, a hard parse storm degrades Elapsed Time across completely unrelated healthy OLTP queries.
Diagnostic Disambiguation Matrix
Verified operational error scenario under Oracle 19c, 26ai: Host CPU saturation (approaching 100% utilization with elevated OS run queues) driven by massive concurrent Cost-Based Optimizer compilations (Hard Parses). Because CPU starvation delays every process in the OS scheduler, a hard parse storm degrades Elapsed Time across completely unrelated healthy OLTP queries.
Not an error belonging to an external database engine or unrelated subsystem; native to this catalog.
The error string is a symptom, not the root cause. Do not restart database servers blindly! Execute the read-only diagnostic queries below to determine the actual failure mode before attempting session terminations or configuration changes.
▸1. Description & Context
Host CPU saturation (approaching 100% utilization with elevated OS run queues) driven by massive concurrent Cost-Based Optimizer compilations (Hard Parses). Because CPU starvation delays every process in the OS scheduler, a hard parse storm degrades Elapsed Time across completely unrelated healthy OLTP queries.
Severity Context: Critical — Causes instance-wide latency amplification, cascading mutex waits, and application connection-pool exhaustion.
▸2. Possible Causes (Confirm Root Cause via Evidence)
- •Possible cause (must be verified): A newly deployed high-traffic application path concatenating literals instead of using bind variables.
- •Possible cause: Peak-hour statistics refresh with NO_INVALIDATE => FALSE, invalidating DDL, or an ill-advised ALTER SYSTEM FLUSH SHARED_POOL.
- •Possible cause: Undersized Shared Pool continuously evicting active cursors and forcing reparses.
- •Possible cause: Connection/logon storms paired with inconsistent session optimizer settings preventing cursor sharing.
▸3. Read-Only Diagnostic Steps
- 1Compute the share of "parse time elapsed" and "hard parse elapsed time" relative to "DB CPU" and "DB time" in V$SYS_TIME_MODEL.
- 2Check hard parse velocity in V$SYSSTAT ("parse count (hard)") alongside host NUM_CPUS and LOAD in V$OSSTAT.
- 3Pinpoint literal SQL families via FORCE_MATCHING_SIGNATURE in V$SQLSTATS or mass invalidations in V$SQLAREA.
-- ORA-CAT-19 | Core Oracle Database (EE & SE2) — no extra pack required. | Syntax-Reviewed (Not Runtime-Tested)
-- READ-ONLY | License-free core V$ view
SELECT stat_name, ROUND(value/1e6, 2) AS seconds
FROM v$sys_time_model
WHERE stat_name IN (
'DB time', 'DB CPU', 'parse time elapsed',
'hard parse elapsed time', 'hard parse (sharing criteria) elapsed time'
)
ORDER BY value DESC;▸4. Controlled Remediation Options
- •Fix application code to use bind variables (permanent fix); treat CURSOR_SHARING=FORCE strictly as an evaluated temporary emergency mitigation.
- •Enforce AUTO_INVALIDATE for stats refreshes and prohibit peak-hour FLUSH SHARED_POOL or mass-invalidating DDL.
- •Optimize connection pooling, statement caching, and Shared Pool sizing.
▸5. Related Terms & References
- •Related Terms: Hard Parse, Soft Parse, DB Time, Cursor Invalidation
- •Main Technical Guide: Oracle SQL Plan Regression: Detection, Diagnosis and Stabilization
- •Official Documentation: Oracle Documentation
ORACLE Diagnostic Standards, Operational Reliability, and Interview Readiness.
This error is not merely a config typo; it is a lesson in consistency models, concurrency architectures, and capacity planning.
- Articulate error symptoms, distinguishing diagnostics, and safe recovery steps.
- Implement architectural safeguards to permanently eliminate root causes.
What Senior Interviews Ask About This Error?
Q1When this error (Host CPU Saturation Driven by Hard Parse Storm [Resource Contention]) surfaces in production, what must be inspected within the first 60 seconds?Mid
Before restarting servers blindly, inspect active sessions, locks, and recent engine logs to identify the true failure mode.
Q2Which metrics should be integrated into alerting to prevent recurrence of this issue?Senior
Set up early warning metrics targeting connection pools, memory grants, disk headroom, or lock queues with actionable thresholds.
Q3How should applications defensively guard against this database failure?Junior
Implement idempotent retry loops with backoff, strict query timeouts, verified connection pool bounds, and structured error logging.
Senior DBA & SRE Career Roadmap
Explore database reliability milestones, incident response protocols, and architectural leadership.
More ORACLE Diagnostic Playbooks
Battle-tested triage guides for production incidents.
Oracle ORA-01653: Tablespace Extension & Step-by-Step Fix
Distinguishing ORA-01653, 01654, and 01652, tablespace capacity monitoring, datafile autoextend, and safe sizing with MAXSIZE.
Oracle ORA-00001: unique constraint violated Triage & Fix
Troubleshooting unique key collisions caused by out-of-sync sequences and bulk imports; sequence fast-forwarding and DML error logging.
Oracle ORA-00060: deadlock detected while waiting for resource Triage
Root cause analysis of cross-dependency deadlocks and missing foreign key index table locks via trace logs and serialized DML execution.