The following warning in your Oracle alert log:
WARNING: Heavy swapping observed on system in last 5 mins.
Heavy swapping can lead to timeouts, poor performance, and instance eviction.
This message is a red flag indicating that your system is under memory pressure, and Oracle is struggling to maintain performance.
What Is “Heavy Swapping”?
Swapping happens when your system runs out of physical RAM and starts using disk space (swap memory) to store parts of active processes. This is much slower than RAM and can severely degrade performance.
In Oracle environments, heavy swapping can:
- Delay log writes and background processes
- Cause timeouts and slow queries
- Trigger instance eviction in clustered setups (RAC)
- Lead to ORA-01254 and other listener errors
What Causes This?
Several factors can lead to heavy swapping:
- Oversized SGA or PGA settings: If Oracle’s memory allocations exceed available RAM, the OS starts swapping.
- Too many concurrent sessions or processes
- Other applications consuming memory
- Misconfigured desktop heap size in Windows environments, especially for Oracle services running in noninteractive sessions
How to Fix It
Here are practical steps to resolve and prevent this issue:
1. Tune Oracle Memory Settings
- Reduce
SGA_TARGETandPGA_AGGREGATE_TARGETto fit within physical RAM. - Use Oracle’s Automatic Memory Management (AMM) cautiously.
2. Monitor System Memory
- Use tools like
vmstat,top, or Windows Task Manager to check memory usage. - Look for processes consuming excessive RAM.
3. Increase Noninteractive Desktop Heap (Windows Only)
This increases memory for services running without user interaction, which is common for Oracle background jobs
- Navigate to window registry ( regedit command)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems
Edit the Windows value and change:
SharedSection=1024,3072,512
to:
SharedSection=1024,3072,1024
4. Check for Related Errors
- ORA-01254: TNS Listener doesn’t recognize the service—often linked to memory pressure.