[11g architecture, 4] AMM (Automatic Memory Allocation Management), 11 gamm

Source: Internet
Author: User

[11g architecture, 4] AMM (Automatic Memory Allocation Management), 11 gamm
1. AMM (automaitc memory managerment)


1. Automatic Management of oracle 10g SGA: SGA_TARGET specifies the maximum memory size that SGA can use. The size of each memory in SGA is controlled by Oracle and does not need to be specified manually. Oracle can adjust the size of each region at any time to reach the optimum system performance, and control the sum of them within the value specified by SGA_TARGET. Once a value is specified for SGA_TARGET (the default value is 0, that is, no ASMM is started), The ASMM feature is automatically started. If SGA_TARGET is not set, the automatic shared memory management function is disabled.
Note: The value of sga_target cannot be greater than sga_max_size, so sga_max_siz is the upper limit of sga management. SQL> show parameter sga
Name type value ------------------------------------------- ------------------------- lock_sga boolean FALSEpre_page_sga boolean FALSEsga_max_size big integer 416Msga_target big integer 200 M


SQL> alter system set sga_target = 500 m scope = spfile; alter system set sga_target = 500 m scope = spfile; * ERROR at line 1: ORA-02097: parameter cannot be modified because specified value is invalidORA-00823: Specified value of sga_target greater than sga_max_size
②. After SGA_TARGET is set, the following SGA memory areas can be automatically adjusted by ASMM: ASMM can only automatically adjust the size of five memory pools, which are: shared pool, buffer cache, large pool, java pool, and stream pool. We no longer need to set the shared_pool_size, db_cache_size, large_pool_size, java_pool_size, and streams_pool_size initialization parameters. Other memory pools, such as log buffer and keep buffer cache, still need to be manually adjusted by DBAs.
The size of SGA_TARGET cannot exceed the size of SGA_MAX_SIZE.
# View the actual size of each pool in sga: SQL> select name, bytes/1024/1024 m from v $ sgainfo;
Name m -------------------------------- Fixed SGA Size 1.27510452 Redo Buffers 5.78515625 Buffer Cache Size 80 Shared Pool Size 148 Large Pool Size 4 Java Pool Size 4 Streams Pool Size 0 Shared IO Pool Size 0 Granule Size 4 Maximum SGA Size 415.0625 Startup overhead in Shared Pool 52
Name m -------------------------------- ---------- Free SGA Memory Available 172
12 rows selected.

Case: Set sga_target
SQL> ALTER system SET sga_max_size = 1000 m scope = spfile; SQL> ALTER system SET sga_target = 1000 m scope = spfile;
Shut down the database shutdown immediate; start the database startup;
Note: # modify the size of/dev/shm to 2 GB: Modify the etc/fstab file and re-mount it. [Root @ gc1 ~] Vi etc/fstab # remount


2. oracle 11g SGA Automatic Management: ①. in Oracle11g, Oracle took the automation of Memory Management step by step and introduced the new features of Automatic Memory Management-AMM.
②. Oracle11g introduces a new parameter MEMORY_TARGET. If this parameter is set, you do not need to set the SGA_TARGET and PGA_AGGREATE_TARGET parameters. You only need to set a target memory size initialization parameter (MEMORY_TARGET) and a maximum memory size initialization parameter (MEMORY_MAX_TARGET). The database dynamically exchanges memory between the SGA and the instance PGA Based on the processing requirements. ③. Automatic Memory Management is configured with two initialization parameters: MEMORY_TARGET: the total size of shared memory that can be used by Oracle when SGA and PGA are dynamically controlled. this parameter is dynamic, therefore, the total amount of memory provided to Oracle can be dynamically increased or decreased. It cannot exceed the size set by the MEMORY_MAX_TARGET parameter. The default value is 0. MEMORY_MAX_TARGET: this parameter defines the maximum value of MEMORY_TARGET that can be reached without restarting the instance. If the MEMORY_MAX_TARGET value is not set, it is equal to the value of MEMORY_TARGET by default. When dynamic memory management is used, SGA_TARGET and PGA_AGGREGATE_TARGET represent the minimum settings of their respective memory regions. To allow Oracle to fully control memory management, these two parameters should be set to 0. However, MEMORY_TARGET is not set, and the two parameters are automatically changed back to 0.
4. The memory management parameters of ORACLE are as follows:


3. Adjust the shared pool: # view the shared pool parameters (0 indicates that the shared pool is automatically managed) SQL> show parameter shared_pool_size
Name type value ------------------------------------ ----------- --------------------------- shared_pool_size big integer 0

# Check the real size of the shared pool SQL> select name, bytes/1024/1024 m from v $ sgainfo;
Name m -------------------------------- Fixed SGA Size 1.27510452 Redo Buffers 5.78515625 Buffer Cache Size 80 Shared Pool Size 148 Large Pool Size 4 Java Pool Size 4 Streams Pool Size 0 Shared IO Pool Size 0 Granule Size 4 Maximum SGA Size 415.0625 Startup overhead in Shared Pool 52
# Increase the value of shared pool SQL> alter system set shared_pool_size = 160 m;
System altered. # query SQL> select name, bytes/1024/1024 m from v $ sgainfo;
Name m -------------------------------- Fixed SGA Size 1.27510452 Redo Buffers 5.78515625 Buffer Cache Size 68 Shared Pool Size 160 Large Pool Size 4 Java Pool Size 4 Streams Pool Size 0 Shared IO Pool Size 0 Granule Size 4 Maximum SGA Size 415.0625 Startup overhead in Shared Pool 52
Name m -------------------------------- ---------- Free SGA Memory Available 172
12 rows selected. # reduce the value of the shared pool and find that the shared pool is still 160 m. Therefore, the shared pool can only be increased but not decreased. SQL> alter system set shared_pool_size = 148 m;
System altered.
SQL> select name, bytes/1024/1024 m from v $ sgainfo;
Name m -------------------------------- Fixed SGA Size 1.27510452 Redo Buffers 5.78515625 Buffer Cache Size 68 Shared Pool Size 160 Large Pool Size 4 Java Pool Size 4 Streams Pool Size 0 Shared IO Pool Size 0 Granule Size 4 Maximum SGA Size 415.0625 Startup overhead in Shared Pool 52
Name m -------------------------------- ---------- Free SGA Memory Available 172
12 rows selected.
Ii. Case Summary:
1. swap zone size setting: Generally, the recommended value of the Swap zone is 2 * RAM for the operating system. If the physical memory (RAM) is large, you do not have to set Swap to 2 xSwap, generally, you can set Swap = Ram or smaller than the physical memory (for example, if the memory exceeds 32 GB, you can set Swap to 16 GB ). If the physical memory (RAM) is too small, a large amount of swap is generated during the busy period of the system and cannot be switched to the disk, the problem may occur. In addition, if the system physical memory is small, SGA is usually set to <1/2 Ram, you should consider the PGA consumption of Server process and the OS to reserve enough memory space.







Recently, with a new computer, the CPU is AMM Athlon (X-Dragon) Ⅱ X4 640 quad core, the graphics card is nvidia geforce gts 250, 4G memory

It should be a problem with the video card. You can try another public driver, and you can use an independent video card to check whether there are other problems.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.