Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle11gR2 Smart Flash Cache test description

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Flash Cache function introduction

In oracle11gR2, Oracle provides the function of setting up FLASH CACHE, which allows the use of SSD hard disk as the secondary cache of Buffer Cache to increase a level of buffering between disk and memory and improve data access performance. This feature is actually introduced by EXADATA, which is another tool for EXADATA to improve the performance of IO. However, even if it is not EXADATA, this feature can be set up in 11.2, provided that the operating system must be oracle enterprise linux (OEL for short) or solaris, which means that only Oracle's own operating system is supported.

The function of Flash Cache will only improve the performance of disk reading, because Dirty blocks will still be written directly to disk rather than in SSD, and how it works can be well understood by the following figure

1. First of all, when a read request occurs, the disk data is read to buffer

two。 When the writing work is completed, the Dirty blocks will be written directly to disk.

3. Write the data removed from SGA through LRU to flash cache, and the next time there is a read request, it will write to memory through flash cache.

2. Oracle version and patches

Oracle's smart flash cache feature can be used after the DB software is patched with flash memory on the OEL platform (not required on solaris). The details are as follows:

OS

Oracle

Patch

Whether it is normal or not

Remarks

OEL6.4

11.2.0.1

P8974084

Yes

11.2.0.3

P12949806

Yes

11.2.0.4

None

Yes

OEL7

11.2.0.1

P8974084

ORA-00439: feature not enabled: Server Flash Cache

Internal bug, no patch for now

11.2.0.3

P12949806

ORA-00439: feature not enabled: Server Flash Cache

Internal bug, no patch for now

11.2.0.4

None

ORA-00439: feature not enabled: Server Flash Cache

Internal bug, no patch for now

3. Modify Flash Cache parameters

Two parameters (db_flash_cache_file and db_flash_cache_size) need to be modified to enable Flash Cache, and reboot is required to take effect. There are three supported methods, including file system, bare device and ASM.

SQL > show parameter flash_cache

NAME TYPE VALUE

Db_flash_cache_file string

Db_flash_cache_size big integer 0

The size of db_flash_cache_file generally recommends 2-10 times buffer cache (not less than 2 times). If you use ASMM, 2-10 times SGA_TARGET, you can achieve the effect; if you set db_flash_cache_size to 0, you can disable flash cache, and then set it back to enable. However, the value of db_flash_cache_size is not allowed to be changed dynamically; for the environment of RAC, the above two parameters need to be set on top of each instance, and the same file cannot be used.

Modification method

1. File system

SQL > alter system set db_flash_cache_file='/testfs/cache.dbf' scope=spfile

SQL > alter system set db_flash_cache_size=8192M scope=spfile

two。 Bare equipment

SQL > alter system set db_flash_cache_file='/dev/raw/raw1' scope=spfile

SQL > alter system set db_flash_cache_size=8192M scope=spfile

3.ASM

SQL > alter system set db_flash_cache_file='+ASM/DB/cache.dbf 'scope=spfile

SQL > alter system set db_flash_cache_size=8192M scope=spfile

4. View flash cache usage

Determine whether flash cache is in use by the following SQL

SELECT SUM (CASE WHEN b.status LIKE 'flash%' THEN 1 END) flash_blocks, SUM (CASE WHEN b.status LIKE' flash%' THEN 0 else 1 END) cache_blocks,count (*) total_blocks FROM v$bh b

Select name,value from v$sysstat where name in ('physical read flash cache hits','physical reads','consistent gets','db block gets','flash cache insert')

5. Conclusion

Although the Oracle smart flash cache function can greatly improve the efficiency, but at present, the maturity of the flash cache function is not ideal. At present, we encounter a lot of bug in the configuration (only part of this article is listed in this article). It is still unknown whether there is any bug in the later use, but the SSD hard disk does improve the performance of the disk.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report