Oracle AWR入门
1.ASH占用的内存大小 ASH的采集信息保存在内存中,在旧的信息被采样到AWR中后,可被新采集的信息覆盖,重启oracle后该信息被清除。分配给ASH的内存大小可以查询到: SQL select pool, name, bytes/1024/1024 From v$sgastat where name like ‘%ASH %’; POO
1.ASH占用的内存大小
ASH的采集信息保存在内存中,在旧的信息被采样到AWR中后,可被新采集的信息覆盖,重启oracle后该信息被清除。分配给ASH的内存大小可以查询到:
SQL> select pool, name, bytes/1024/1024 From v$sgastat where name like ‘%ASH %’;
POOL NAME BYTES/1024/1024
———— ————————– —————
shared pool ASH buffers 4
2.mmon进程与mmnl进程
2.1)快照由一个称为 MMON 的新的后台进程(及其从进程)以及MMNL后台进程自动地每隔固定时间采样一次。我们先来看一下10g的概念指南中对这两个新增加的后台进程的介绍:
MMON进程负责执行多种和管理相关(manageability-related)的后台任务
例如:当某个测量值(metrics)超过了预设的限定值(threshold value)后提交警告,创建新的 MMON 隶属进程(MMON slave process)来进行快照(snapshot),捕获最近修改过的 SQL 对象的统计信息
2.2)MMNL进程负责执行轻量级的且频率较高的和可管理性相关的后台任务
例如:捕获会话历史信息,测量值计算等。
2.3)AWR的采样工作默认是由MMON进程每个1小时执行一次,ASH信息同样会被采样写出到AWR负载库中。虽然ASH buffer被设计为保留1小时的信息,但很多时候这个内存是不够的,当ASH buffer写满后,另外一个后台进程MMNL将会主动将ASH信息写出。
3.SYSAUX表空间
AWR 使用几个表来存储采集的统计数据,所有的表都存储在新的名称为 SYSAUX 的特定表空间中的 SYS 模式下,并且以 WRM$_* 和 WRH$_* 的格式命名。前一种类型存储元数据信息(如检查的数据库和采集的快照),后一种类型保存实际采集的统计数据。H 代表“历史数据 (historical)”而 M 代表“元数据 (metadata)”
使用sql语句: select table_name from dba_tables where table_name like ‘WRM$%’ or table_name like ‘WRH$%’;查询
当SYSAUX表空间满后,AWR将自动覆盖掉旧的信息,并在警告日志中记录一条相关信息:
ORA-1688: unable to extend table SYS.WRH$_ACTIVE_SESSION_HISTORY partition WRH$_ACTIVE_3533490838_1522 by 128 in tablespace SYSAUX
4.采样频率和保留时间
可以通过查询视图dba_hist_wr_control或(wrm$_wr_control)来查询AWR的采样频率和保留时间。默认为每1小时采样一次,采样信息保留时间为(7/10g|8/11g)天。
SQL> select * from dba_hist_wr_control;
DBID SNAP_INTERVAL RETENTION TOPNSQL
———- ——————– ——————– ———-
3393548168 +00000 00:30:00.0 +00010 00:00:00.0 DEFAULT
或者
SQL> select DBID, SNAP_INTERVAL, SNAPINT_NUM, RETENTION from wrm$_wr_control;
DBID SNAP_INTERVAL SNAPINT_NUM RETENTION
———- ——————– ———– ——————–
3393548168 +00000 00:30:00.0 1800 +00010 00:00:00.0
修改采集频率和保存时间: exec dbms_workload_repository.modify_snapshot_settings(interval=>30, retention=>5*24*60);
Note:输入的retention参数值不能被目前库中保存的数据的范围小(如果要减少保存时间,需要先删除历史数据)
5.采样数据量
由于数据量巨大,把所有ASH数据写到磁盘上是不可接受的。一般是在写到磁盘的时候过滤这个数据,写出的数据占采样数据的10%,写出时通过direct-path insert完成,尽量减少日志生成,从而最小化数据库性能的影响。
6.初始化参数statistics_level
AWR的行为受到参数STATISTICS_LEVEL的影响。这个参数有三个值:
BASIC:awr统计的计算和衍生值关闭.只收集少量的数据库统计信息.
TYPICAL:默认值.只有部分的统计收集.他们代表需要的典型监控oracle数据库的行为.
ALL : 所有可能的统计都被捕捉. 并且有操作系统的一些信息.这个级别的捕捉应该在很少的情况下,比如你要更多的sql诊断信息的时候才使用.
7.快照管理
7.1)执行
exec dbms_workload_repository.create_snapshot();
7.2)查询
select * from wrh$_active_session_history
7.3)删除
exec dbms_workload_repository.drop_snapshot_range(low_snap_id => 90, high_snap_id => 96, dbid => 1160732652);
8. 基线管理
8.1)创建baseline,保存这些数据用于将来分析和比较
exec dbms_workload_repository.create_baseline(start_snap_id => 1003, end_snap_id => 1013, ‘apply_interest_1′);
8.2)删除baseline
exec DBMS_WORKLOAD_REPOSITORY.DROP_BASELINE(baseline_name => ‘apply_interest_1′, cascade => FALSE);

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

