After a Successful Hit if a Particular Cache Block Is Called Again Is Becomes a Technical Cache
A brief groundwork on RAM cache or in-retention OLTP dispatch
In this mail service I will present a feature — to simplify let's telephone call information technology RAM enshroud — introduced in Oracle Exadata Storage Server paradigm 18.1. You've probably heard a lot about the new Oracle Exadata X8M and its Intel Optane DC Persistent Memory (PMem). This new feature + compages allows the database processes running on the database servers to remotely read and write through a protocol chosen Remote Direct Retentiveness Access (RDMA) from / to the PMem cards in the storage servers. You can find the detailed Oracle Exadata X8M deployment process hither.
Information technology's true that RDMA has existed in the Oracle Exadata compages from the commencement, equally Oracle points out in their web log post titled, Introducing Exadata X8M: In-Memory Operation with All the Benefits of Shared Storage for both OLTP and Analytics:
RDMA was introduced to Exadata with InfiniBand and is a foundational part of Exadata'south high-performance architecture.
What you may non know, is there's a feature called in-memory OLTP acceleration (or merely RAM enshroud) which was introduced in the Oracle Exadata Storage Server image 18.1.0.0.0 when Oracle Exadata X7 was released. This characteristic allows read admission to the storage server RAM on any Oracle Exadata system (X6 or higher) running that version or above. Although, this is not the aforementioned as PMem, since RAM is not persistent, it is still very cool since information technology allows you lot to take advantage of the RAM available in the storage servers.
Modern generations of Exadata storage servers come up with a lot of RAM available. By comparison, X8 and X7 come up with 192GB of RAM by default, every bit opposed to the 128GB of RAM that came with X6.
Unfortunately, the RAM enshroud feature is only bachelor on storage servers X6 or higher and these are the requirements:
- Oracle Exadata System Software 18c (18.1.0).
- Oracle Exadata Storage Server X6, X7 or X8.
- Oracle Database version 12.two.0.1 April 2018 DBRU, or eighteen.1 or higher.
That large amount of RAM is rarely fully utilized by the Oracle Exadata storage servers. This RAM cache feature allows y'all to employ all or part of the available RAM in the storage servers. Doing this extends your database buffer enshroud to the storage server'southward RAM for read operations.
In the new Oracle Exadata X8M the I/O latency is nether 19µs for read operations. This is due to the PMem cache combined with the RoCE (RDMA over converged ethernet) network. In the Oracle Exadata X7/X8 the I/O latency for reads with RAM enshroud using RDMA over InfiniBand is effectually 100µs. Without RAM cache the number goes up to 250µs reading direct from the flash enshroud. The following information is from the Oracle Exadata Database Auto X8-2 information sheet:
For OLTP workloads Exadata uniquely implements In-Memory OLTP Acceleration. This feature utilizes the memory installed in Exadata Storage Servers every bit an extension of the memory cache (buffer cache) on database servers. Specialized algorithms transfer information between the cache on database servers and in-memory enshroud on storage servers. This reduces the IO latency to 100 united states for all IOs served from in-retentivity enshroud. Exadata'southward (sic) uniquely keeps only i in-retentiveness copy of data across database and storage servers, avoiding memory wastage from caching the same cake multiple times. This greatly improves both efficiency and capacity and is only possible because of Exadata's unique finish-to-terminate integration.
How I ready RAM cache in the Exadata storage servers
As I mentioned previously, the recent generation of Oracle Exadata storage servers come with a lot of RAM. This RAM is normally not used at its fullest by the cellsrv services and features. Having said that, I unremarkably take into consideration the amount of free retention (RAM) in the storage servers. First, I pick the storage server using the most RAM and practise the math: freemem*0.vii=RAM cache value. Next, I gear up the RAM cache to 70 percent of the free memory of the storage server using more than RAM than the others. Annotation: I avoid using all the free memory for the RAM cache in case the storage server requires more memory for storage indexes or other needs in the time to come.
Let's say my busiest storage server has 73GB of free memory. Applying the formula we get to: 73*0.seven=51.1GB.
Oracle Exadata architecture was built to spread the workload evenly across the entire storage grid, so you'll find that the storage servers use pretty much the same amount of retentivity (RAM).
Here comes the action and fun. We must first check how much retentiveness is bachelor in our storage servers by running this from dcli (brand sure your cell_group file is upwardly-to-date):
[[electronic mail protected] ~]# dcli -50 root -g cell_group gratuitous -thousand
In my instance the cel01 is the storage server using more than memory than others. Permit'south cheque some details of this storage server:
[[e-mail protected] ~]# cellcli CellCLI: Release 19.2.seven.0.0 - Production on Thu Aug 06 07:44:59 CDT 2020 Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. CellCLI> LIST Prison cell Item proper noun: exaceladm01 accessLevelPerm: remoteLoginEnabled bbuStatus: normal cellVersion: OSS_19.2.seven.0.0_LINUX.X64_191012 cpuCount: 24/24 diagHistoryDays: 7 fanCount: 8/8 fanStatus: normal flashCacheMode: WriteBack flashCacheCompress: Fake httpsAccess: ALL id: 1446NM508U interconnectCount: 2 interconnect1: bondib0 iormBoost: 0.0 ipaddress1: 192.168.10.13/22 kernelVersion: 4.1.12-124.thirty.1.el7uek.x86_64 locatorLEDStatus: off makeModel: Oracle Corporation Sunday SERVER X7-2L High Chapters memoryGB: 94 metricHistoryDays: 7 notificationMethod: mail,snmp notificationPolicy: critical,alert,articulate offloadGroupEvents: powerCount: 2/2 powerStatus: normal ramCacheMaxSize: 0 ramCacheMode: Auto ramCacheSize: 0 releaseImageStatus: success releaseVersion: nineteen.2.vii.0.0.191012 rpmVersion: cell-nineteen.2.7.0.0_LINUX.X64_191012-1.x86_64 releaseTrackingBug: 30393131 rollbackVersion: xix.2.2.0.0.190513.two smtpFrom: "exadb Exadata" smtpFromAddr: [electronic mail protected] smtpPort: 25 smtpServer: mail.loredata.com.br smtpToAddr: [email protected] smtpUseSSL: False snmpSubscriber: host=10.200.55.182,port=162,community=public,type=asr,asrmPort=16161 status: online temperatureReading: 23.0 temperatureStatus: normal upTime: 264 days, 8:48 usbStatus: normal cellsrvStatus: running msStatus: running rsStatus: running
From the output above we can encounter that the parameter ramCacheMode is set to motorcar while ramCacheMaxSize and ramCacheSize are 0. These are the default values and hateful the RAM cache feature is not enabled.
This storage server has ~73GB of free / available memory (RAM):
[[email protected] ~]# free -m total used complimentary shared vitrify/enshroud available Mem: 96177 15521 72027 4796 8628 75326 Swap: 2047 0 2047
Now nosotros tin can enable the RAM cache feature past changing the parameter ramCacheMode to "On":
CellCLI> Modify CELL ramCacheMode=on Cell exaceladm01 successfully altered
Immediately after the modify we check the free / available memory (RAM) in the storage server operation organization:
[[email protected] ~]# free -m total used free shared vitrify/enshroud available Mem: 96177 15525 72059 4796 8592 75322 Swap: 2047 0 2047
Not much has changed, because the retentiveness remains available for the storage server to use for RAM enshroud. Still, when we enable the RAM cache feature, the storage server will not automatically classify / use this memory.
We can come across that only 10GB was divers in the ramCacheMaxSize and ramCacheSize parameters:
CellCLI> LIST Jail cell Particular name: exaceladm01 accessLevelPerm: remoteLoginEnabled bbuStatus: normal cellVersion: OSS_19.2.vii.0.0_LINUX.X64_191012 cpuCount: 24/24 diagHistoryDays: seven fanCount: viii/8 fanStatus: normal flashCacheMode: WriteBack flashCacheCompress: FALSE httpsAccess: ALL id: 1446NM508U interconnectCount: 2 interconnect1: bondib0 iormBoost: 0.0 ipaddress1: 192.168.10.13/22 kernelVersion: four.ane.12-124.30.1.el7uek.x86_64 locatorLEDStatus: off makeModel: Oracle Corporation Dominicus SERVER X7-2L Loftier Capacity memoryGB: 94 metricHistoryDays: 7 notificationMethod: mail,snmp notificationPolicy: critical,warning,clear offloadGroupEvents: powerCount: 2/ii powerStatus: normal ramCacheMaxSize: 10.1015625G ramCacheMode: On ramCacheSize: 10.09375G releaseImageStatus: success releaseVersion: 19.two.vii.0.0.191012 rpmVersion: cell-19.2.7.0.0_LINUX.X64_191012-i.x86_64 releaseTrackingBug: 30393131 rollbackVersion: xix.two.2.0.0.190513.two smtpFrom: "exadb Exadata" smtpFromAddr: [email protected] smtpPort: 25 smtpServer: mail service.loredata.com.br smtpToAddr: [email protected] smtpUseSSL: Simulated snmpSubscriber: host=10.200.55.182,port=162,community=public,type=asr,asrmPort=16161 status: online temperatureReading: 23.0 temperatureStatus: normal upTime: 264 days, 8:49 usbStatus: normal cellsrvStatus: running msStatus: running rsStatus: running
To confirm we tin can run the post-obit query from cellcli:
CellCLI> LIST Prison cell ATTRIBUTES ramCacheMaxSize,ramCacheMode, ramCacheSize 10.1015625G On 10.09375G
To reduce the memory used by the RAM cache characteristic we can simply modify the ramCacheMaxSize parameter:
CellCLI> ALTER Jail cell ramCacheMaxSize=5G; Cell exaceladm01 successfully contradistinct
If nosotros check the values of the RAM enshroud parameters we volition see this:
CellCLI> LIST CELL ATTRIBUTES ramCacheMaxSize,ramCacheMode, ramCacheSize 5G On 0
Every bit presently as the database blocks start beingness copied to the RAM cache we volition come across the ramCacheSize value increasing:
CellCLI> LIST Prison cell ATTRIBUTES ramCacheMaxSize,ramCacheMode, ramCacheSize 5G On 3.9250G
Increasing a bit more:
CellCLI> ALTER CELL ramCacheMaxSize=15G; Cell exaceladm01 successfully altered
When checking, you'll detect it takes a while for the cellsrv to populate the RAM enshroud with blocks copied from the flash cache:
CellCLI> LIST CELL ATTRIBUTES ramCacheMaxSize,ramCacheMode, ramCacheSize 15G On 0 CellCLI> Listing CELL ATTRIBUTES ramCacheMaxSize,ramCacheMode, ramCacheSize 15G On eleven.8125G CellCLI> LIST CELL ATTRIBUTES ramCacheMaxSize,ramCacheMode, ramCacheSize 15G On 15G
Re-setting to auto makes everything clear again:
CellCLI> Modify Prison cell ramCacheMode=Auto Prison cell exaceladm01 successfully altered CellCLI> List Jail cell ATTRIBUTES ramCacheMaxSize,ramCacheMode, ramCacheSize 0 Auto 0
Now we adjust to the value nosotros got from our calculation of 70 percent of the free memory:
CellCLI> Alter CELL ramCacheMode=On Cell exaceladm01 successfully altered CellCLI> Modify Jail cell ramCacheMaxSize=51G Cell exaceladm01 successfully altered CellCLI> Listing Cell ATTRIBUTES ramCacheMaxSize,ramCacheMode, ramCacheSize 51G On 32.8125G CellCLI> List CELL ATTRIBUTES ramCacheMaxSize,ramCacheMode, ramCacheSize 51G On 35.2500G CellCLI> Listing CELL ATTRIBUTES ramCacheMaxSize,ramCacheMode, ramCacheSize 51G On 51G
With that configuration in identify, if we desire to be notified if the storage server is running out memory nosotros tin rapidly create a threshold based on the cell memory utilization (CL_MEMUT) metric to notify usa when the memory utilization goes beyond 95 percentage:
CellCLI> CREATE THRESHOLD CL_MEMUT.interactive comparison=">", critical=95
Determination
To sum upward, RAM cache (aka, in-memory OLTP acceleration) is a feature bachelor just on Oracle Exadata Database Machine X6 or college with at least the eighteen.one paradigm. In addition, it's bachelor for the Oracle Database 12.two.0.1 with April 2018 DBRU or college. This characteristic helps extend the database buffer cache to the complimentary RAM in the storage servers, simply simply for read operations, since RAM is not persistent. For persistent retention, Oracle introduced the Persistent Memory Cache with Oracle Exadata Database Machine X8M.
It's worth mentioning that a database volition only leverage RAM cache when there is pressure level on the database buffer enshroud. The data blocks nowadays in the RAM cache are persistently stored in the storage server's flash cache. When a server procedure on the database side requests a cake that is no longer stored in the database buffer cache, but is in the RAM cache, the cellsrv will transport this block from the RAM enshroud to the buffer cache for the server procedure to read it. It is faster to read from the RAM enshroud instead of reading it from the wink cache or disk.
While the in-retentivity OLTP acceleration characteristic is not a magic solution, it is a plus for our Exadata system. Since we almost always encounter free retention in the storage server, this is a fashion of optimizing the resources nosotros've already paid for. This feature is already in the Exadata licenses, and so in that location is no actress cost selection, and it is not related to the database in-retentivity option. Having Exadata is all y'all need.
Happy caching! See yous next fourth dimension!
Franky
References:
- https://www.loredata.com.br/blog/exadata-how-to-enable-ram-cache-in-the-storage-servers
- https://docs.oracle.com/en/engineered-systems/exadata-database-machine/dbmmn/maintaining-exadata-storage-servers.html#GUID-344A8D7D-AFCD-4B44-ABDD-EAF65483163A
- https://docs.oracle.com/en/engineered-systems/exadata-database-machine/dbmso/new-features-exadata-system-software-release-eighteen.html#GUID-2FA29E52-D72B-4235-8B1E-57B38966EB11
- https://blogs.oracle.com/exadata/exadata-x8m
- https://www.oracle.com/technetwork/database/exadata/exadata-x7-2-ds-3908482.pdf
- https://slideplayer.com/slide/14351522/
Desire to talk with an skillful? Schedule a call with our team to get the conversation started.
Source: https://blog.pythian.com/how-to-enable-ram-cache-in-oracle-exadata/
0 Response to "After a Successful Hit if a Particular Cache Block Is Called Again Is Becomes a Technical Cache"
Post a Comment