In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Oracle database in the AIX platform to use large pages of memory example analysis, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can get something.
The use of large page memory (Large Page Memory) on both AIX and Linux platforms depends on the features of the operating system. The default page size for both Linux platform and AIX platform is 4K HugePage platform. Usually, each page can be adjusted to 2M for Aix platform Large Page Memory so that a single page can be adjusted to a maximum of 16m. The following detailed discussion in the AIX platform, the Oracle database instance uses 64K and 16m memory pages, mainly discusses 16m memory pages.
1. Use 64K memory pages
Add the following environment variable settings to the oracle user's PROFILE file:
Export LDR_CNTRL=DATAPSIZE=64K@STACKPSIZE=64K@TEXTPSIZE=64K
Restart the Oracle database instance with the above environment variables in effect.
Before use:
Halpar1: [/ home/oracle] $ps-efZ | grep ora
Oracle 340174 1 0 22:27:07-0:00 4K 4K 4K ora_mmnl_ordb
Oracle 405740 1 0 22:27:27-0:00 4K 4K 4K ora_q001_ordb
Oracle 409848 1 1 22:27:07-0:00 4K 4K 4K ora_ckpt_ordb
Oracle 463038 1 0 22:27:06-0:00 4K 4K 4K ora_lgwr_ordb
Oracle 499916 704560 0 22:26:57 pts/0 0:00 4K 4K 4K-ksh
Oracle 508116 1 0 22:27:06-0:00 4K 4K 4K ora_dbw0_ordb
Oracle 524472 1 0 22:27:06-0:00 4K 4K 4K ora_mman_ordb
Oracle 549010 10 22:27:06-0:00 4K 4K 4K ora_psp0_ordb
Oracle 577616 1 0 22:27:06-0:00 4K 4K 4K ora_pmon_ordb
Oracle 589946 1 0 22:27:07-0:00 4K 4K 4K ora_smon_ordb
After use:
Halpar1: [/] # ps-efZ | grep ora
Oracle 340180 1 0 22:43:02-0:00 64K 64K 64K 4K ora_psp0_ordb
Oracle 405742 1 0 22:43:22-0:00 64K 64K 64K 4K ora_q000_ordb
Oracle 409850 1 0 22:43:03-0:00 64K 64K 64K 4K ora_d000_ordb
Oracle 463040 1 0 22:43:03-0:00 64K 64K 64K 4K ora_mmnl_ordb
Oracle 499916 704560 0 22:26:57 pts/0 0:00 4K 4K 4K-ksh
Oracle 508118 1 0 22:43:03-0:00 64K 64K 64K 4K ora_mmon_ordb
Oracle 524474 1 15 22:43:03-0:00 64K 64K 64K 4K ora_cjq0_ordb
Oracle 549012 1 0 22:43:02-0:00 64K 64K 64K 4K ora_reco_ordb
Oracle 577618 1 0 22:43:02-0:00 64K 64K 64K 4K ora_smon_ordb
Oracle 589948 1 0 22:43:02-0:00 64K 64K 64K 4K ora_ckpt_ordb
two。 Use 16m memory pages
1)。 Execute the following command on the operating system:
# vmo-po v_pinshm=1
# vmo-po maxpin%=80 (set according to actual needs)
# chuser capabilities=CAP_BYPASS_RAC_VMM,CAP_PROPAGATE oracle (use the lsuser-a capabilities oracle command to view this property set by the oracle user)
# vmo-po lgpg_size=16777216-o lgpg_regions=64 (16777216=16M*64=1024M memory, lgpg_size is set according to actual memory and database instance SGA size)
Setting lgpg_size to 16777216 in nextboot file
Setting lgpg_regions to 64 in nextboot file
Warning: although the change concerns a dynamic...
Optimally restore these settings at reboot (it is recommended to do bosboot and restart the operating system)
Setting lgpg_size to 16777216
Setting lgpg_regions to 64
# bosboot-a
Note: Oracle Database 10.2.0.4 and above must complete the chuser capabilities=CAP_BYPASS_RAC_VMM,CAP_PROPAGATE oracle command to set the user properties of the oracle operating system. If not set, it may lead to the problems in the following article: http://space.itpub.net/23135684/viewspace-631065
Run the following command to remove the 16m page setup:
# vmo-po lgpg_size=0-o lgpg_regions=0
2)。 Need to modify oracle user's profile file
# export ORACLE_SGA_PGSZ=16M
Oracle 10.2.0.4, this parameter needs to be set, see metalink DOC ID:NOTE:728444.1
3)。 Database parameters need to be modified
Execute the following SQL statement, mainly setting LOCK_SGA to true:
SQL > alter system set pre_page_sga=true scope=spfile
SQL > alter system set lock_sga=true scope=spfile
Setting LOCK_SGA to TRUE triggers the Oracle database instance to use Large Page Memory, and then restart the database instance.
Before using 16m memory pages:
Halpar1: [/] # svmon
Size inuse free pin virtual
Memory 1048576 637640 447815 445323 288587
Pg space 262144 2841
Work pers clnt other
Pin 109892 0 2849 70438
In use 288587 0 86909
PageSize PoolSize inuse pgsp pin virtual
S 4 KB-245336 2841 102907 158427
M 64 KB-8135 0 5017 8135
L 16 MB 64 00 0 64 0 (value 0)
After using 16m memory pages:
Halpar1: [/] # svmon
Size inuse free pin virtual
Memory 1048576 691573 393883 446308 473636
Pg space 262144 3088
Work pers clnt other
Pin 241949 0 2849 70438
In use 473636 0 86865
PageSize PoolSize inuse pgsp pin virtual
S 4 KB-247605 3088 102916 160740
M 64 KB-11364 0 5078 11364
L 16 MB 64 32 0 64 32 (value is non-0)
If the database is upgraded to 10.2.0.4 or 10.2.0.5 and may not be used to the large page by default after the above configuration, please refer to the article: "AIX: Upgraded To 10.2.0.4 (or 10.2.0.5) And Large Page Memory Is No Longer Used [ID 728444.1]" http://space.itpub.net/?uid-23135684-action-viewspace-itemid-742754
For more information about using Large Page Memory on the AIX platform, refer to the article: "How to enable Large Page Feature on AIX-Based Systems [ID 372157.1]" http://space.itpub.net/?uid-23135684-action-viewspace-itemid-742753
Combined with METALINK's article, the configuration of 16m Large Page Memory under AIX platform is as follows:
# oslevel-s
6100-07-05-1228
# vmo-L v_pinshm
NAME CUR DEF BOOT MIN MAX UNIT TYPE
DEPENDENCIES
V_pinshm 0 0 0 1 boolean D
# vmo-po v_pinshm=1
Setting v_pinshm to 1 in nextboot file
Setting v_pinshm to 1
# vmo-L v_pinshm
NAME CUR DEF BOOT MIN MAX UNIT TYPE
DEPENDENCIES
V_pinshm 1 0 1 0 1 boolean D
# vmo-L maxpin%
NAME CUR DEF BOOT MIN MAX UNIT TYPE
DEPENDENCIES
Maxpin% 80 80 80 1 100% memory D
Pinnable_frames
Memory_frames
# lsuser-a capabilities oracle
Oracle capabilities=CAP_BYPASS_RAC_VMM,CAP_PROPAGATE,CAP_NUMA_ATTACH
# lsuser-a capabilities grid
Grid capabilities=CAP_BYPASS_RAC_VMM,CAP_PROPAGATE,CAP_NUMA_ATTACH
# lsattr-El mem0
Ent_mem_cap I/O memory entitlement in Kbytes False
Goodsize 31488 Amount of usable physical memory in Mbytes False
Mem_exp_factor Memory expansion factor False
Size 31488 Total amount of physical memory in Mbytes False
Var_mem_weight Variable memory capacity weight False
# vmo-p-o lgpg_regions=1024-o lgpg_size=16777216
Setting lgpg_size to 16777216 in nextboot file
Setting lgpg_regions to 1024 in nextboot file
Warning: although the change concerns a dynamic tunable, bosboot should be run to optimally restore these settings at reboot
Setting lgpg_size to 16777216
Setting lgpg_regions to 1024
# vmo-o lru_file_repage=0
Setting lru_file_repage to 0
Warning: a restricted tunable has been modified
# bosboot-a
Bosboot: Boot image is 51228 512 byte blocks.
# vmstat-l
System configuration: lcpu=16 mem=31488MB
Kthr memory page faults cpu large-page
R b avm fre re pi po fr sr cy in sy cs us sy id wa alp flp
1 1 899643 7522 0 0 0 47 63 0 21 2107 579 0 0 99 0 0 1024
# svmon
Size inuse free pin virtual mmode
Memory 8060928 8042431 18497 4724020 902447 Ded
Pg space 2621440 3418
Work pers clnt other
Pin 292772 0 0 236944
In use 902447 0 2945680
PageSize PoolSize inuse pgsp pin virtual
S 4 KB-3372319 3418 310180 426639
M 64 KB-29738 0 13721 29738
L 16 MB 1024 0 0 1024 0
The following is the process of using Large Page Memory after adjusting the Oracle database instance parameters:
$sql
SQL*Plus: Release 11.2.0.3.0 Production on Thu Sep 6 15:00:51 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL > alter system set sga_max_size=16g scope=spfile
System altered.
SQL > alter system set sga_target=16g scope=spfile
System altered.
SQL > alter system set pre_page_sga=true scope=spfile
System altered.
SQL > alter system set lock_sga=true scope=spfile
System altered.
SQL > shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL > startup nomount
ORA-27102: out of memory
IBM AIX RISC System/6000 Error: 12: Not enough space
The server has a total of 32 gigabytes of memory, and the Large Page Memory setting is 16 gigabytes for Oracle database instance SGA, but the space occupied by the database instance may be slightly larger than 16 gigabytes when the database instance is started due to granularity, so the Large Page Memory space is insufficient (this space is automatically allocated and is not used by any programs, the Oracle instance cannot be used, and the space is wasted), and the remaining space is not enough. So the memory is reported to be low. The solution is to increase the lgpg_regions by 1:
# vmo-p-o lgpg_regions=1025-o lgpg_size=16777216
Setting lgpg_size to 16777216 in nextboot file
Setting lgpg_regions to 1025 in nextboot file
Warning: although the change concerns a dynamic tunable, bosboot should be run to optimally restore these settings at reboot
Setting lgpg_size to 16777216
Setting lgpg_regions to 1025
SQL > startup
ORACLE instance started.
Total System Global Area 1.7103E+10 bytes
Fixed Size 2238616 bytes
Variable Size 771753832 bytes
Database Buffers 1.6307E+10 bytes
Redo Buffers 21716992 bytes
Database mounted.
Database opened.
# svmon
Size inuse free pin virtual mmode
Memory 8060928 5732976 2327952 4683897 5139434 Ded
Pg space 2621440 3736
Work pers clnt other
Pin 4446953 0 0 236944
In use 5139434 0 593542
PageSize PoolSize inuse pgsp pin virtual
S 4 KB-1096480 3736 309289 502938
M 64 KB-27381 0 11013 27381
L 16 MB 1025 1025 0 1025 1025
# vmstat-l
System configuration: lcpu=16 mem=31488MB
Kthr memory page faults cpu large-page
R b avm fre re pi po fr sr cy in sy cs us sy id wa alp flp
1 1 5139300 2328085 00 00 00 18 1853 568 00 99 0 1025 0
From the above command, you can see that 1025 Large Page Memory are used.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.