For mechanical hard drives or SATA solid-state drives, you will feel the increase in software running speed. If it is an NVME hard drive, you may not feel it. 1. Import the registry into the desktop and create a new text document, copy and paste the following content, save it as 1.reg, then right-click to merge and restart the computer. WindowsRegistryEditorVersion5.00[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\MemoryManagement]"DisablePagingExecutive"=d

Kimi: In just one sentence, in just ten seconds, a PPT will be ready. PPT is so annoying! To hold a meeting, you need to have a PPT; to write a weekly report, you need to have a PPT; to make an investment, you need to show a PPT; even when you accuse someone of cheating, you have to send a PPT. College is more like studying a PPT major. You watch PPT in class and do PPT after class. Perhaps, when Dennis Austin invented PPT 37 years ago, he did not expect that one day PPT would become so widespread. Talking about our hard experience of making PPT brings tears to our eyes. "It took three months to make a PPT of more than 20 pages, and I revised it dozens of times. I felt like vomiting when I saw the PPT." "At my peak, I did five PPTs a day, and even my breathing was PPT." If you have an impromptu meeting, you should do it

In the early morning of June 20th, Beijing time, CVPR2024, the top international computer vision conference held in Seattle, officially announced the best paper and other awards. This year, a total of 10 papers won awards, including 2 best papers and 2 best student papers. In addition, there were 2 best paper nominations and 4 best student paper nominations. The top conference in the field of computer vision (CV) is CVPR, which attracts a large number of research institutions and universities every year. According to statistics, a total of 11,532 papers were submitted this year, and 2,719 were accepted, with an acceptance rate of 23.6%. According to Georgia Institute of Technology’s statistical analysis of CVPR2024 data, from the perspective of research topics, the largest number of papers is image and video synthesis and generation (Imageandvideosyn

According to news from this website on September 3, Korean media etnews reported yesterday (local time) that Samsung Electronics and SK Hynix’s “HBM-like” stacked structure mobile memory products will be commercialized after 2026. Sources said that the two Korean memory giants regard stacked mobile memory as an important source of future revenue and plan to expand "HBM-like memory" to smartphones, tablets and laptops to provide power for end-side AI. According to previous reports on this site, Samsung Electronics’ product is called LPWide I/O memory, and SK Hynix calls this technology VFO. The two companies have used roughly the same technical route, which is to combine fan-out packaging and vertical channels. Samsung Electronics’ LPWide I/O memory has a bit width of 512

We know that LLM is trained on large-scale computer clusters using massive data. This site has introduced many methods and technologies used to assist and improve the LLM training process. Today, what we want to share is an article that goes deep into the underlying technology and introduces how to turn a bunch of "bare metals" without even an operating system into a computer cluster for training LLM. This article comes from Imbue, an AI startup that strives to achieve general intelligence by understanding how machines think. Of course, turning a bunch of "bare metal" without an operating system into a computer cluster for training LLM is not an easy process, full of exploration and trial and error, but Imbue finally successfully trained an LLM with 70 billion parameters. and in the process accumulate

According to news from this site on June 7, GEIL launched its latest DDR5 solution at the 2024 Taipei International Computer Show, and provided SO-DIMM, CUDIMM, CSODIMM, CAMM2 and LPCAMM2 versions to choose from. ▲Picture source: Wccftech As shown in the picture, the CAMM2/LPCAMM2 memory exhibited by Jinbang adopts a very compact design, can provide a maximum capacity of 128GB, and a speed of up to 8533MT/s. Some of these products can even be stable on the AMDAM5 platform Overclocked to 9000MT/s without any auxiliary cooling. According to reports, Jinbang’s 2024 Polaris RGBDDR5 series memory can provide up to 8400

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

Editor of the Machine Power Report: Yang Wen The wave of artificial intelligence represented by large models and AIGC has been quietly changing the way we live and work, but most people still don’t know how to use it. Therefore, we have launched the "AI in Use" column to introduce in detail how to use AI through intuitive, interesting and concise artificial intelligence use cases and stimulate everyone's thinking. We also welcome readers to submit innovative, hands-on use cases. Video link: https://mp.weixin.qq.com/s/2hX_i7li3RqdE4u016yGhQ Recently, the life vlog of a girl living alone became popular on Xiaohongshu. An illustration-style animation, coupled with a few healing words, can be easily picked up in just a few days.
