In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you the "sample analysis of HugePage in Redhat", which is easy to understand and clear. I hope it can help you solve your doubts. Let the editor lead you to study and study the "sample analysis of HugePage in Redhat".
1. Introduction of HugePage
In the operating system Linux environment, memory is allocated in the form of page Page, with a default size of 4K. If a large amount of memory space is required, frequent page allocation and administrative addressing actions are required.
HugePage is an alternative to traditional 4K Page. As the name implies, using HugePage allows us to have a larger memory page size. Whether it is HugePage or traditional normal Page, this process involves the OS memory addressing process.
When a process accesses memory, it does not directly access the memory location, but needs to be transferred through Page Table. In the case of HugePage, PageTable has an additional property to determine whether the page record is HugePage or Regular Page.
Second, information viewing
System
Uname-r
View shared segment
Ipcs-m
View large pages of information
Grep Huge / proc/meminfo
Third, prepare large pages
Determine the memory size
Free-g
Calculate HugePages_Total: see 401749.1 for script
Execute the script, and note that this process requires that all instances of Oracle, including the database and ASM, be started, AMM shut down, and the SGA size exceed 100m.
Modify the / etc/security/limits.conf parameter file to add memlock restrictions for database instance users.
The memlock tag is used in this process to set the maximum memory usage allowed by each user. This value can be set to the physical memory size of the database server.
Note: available memory > value (locked memory) > = HugePages_Total*Hugepagesize
HugePagesize:
Vi / etc/security/limits.conf
# add oracle soft memlock value oracle hard memlock value
Verify limit
Ulimit-l
Change parameter / etc/sysctl.conf
Vm.nr_hugepages = HugePages_ Total value (see step 2)
Restart the system and database
Verification
Grep Huge / proc/meminfo
Fourth, close the big page
Method 1: the first priority is to modify the / boot/grub/grub.conf file and add "transparent_hugepage=never" after the kernel line:
Title Red Hat Enterprise Linux (2.6.32-358.el6.x86_64) root (hd0,0) kernel / vmlinuz-2.6.32-358.el6.x86_64 ro root=/dev/mapper/vg_xty64-lv_root rd_NO_LUKS.UTF-8 rd_LVM_LV=vg_xty64/lv_root rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_NO_DM KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg_xty64/lv_swap transparent_hugepage=never Initrd / initramfs-2.6.32-358.el6.x86_64.img
Add the following line of code to / etc/rc.local:
If test-f / sys/kernel/mm/transparent_hugepage/enabled; then echo never > / sys/kernel/mm/transparent_hugepage/enabled fi if test-f / sys/kernel/mm/transparent_hugepage/defrag; then echo never > / sys/kernel/mm/transparent_hugepage/defrag fi
Check after restart:
Cat / sys/kernel/mm/transparent_hugepage/defragalways [never] cat / sys/kernel/mm/transparent_hugepage/enabled always [never]
If the result is not expected, it may be due to Linux's ktune and tuned services. In such cases, it is recommended that the two services be closed:
Service tuned stopchkconfig tuned offservice ktune stopchkconfig ktune off or: tuned-adm off V, the relationship with Oracle
Introduction to AMM: SGA is implemented through system shared memory in Linux, while PGA is implemented through process private space. In fact, the biggest function of AMM is to open the channel of SGA and PGA space adjustment, which will inevitably bring about the impact on the original SGA shared memory architecture. In AMM, the virtual empty shared segment displayed by ipcs-m is part of the actual effect.
AMM & HugePage
AMM does not support HugePage, and if you open the database in AMM+HugePage mode, you will encounter a failure message. All HugePages users must set the memory parameter MEMORY_TARGET / MEMORY_MAX_TARGET to 0
If you use large memory and SGA, then HugePage is very important to improve database performance. If the database SGA script, such as more than 8G (personal experience: recommended SGA > 32GB), you need to configure HugePages. Configuring HugePages has the following benefits:
Large and regular pages: the traditional page size is 4K and the hugeLTB size is 2048k. This means that the system needs to process 512 times more traditional pages.
Reduce PageTable retrieval load: smaller PageTable means faster retrieval and location capabilities
Improved memory performance: the decrease in the number and size of Page reduces the complexity of the management process and further reduces the probability of bottlenecks
Non-Swap memory: HugePage will not Swap when HugePage is turned on
Reduce PageTable space load: in PageTable management, each Page record takes up 64byte space. In other words, if a 50-gigabyte RAM,4k-sized PageTable is about 80MB
The above is all the content of the article "sample Analysis of HugePage in Redhat". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.