In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about how to use hugepage under the Linux 64-bit system. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.
By: Feng Gao
First of all, why introduce / use HugePage?
Before we get down to business, let's talk about a very common database performance problem.
It is well known that Oracle databases use shared memory (SGA) to manage resources that can be shared; for example, shared SQL statements and execution plans are stored in shared pool, and data blocks are stored in buffer pool. Access to these resources is actually the process by which Oracle uses OS's API to access memory resources. Memory operations are supposed to / are usually very fast, when the Oracle database works fine.
But
A) if a part of the SGA is swap to the hard disk, it will take a lot of time to access it again
B) if the memory of the OS itself is very large, then the process of managing / accessing the memory we need will take longer.
In these cases, we often encounter problems such as latch/mutex/library cache lockpin / row cache lock.
HugePage under Linux can solve the performance fluctuations caused by the above two problems.
We know that in Linux 64-bit systems, the default memory is managed by 4K pages (Page), which is more expensive to manage when the system has a lot of memory, while HugePage uses 2m pages to reduce administrative overhead. HugePage-managed memory cannot be Swap, which avoids database performance problems caused by swap. So, if your system often encounters performance problems caused by swap, there is no doubt that you need to enable HugePage. In addition, systems with very large OS memory also need to enable HugePage. But at what age do you need to use HugePage? This is inconclusive. Some documents have mentioned that it is recommended to enable more than 12G. We strongly recommend that you decide whether to apply HugePage in the production environment after full testing in the test environment.
Of course, everything has two sides, and HugePage also has some minor shortcomings. The first disadvantage is that it requires additional configuration, but this is completely negligible. In addition, if you use the new HugePage,11g feature AMM (Automatic Memory Management), you can't use it, but ASMM (Automatic)
Shared Memory Management) can still be used.
Next, we introduce the steps that need to be completed to configure HugePage. The following steps take RHEL5 as an example.
A) set the limit for memlock and change / etc/security/limits.conf to add the following line
Note that the above number is in K, so you can make its value slightly smaller than the physical memory of the system.
B) check whether memlock is in effect. Users who want to use oracle do the following, and if not, try to log in again.
C) if using 11g database, verify that the parameters MEMORY_TARGET and MEMORY_MAX_TARGET have been set to 0
D) start the database and run Document
401749.1 provides a script to calculate how many HugePage pages should be allocated. For example:
E) change / etc/sysctl.conf to assign the value obtained in the previous step to the vm.nr_hugepages parameter
F) restart the database and OS
G) verify that HugePage is enabled
As shown in the figure below, HugePage allocates a total of 1496 pages, of which 6 pages are Free, so 1490 pages are used, each 2048K.
Finally, if you want to learn more about HugePage-related issues, please refer to the note below.
Note 361323.1: HugePages on Linux: What It
Is... And What It Is Not...
Note 361468.1: HugePages on Oracle Linux
64-bit
The above is the editor for you to share how to use hugepage in the Linux 64-bit system, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are 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.