eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« 内核分析:使用 oradebug 转储 library_cache 内存信息 | Blog首页 | Shared Pool 中 ges resource dynamic 和 ges enqueues 超高诊断 »

SMCO 进程:空间管理调度进程-Space Management Coordinator
modb.pro

在『云和恩墨大讲堂』微信群中,有朋友提出了一个问题,SMCO 进程是做什么用的,SMON 启动 SMCO 失败会有什么影响?

具体可以参考下图的日志信息:

SMCO02.png

SMCO 进程是 空间管理调度进程 - Space Management Coordinator,在Oracle 11g 版本中引入。显然这不是一个核心进程,其启动失败不影响数据库的关键运行工作,可以通过参数设置禁用和启用,来重启该进程。

MOS 如下文档详细说明了这个进程的作用:

SMCO (Space Management Coordinator) For Autoextend On Datafiles And How To Disable/Enable (文档 ID 743773.1)

What is the function of SMCO background process

SMCO coordinates the following space management tasks. It performs proactive space allocation and space reclamation. It dynamically spawns slave processes (Wnnn) to implement the task.

SMCO 协调以下空间管理任务。 它执行主动空间分配和空间回收。 它动态生成从属进程(Wnnn)来实现任务。

  • 表空间级别的空间预分配 - Tablespace-level space (Extent) pre-allocation.

    Pre-allocation here refers to datafile extention, Datafile extension happens when a space request (extent allocation) operation generally triggered via Insert / loading to a segment does not find contiguous space in the tablespace, the session will extend the file by the next increment set for the datafile and will continue with the space request or Extent allocation.

    这里的预分配是指数据文件扩展,当通常通过插入/加载到段时触发的空间请求(扩展区分配)操作在表空间中找不到连续空间时会发生数据文件扩展,会话将按照 increment 设置扩展文件,同时将继续使用空间请求或Extent分配。

    For SMCO to autoextend a datafile, the AUTOEXTEND should be set to ON for the datafile. SMCO decides to expand the tablespace based on history, extension is split evenly across all datafiles in the tablespace which have not reached their maxsize and are still limited to 10% of the full tablespace size in one hourly SMCO wakeup.
    (Full tablespace size = Sum of datafile sizes at any given instance of time.)
  • 要使SMCO自动扩展数据文件,应将数据文件的AUTOEXTEND设置为ON。 SMCO决定根据历史记录扩展表空间,扩展在表空间中的所有数据文件中均匀分配,这些数据文件尚未达到其maxsize,并且在每小时SMCO唤醒时,扩展空间限制为完整表空间大小的10%。(完整表空间大小=任何给定时刻的数据文件大小总和。)

Apart from the above mentioned task, the SMCO process is also responsible for performing the following tasks.

  • updating block and extents counts in SEG$ for locally managed tablespaces after adding an extent (from unpublished Bug 12940620)
  • Securefile lob segment pre-extension.
  • Securefile lob segment in-memory dispenser space pre-allocation.
  • Securefile lob segment space reclamation (moving free chunks from uncommitted free space area to committed free space area).
  • Temporary segment space reclamation.


The main advantage is that sessions need not wait for reactive space allocation/deallocation operations as this is proactively done, and hence a gain in performance.


How to disable and enable the SMCO background process

The feature provided by the SMCO process is called "Tablespace-level space (Extent) pre-allocation."

It can be turned off by setting "_enable_space_preallocation"=0 as below:

ALTER SYSTEM SET "_ENABLE_SPACE_PREALLOCATION" = 0;



The feature can be turned on again any time by setting "_enable_space_preallocation"=3 which is the default value:

ALTER SYSTEM SET "_ENABLE_SPACE_PREALLOCATION" = 3;


The parameter is dynamic and the scope is ALTER SYSTEM.

NOTE:
Please use the double quotes as indicated to prevent an ORA-911 because of the leading '_'


Following is other possible settings:

* 0 to turn off the tbs pre-extension feature.
* 1 To enable tablespace extension.
* 2 To enable segment growth.
* 4 To enable chunk allocation.

以上摘自 MOS 内容,仅供参考。


历史上的今天...
    >> 2011-08-01文章:
    >> 2007-08-01文章:
           上海OOW上偶遇Rich Niemiec
           万恶的东方航空公司续
    >> 2006-08-01文章:
    >> 2005-08-01文章:

By eygle on 2018-08-01 15:54 | Comments (0) | FAQ | 3293 |


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com