The Best Oracle 12c New Features. Start Me Up – Using Memory Target, The Buffer Cache & The Result Cache. Invisible Columns (12c) & virtual columns (11g). SGA, PGA, MEMORYTARGET, and Database Smart Flash Cache (cache multiple devices w/o volume manager) Database Smart. If you are using AMM (MEMORYTARGET) or ASMM (SGATARGET) it is possible the buffer cache size will alter, making the cache too small to hold the entire database. Either size the memory parameters appropriately, or better still set the minimum size of the buffer cache by setting the DBCACHSIZE parameter to an appropriately large value. Nov 26, 2017 Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs 1. Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs Zohar Elkayam CTO, Brillix [email protected] www.realdbamagic.com Twitter: @realmgic 2.
- Flash Cache And Auto-tuned Memory_target Free
- Flash Cache And Auto-tuned Memory_target Video
- Flash Cache And Auto-tuned Memory_target Drive
MEMORYTARGET this parameter sets the system-wide usable memory that will be used by the instance for SGA and PGA. MEMORYMAXTARGET this parameter sets the maximum value you can set for MEMORYTARGET parameter. Further details about using those parameters will be discussed in Automatic Memory Management section. Flashcache works by using flash memory, a USB flash drive, SD card, CompactFlash or any kind of portable flash mass storage system as a write-back persistent cache. An internal SSD can also be used for increasing performance.
This section contains the following topics on configuring Database Smart Flash Cache (the flash cache):
See Also:
'Memory Architecture Overview' for a description of the flash cacheWhen to Configure the Flash Cache
Consider adding the flash cache when all of the following are true:
- Your database is running on the Solaris or Oracle Enterprise Linux operating systems. The flash cache is supported on these operating systems only.
- The Buffer Pool Advisory section of your Automatic Workload Repository (AWR) report or STATSPACK report indicates that doubling the size of the buffer cache would be beneficial.
db
file
sequential
read
is a top wait event.- You have spare CPU.
Note:
You cannot share the flash cache among multiple instances.Sizing the Flash Cache
As a general rule, size the flash cache to be between 2 times and 10 times the size of the buffer cache. Any multiplier less than two would not provide any benefit. If you are using automatic shared memory management, make the flash cache between 2 times and 10 times the size of
SGA_TARGET
. Using 80% of the size of SGA_TARGET
instead of the full size would also suffice for this calculation.Tuning Memory for the Flash Cache
For each database block moved from the buffer cache to the flash cache, a small amount of metadata about the block is kept in the buffer cache. For a single instance database, the metadata consumes approximately 100 bytes. For an Oracle Real Application Clusters (Oracle RAC) database, it is closer to 200 bytes. You must therefore take this extra memory requirement into account when adding the flash cache.
- If you are managing memory manually, increase the size of the buffer cache by an amount approximately equal to the number of database blocks that fit into the flash cache multiplied by 100 (or 200 for Oracle RAC).
- If you are using automatic memory management, increase the size of
MEMORY_TARGET
using the algorithm described above. You may first have to increase the size ofMEMORY_MAX_TARGET
. - If you are using automatic shared memory management, increase the size of
SGA_TARGET
.
Note:
You can choose to not increase the buffer cache size to account for the flash cache. In this case, the effective size of the buffer cache is reduced. However, you can offset this loss by using a larger flash cache.Flash Cache Initialization Parameters
Table 6-3 describes the initialization parameters that you use to configure the flash cache.
Table 6-3 Flash Cache Initialization Parameters
Parameter | Description |
---|---|
db_flash_cache_file | Specifies the path and file name for the file to contain the flash cache, in either the operating system file system or an Oracle Automatic Storage Management disk group. If the file does not exist, the database creates it during startup. The file must reside on a flash disk device. If you configure the flash cache on a disk drive (spindle), performance may suffer. The following is an example of a valid value for db_flash_cache_file : |
db_flash_cache_size | Specifies the size of the flash cache. Must be less than or equal to the physical memory size of the flash disk device. Expressed as nG, indicating the number of gigabytes (GB). For example, to specify a 16 GB flash cache, set db_flash_cache_size to 16G. |
You can use
ALTER
SYSTEM
to set db_flash_cache_size
to zero to disable the flash cache. You can also use ALTER
SYSTEM
to set the flash cache back to its original size to reenable it. However, dynamically changing the size of the flash cache is not supported.Flash Cache in an Oracle Real Applications Clusters Environment
You must configure a flash cache on either all or none of the instances in an Oracle Real Application Clusters environment.
Flashcache is a disk cache component for the Linux kernel, initially developed by Facebook since April 2010, and released as open source in 2011. Since January 2013, there is a fork of Flashcache, named EnhanceIO and developed by sTec, Inc.[1]
Flashcache works by using flash memory, a USB flash drive, SD card, CompactFlash or any kind of portable flash mass storage system as a write-back persistent cache. An internal SSD can also be used for increasing performance.
Overview[edit]
Using flash memory (NAND memory devices) for caching allows Linux kernel to service random disk IO with better performance than without the cache. This caching applies to all disk content, not just the page file or system binaries. Flash memory based devices are usually a magnitude faster than spinning HDDs for random IO, but with less advantage or even slower in sequential read/writes. By default, flashcache caches all full blocksize IOs, but can be configured to only cache random IO whilst ignoring sequential IO.[2]
Similar technology exists in Microsoft Windows as ReadyBoost since Windows Vista.
Implementation[edit]
Flashcache is built on top of the Linux kernel's device mapper. The data structure of the cache is a set-associativehash table, in which the cache is divided up into a number of fixed-size sets (buckets), using linear probing within a set to find blocks. The device mapper layer breaks up all I/O requests into blocksize chunks before passing the requests to the cache layer.[citation needed]
When a write request happens, the corresponding cache block is marked dirty; dirty cache blocks are written lazily to disk in the background. There are a few parameters to control the write-back policy: dirty-threshold, idleness and contiguity with other dirty blocks about to be written back.[citation needed]
Limitations[edit]
There are a few limitations, imposed by the implementation of flashcache:[citation needed]
- Atomicity
- Cache block writes are currently non-atomic.
- TRIM support
- ATA TRIM command to optimize flash memory are not yet supported.
- Cache pollution protection
- A process can be marked non-cacheable to prevent flashcache cache its requests; however, if a process that marked itself non-cacheable dies, flashcache has no way of cleaning up.
- Alignment
- Relying on the device mapper resulted in caching performance issues and no caching of writes that are not multiple of 4 KiB. Primarily, this affects the Xen hypervisor. Thus, EnhanceIO has moved away from the device mapper integration, yielding higher performance for unoptimal use cases.[citation needed]
- Write-around read latency impact
- in write-around mode all writes bypass the cache for high consistency. The current implementation will fetch reads through the SSD device and then deliver them to the actual reader. This means that previously uncached blocks will always need to go to the SSD device first, causing a constant write IO. Not an issue on enterprise SSD or highend PCIe devices as facebook uses, but degrades performance on lower end SSD.
- Write-around read cache warm-up phase
- in write-around mode FlashCache has no information to compare the age of cached pages over the on-disk ones. (1) Because the device could have been mounted outside of FlashCache (2) Because no writes are tracked in this mode. This results in an empty cache after each volume activation (i.e.: reboot). Performance will be degraded until all hot areas have been cached.
Flash Cache And Auto-tuned Memory_target Free
See also[edit]
- Cache Acceleration Software (Intel's product)
References[edit]
- ^EnhanceIO: New Solid State Drive Caching For Linux
- ^Mohan Srinivasan. 'Flashcache : A Write Back Block Cache for Linux'.
Flash Cache And Auto-tuned Memory_target Video
External links[edit]
- Performance Comparison among EnhanceIO, bcache and dm-cache (LKML)
Flash Cache And Auto-tuned Memory_target Drive
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Flashcache&oldid=899496344'