oracle 12cR2 smart flash cache实测
最近一直在处理新系统的性能优化问题,这两天特地测试了下oracle 11gR2开始引入的smart flash cache。
其介绍参考MOS文档,How To Size the Database Smart Flash Cache (文档 ID 1317950.1)
The Database Smart Flash Cache is a new feature in Oracle Database 11g Release 2 (11.2). The Database Smart Flash Cache is a transparent extension of the database buffer cache using solid state device (SSD) technology. The SSD acts as a Level 2 cache to the (Level 1) SGA.Database Smart Flash Cache can greatly improve the performance of Oracle databases by reducing the amount of disk I/O at a much lower cost than adding an equivalent amount of RAM.Your database is running on the Solaris or Oracle Linux operating systems. The flash cache is supported on these operating systems only.SQL> startup;ORA-00439: feature not enabled: Server Flash Cache这明显就是Oracle设置的障碍。
[oracle@oel-12c ~]$ sqlplus "/as sysdba" SQL*Plus: Release 12.2.0.1.0 Production on 星期五 9月 7 20:13:00 2018 Copyright (c) 1982, 2016, Oracle. All rights reserved. 连接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> create tablespace my_ts_2 datafile '/u01/app/oracle/oradata/nfs_to_14/my_ts02.dbf' size 1g autoextend on next 10m maxsize unlimited; 表空间已创建。 SQL> create table my_big_table as select * from dba_tables; 表已创建。 SQL> alter table my_big_table move tablespace my_ts_2; --移动到NFS存储上 表已更改。 SQL> insert into my_big_table select * from my_big_table; 已创建 2106 行。 SQL> / 已创建 4212 行。 SQL> / 已创建 8424 行。 SQL> / 已创建 16848 行。 SQL> / 已创建 33696 行。 SQL> / 已创建 67392 行。 SQL> commit; 提交完成。 SQL> / 提交完成。 SQL> insert into my_big_table select * from my_big_table; 已创建 134784 行。 SQL> / 已创建 269568 行。 SQL> commit; 提交完成。 SQL> insert into my_big_table select * from my_big_table; 已创建 539136 行。 SQL> commit;
使用智能闪存:
SQL> set autotrace on;
SQL> select count(1) from my_big_table; COUNT(1)
----------
1078272 已用时间: 00: 00: 33.06 执行计划
----------------------------------------------------------
Plan hash value: 1307946652 ---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 12973 (1)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | TABLE ACCESS FULL| MY_BIG_TABLE | 969K| 12973 (1)| 00:00:01 |
--------------------------------------------------------------------------- Note
-----
- dynamic statistics used: dynamic sampling (level=2) 统计信息
----------------------------------------------------------
124 recursive calls
0 db block gets
47210 consistent gets
47193 physical reads
132 redo size
546 bytes sent via SQL*Net to client
607 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
3 sorts (memory)
0 sorts (disk)
1 rows processed SQL> / COUNT(1)
----------
1078272 已用时间: 00: 00: 03.00 执行计划
----------------------------------------------------------
Plan hash value: 1307946652 ---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 12973 (1)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | TABLE ACCESS FULL| MY_BIG_TABLE | 969K| 12973 (1)| 00:00:01 |
--------------------------------------------------------------------------- Note
-----
- dynamic statistics used: dynamic sampling (level=2) 统计信息
----------------------------------------------------------
0 recursive calls
0 db block gets
47094 consistent gets
47006 physical reads
0 redo size
546 bytes sent via SQL*Net to client
607 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed SQL> / COUNT(1)
----------
1078272 已用时间: 00: 00: 04.54 执行计划
----------------------------------------------------------
Plan hash value: 1307946652 ---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 12973 (1)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | TABLE ACCESS FULL| MY_BIG_TABLE | 969K| 12973 (1)| 00:00:01 |
--------------------------------------------------------------------------- Note
-----
- dynamic statistics used: dynamic sampling (level=2) 统计信息
----------------------------------------------------------
0 recursive calls
0 db block gets
47094 consistent gets
47020 physical reads
0 redo size
546 bytes sent via SQL*Net to client
607 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed SQL> / COUNT(1)
----------
1078272 已用时间: 00: 00: 02.24
不使用智能闪存:
SQL> alter system set db_flash_cache_size=0 ; 系统已更改。 已用时间: 00: 00: 01.01
SQL> select count(1) from my_big_table; COUNT(1)
----------
1078272 已用时间: 00: 00: 30.75 执行计划
----------------------------------------------------------
Plan hash value: 1307946652 ---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 12973 (1)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | TABLE ACCESS FULL| MY_BIG_TABLE | 969K| 12973 (1)| 00:00:01 |
--------------------------------------------------------------------------- Note
-----
- dynamic statistics used: dynamic sampling (level=2) 统计信息
----------------------------------------------------------
0 recursive calls
0 db block gets
47094 consistent gets
47020 physical reads
0 redo size
546 bytes sent via SQL*Net to client
607 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed SQL> / COUNT(1)
----------
1078272 已用时间: 00: 00: 32.20 执行计划
----------------------------------------------------------
Plan hash value: 1307946652 ---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 12973 (1)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | TABLE ACCESS FULL| MY_BIG_TABLE | 969K| 12973 (1)| 00:00:01 |
--------------------------------------------------------------------------- Note
-----
- dynamic statistics used: dynamic sampling (level=2) 统计信息
----------------------------------------------------------
0 recursive calls
0 db block gets
47094 consistent gets
47020 physical reads
0 redo size
546 bytes sent via SQL*Net to client
607 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed SQL> / COUNT(1)
----------
1078272 已用时间: 00: 00: 17.56 执行计划
----------------------------------------------------------
Plan hash value: 1307946652 ---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 12973 (1)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | TABLE ACCESS FULL| MY_BIG_TABLE | 969K| 12973 (1)| 00:00:01 |
--------------------------------------------------------------------------- Note
-----
- dynamic statistics used: dynamic sampling (level=2) 统计信息
----------------------------------------------------------
0 recursive calls
0 db block gets
47094 consistent gets
47019 physical reads
0 redo size
546 bytes sent via SQL*Net to client
607 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed SQL> / COUNT(1)
----------
1078272 已用时间: 00: 00: 15.11 执行计划
----------------------------------------------------------
Plan hash value: 1307946652 ---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 12973 (1)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | TABLE ACCESS FULL| MY_BIG_TABLE | 969K| 12973 (1)| 00:00:01 |
--------------------------------------------------------------------------- Note
-----
- dynamic statistics used: dynamic sampling (level=2) 统计信息
----------------------------------------------------------
0 recursive calls
0 db block gets
47094 consistent gets
47019 physical reads
0 redo size
546 bytes sent via SQL*Net to client
607 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed SQL> / COUNT(1)
----------
1078272 已用时间: 00: 00: 15.69
如上所述,性能相差了6-7倍。可见智能闪存效果还是不错的。
不过需要注意的是,如果95%+的常用数据都已经在iops足够高的磁盘上了比如SSD,这个时候又拿一部分SSD作为智能缓存,性能反而会下降比直接访问磁盘高达1倍。
在oracle 11g中,闪存文件只能配置1个,在12c中没有这个限制了。
oracle 12cR2 smart flash cache实测的更多相关文章
- Exadata Smart Flash Logging工作原理
Exadata在V2时代,ORACLE为了进一步拓宽客户人群,除了宣称Exadata适用OLAP系统,同时也适用于OLTP系统,那怎么才能满足OLTP系统的高IOPS要求呢?于是Exadata引入了闪 ...
- [转帖]Oracle 12cR2使用经验
大规模升级来临,谈谈Oracle 12cR2使用经验 随着2019年2月13日,Oracle 19c (Oracle 12.2.0.3) for Exadata 版本发布,Oracle 12cR2体系 ...
- oracle 11g 之 result cache
oracle 11g 之 result cache 今天是2013-10-12,打算最近时间研究一下shared pool的相关原理以及awr报告分析.今天学习一下在oracle 11g shared ...
- Linux平台 Oracle 12cR2 RAC安装Part1:准备工作
Linux平台 Oracle 12cR2 RAC安装Part1:准备工作 一.实施前期准备工作 1.1 服务器安装操作系统 1.2 Oracle安装介质 1.3 共享存储规划 1.4 网络规范分配 二 ...
- Linux平台 Oracle 12cR2 RAC安装Part2:GI配置
Linux平台 Oracle 12cR2 RAC安装Part2:GI配置 三.GI(Grid Infrastructure)安装 3.1 解压GI的安装包 3.2 安装配置Xmanager软件 3.3 ...
- Linux平台 Oracle 12cR2 RAC安装Part3:DB安装
Linux平台 Oracle 12cR2 RAC安装Part3:DB安装 四.DB(Database)安装 4.1 解压DB的安装包 4.2 DB软件安装 4.3 ASMCA创建磁盘组 4.4 DBC ...
- ORACLE性能优化- Buffer cache 的调整与优化
Buffer Cache是SGA的重要组成部分,主要用于缓存数据块,其大小也直接影响系统的性能.当Buffer Cache过小的时候,将会造成更多的 free buffer waits事件. 下面将具 ...
- Oracle 12CR2 中alert.log出现大量的 WARNING: too many parse errors 告警
Oracle 12CR2 中alert.log出现大量的 WARNING: too many parse errors 告警 日志如下: 2018-06-24T17:16:21.024586+08 ...
- Oracle数据库大量library cache: mutex X及latch: shared pool问题排查一例
业务系统数据库夯住,数据库内大量的library cache: mutex X及latch: shared pool等待,alert日志信息如下 Tue Sep :: WARNING: inbound ...
随机推荐
- 超全PHP学习资源整理:入门到进阶系列
PHP是少数几门在语言层面饱受诟病,但在实际开发和应用上却又让人无法撒手的语言之一.就好比路边摊小吃,一遍骂人家不卫生,一遍却又说:真香.所谓接地气,不外如此,大道理不说,PHP光是轮子多.市场占有率 ...
- TextCNN
一.什么是TextCNN? 将卷积神经网络CNN应用到文本分类任务,利用多个不同size的kernel来提取句子中的关键信息(类似于多窗口大小的ngram),从而能够更好地捕捉局部相关性. 二.Tex ...
- java开发前的配置
JAVA语言是1995年由Sun公司退出的一门高级编程语言,在2009年4月20被ORACLE公司收购 看看java体系图
- ASP.Net Core 2.2 MVC入门到基本使用系列 (二)(转)
本教程会对基本的.Net Core 进行一个大概的且不会太深入的讲解, 在您看完本系列之后, 能基本甚至熟练的使用.Net Core进行Web开发, 感受到.Net Core的魅力. 本教程知识点大体 ...
- php 下载完成后删除文件
最近遇到一个需求:下载用户上传的图片,但是图片不断更新. 1.需要将图片从图片服务器下载到网站后台服务器 2.压缩文件夹生成zip压缩包 3.下载压缩包 4.删除压缩包和临时文件夹 其中遇到了一个问题 ...
- 提高Linux运维效率的30个命令行常用快捷键
提高Linux运维效率的30个命令行常用快捷键 表4-1 30个常用快捷键 快捷键 功能说明 最有用快捷键 tab 命令或路径等的补全键,Linux最有用快捷键* 移动光标快捷键 Ctrl+a 光标 ...
- 通过改hosts访问wikipedia
能访问https://www.wikipedia.org 大部分时候我们是可以访问的wikipedia的主页或是英文首页的,但中文页面却经常被墙,这时候你可以通过在命令行下ping www.wikip ...
- Python全栈-day2-day3-语法基础1
1.什么是变量,为什么需要变量 变量即变化的量,衡量现实中实物的状态:程序执行的本质就是一系列的状态变化,变是程序本身执行的直接体现,因此程序的执行需要这种机制将执行状态以及状态的变化保存下来. 1) ...
- 利用JavaCSV API来读写csv文件
http://blog.csdn.net/loongshawn/article/details/53423121 http://javacsv.sourceforge.net/ 转载请注明来源-作者@ ...
- hdu5293 lca+dp+树状数组+时间戳
题意是给了 n 个点的树,会有m条链条 链接两个点,计算出他们没有公共点的最大价值, 公共点时这样计算的只要在他们 lca 这条链上有公共点的就说明他们相交 dp[i]为这个点包含的子树所能得到的最 ...