SMON process consuming 100% CPU

Why does the SMON process periodically consume 100% CPU?

Why does the SMON process periodically consume 100% CPU? At that moment I see a lot of DML like insert, update on smon_scn_time, wri$ tables, etc. There are no user processes. I'm using ORACLE on HP-UX 11.11. Please give me some tips to solve this problem?

This can occur if the SMON process is having to clean up a large number of temporary extents or to coalesce a large number of free extents in your tablespaces.

To find the number of temporary extents, run the following query.

select tablespace_name, segment_name, segment_type, sum(bytes),
from dba_extents
where segment_type = 'TEMPORARY'
group by tablespace_name, segment_name, segment_type;

To check to see if SMON is spending time coalescing free space in your tablespaces run the following query several times.

  Select count(*) from DBA_FREE_SPACE

If the count is going down, then that will indicate that SMON is definitely cleaning up free space.

How long has this been occurring and when does it occur? Does it occur when trying to start the database? Did something change? If this just started, you will need to identify if something recently changed in the application or database. Are your tablespaces dictionary managed or locally managed tablespaces? Is the application creating temporary work tables and then dropping them, or are tables being truncated? If you are using dictionary managed tablespaces, this will cause SMON to spend extra time cleaning up the free extends from dropping or truncating tables. To prevent this switch to locally managed tablespaces.

For more information refer to Metalink document 61997.1.

Dig Deeper on Oracle database performance problems and tuning