Memory management is a crucial component that helps you work with multiple instances in the Oracle database. Under Oracle 12cc, there are three methods available to you for managing the memory in your system-
1. Automatic- Oracle will take care of memory management for you.
2. Manual- You need to tune specific parameters for using memory areas in different ways.
3. Blend of automated and manual- You should refer to Oracle’s guide for its infrastructure and your set skills. Allow Oracle to take over some parts of the memory management while you look after the others yourself.
Suppose you examine the last few releases of the Oracle database. In that case, you will notice it has introduced automation in those areas that were manual in the past and often quite cumbersome for database administrators.
Now, this does not infer you do not need to have special skills for Oracle database management; the opposite holds true. When Oracle automatically manages the routine and mundane tasks, the database administrator can focus on other advanced features with success.
Synopsis of the Oracle Database Memory Management
Information on the Oracle database is kept in memory caches and the disk. This memory access is faster than the disk’s speed that takes more time than the memory access. The disk access also needs more CPU resources because of the length of its path in the drivers of the device and the schedulers for the system operating event.
Due to the above reason, data requests for frequently accessed objects should be done by the memory over the disk access. If the Oracle database memory is sized and used appropriately, it can boost system performance a lot.
What are the Key Caches That Affect Performance in the Oracle Database?
The following are the key caches that affect the efficiency of any Oracle database system-
1. Buffer cache of the system – It has the data blocks that are read from the disk.
2. Buffer of redo logs- This buffer keeps the redo entries of all the changes done to the above data blocks located in the buffer cache.
3. Shared pool- It has multiple data and is made up of three cache elements-
• Data dictionary
• Server result and
• Library cache.
4. Java Pool-It has the Java Virtual Machine data and codes of the particular session.
5. Large pool – It contains a parallel query, the recovery manager, and the shared server’s architecture.
6. Streams pool -it contains the memory for the stream processes of Oracle.
7. IM or In Memory Column- it functions as a supplement to the system’s buffer cache. It does not replace it. Both these memory spaces can store similar data in different formats. It improves the performance of tasks like scans, aggregations, and joins.
8. Process private memory- It has the memory needed for tasks like hash joins and sorting.
Management of Oracle Database Memory
The Oracle database memory needs to be managed by trained and qualified database administrators, reducing the physical I/O overheads to the best possible extent. This can be accomplished in the following two ways-
1. The data needed stays in the memory.
2. Improving the process of retrieving this required data.
Experts in Oracle database management systems say the above goals can be attained by maintaining the proper size and using the database system memory cache effectively.
Experienced professionals from the esteemed company in database management solutions and services, RemoteDBA.com, say the following methods can be optimized to manage the memory of Oracle databases-
1. Management of Automatic Memory – In this method, the PGA (Program Global Area) and the SGA (Shared Global Area) are entirely managed by the Oracle Database itself. This method is a completely automated process and is recommended strongly by Oracle. Before you manually settle the memory’s pool size, you can consider using this method for memory management.
With the automatic memory management under Oracle, you can take charge of the volume of memory that the system should manage. However, there is always a point for you to start. You need to set a value, and these questions will help-
• How much free memory do you have in the system?
• What is the number of databases do you want to keep in your system?
• How many people will be using the machine?
• Does the machine have other running applications?
2. Management of Automatic Shared Memory-If the automatic memory management is not enabled, the database in Oracle will use the shared memory for managing SGA. Here, the database will automatically share memory to components of the SGA individually that is based on the size of the target you select for the entire SGA memory.
3. Management of the PGA memory (automatic)– When the automated memory management is not enabled, the database uses the PGA memory management automatically to manage it. In this method, the Oracle database assimilates memory automatically to task areas based on its PGA as per target sizes established for the whole PGA memory.
4. Management of the PGA memory (manual) – Of both the automatic memory management and the automated program global area memory is not enabled, the PGA memory needs to be managed manually. Oracle does not advise this method. The task is quite cumbersome as workloads change all the time. Though Oracle has supported it, professionals recommend not using this method. It is better to use the automatic PGA memory management or automated memory management in the system instead.
For determining the amount of memory your system has, Oracle helps you with a feature called “Memory Target Advisor.” You can get it in the command line from the database control’s home page.
With Oracle’s automatic features, DBAs can now focus better on system availability and security. These are the actual areas that demand constant full -time attention. In this way, database administrators can boost the speed and the performance of the Oracle database with success.