{"id":1501,"date":"2020-12-10T00:00:00","date_gmt":"2020-12-10T08:00:00","guid":{"rendered":"https:\/\/en.pingcap.com\/blog\/why-we-disable-linux-thp-feature-for-databases\/"},"modified":"2024-05-28T08:54:47","modified_gmt":"2024-05-28T15:54:47","slug":"transparent-huge-pages-why-we-disable-it-for-databases","status":"publish","type":"post","link":"https:\/\/www.pingcap.com\/ko\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/","title":{"rendered":"Transparent Huge Pages: Why We Disable It for Databases"},"content":{"rendered":"<p>Linux&#8217;s memory management system is transparent to the user. However, if you&#8217;re not familiar with its working principles, you might meet unexpected performance issues. That&#8217;s especially true for sophisticated software like databases. When databases are running in Linux, even small system variations might impact performance.<\/p>\n\n\n\n<p>After an in-depth investigation, we found that Transparent Huge Page (THP), a Linux memory management feature, often slows down database performance. In this post, I&#8217;ll describe how THP causes performance to fluctuate, the typical symptoms, and how to disable transparent huge pages in your Linux system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_are_transparent_huge_pages\"><\/span>What <strong>are transparent huge pages<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>THP is an important feature of the Linux kernel. It maps page table entries to larger page sizes to reduce page faults. This improves the translation lookaside buffer (TLB) hit ratio. TLB is a memory cache used by the memory management unit to improve the translation speed from virtual memory addresses to physical memory addresses.<\/p>\n\n\n\n<p>When the application data being accessed is contiguous, THP often boosts performance. In contrast, if the memory access patterns are not contiguous, THP can&#8217;t fulfill its duty, and it may even cause system instability.<\/p>\n\n\n\n<p>Unfortunately, database workloads are known to have sparse rather than contiguous memory access. Therefore, you should disable THP for your database.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How Linux manages its memory<\/h3>\n\n\n\n<p>To understand the harm THP can cause, let&#8217;s consider how Linux manages its physical memory.<\/p>\n\n\n\n<p>For different architectures, the Linux kernel employs different memory mapping approaches. Among them, the user space maps the memory via multi-level paging to save space, while the kernel space uses linear mapping to achieve simplicity and high efficiency.<\/p>\n\n\n\n<p>When the kernel starts, it adds physical pages to the buddy system. Every time the user applies for memory, the buddy system allocates the desired pages. When the user releases memory, the buddy system deallocates the pages.<\/p>\n\n\n\n<p>To accommodate low-speed devices and various workloads, Linux divides the memory pages into anonymous pages and file-based pages. Linux uses page cache to cache files for low-speed devices. When memory is insufficient, users can employ swap cache and swappiness to specify a proportion of the two types of pages to be released.<\/p>\n\n\n\n<p>To respond to the user&#8217;s memory application as soon as possible and guarantee that the system runs normally when the memory resources are insufficient, Linux defines three watermarks: <code>high<\/code>, <code>low<\/code>, \uadf8\ub9ac\uace0 <code>min<\/code>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If the unused physical memory is less than <code>low<\/code> and more than <code>min<\/code>, when the user applies for memory, the page replacement daemon <code>kswapd<\/code> asynchronously frees memory until the available physical memory is higher than <code>high<\/code>.<\/li>\n\n\n\n<li>If the asynchronous memory reclaim can&#8217;t keep up with the memory application, Linux triggers the synchronous direct reclaim. In such cases, all memory-related threads synchronously take part in freeing memory. When enough memory becomes available, the threads start to get the memory space they apply for.<\/li>\n<\/ul>\n\n\n\n<p>During the direct reclaim, if the pages are clean, the blockage caused by synchronous reclaim is short; otherwise, it might result in tens of milliseconds of latency, and, depending on the back-end devices, sometimes even seconds.<\/p>\n\n\n\n<p>Apart from the watermarks, another mechanism may also cause direct memory reclaim. Sometimes, a thread applies for a large section of continuous memory pages. If there is enough physical memory, but it&#8217;s fragmented, the kernel performs memory compaction. This might also trigger a direct memory reclaim.<\/p>\n\n\n\n<p>To sum up, when threads apply for memory, the major causes of latency are direct memory reclaim and memory compaction. For workloads whose memory access is not very contiguous, such as databases, THP may trigger the two tasks and thus cause fluctuating performance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"When_THP_causes_performance_fluctuation\"><\/span>When THP causes performance fluctuation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If your system performance fluctuates, how can you be sure THP is the cause? I&#8217;d like to share three symptoms that we&#8217;ve found are related to THP.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The most typical symptom: <code>sys cpu<\/code> rises<\/h3>\n\n\n\n<p>Based on our customer support experience, the most typical symptom of THP-caused performance fluctuation is sharply rising system CPU utilization.<\/p>\n\n\n\n<p>In such cases, if you create an on-cpu flame graph using perf, you&#8217;ll see that all the service threads that are in the runnable state are performing memory compaction. In addition, the page fault exception handler is <code>do_huge_pmd_anonymous_page<\/code>. This means that the current system doesn&#8217;t have 2 MB of contiguous physical memory and that triggers the direct memory compaction. The direct memory compaction is time-consuming, so it leads to high system CPU utilization.<\/p>\n\n\n\n<div style=\"--ub-icon-rotation:rotate(0deg);--ub-icon-size:40px;--ub-icon-justification:center;--ub-icon-border-top:  undefined;--ub-icon-border-right:  undefined;--ub-icon-border-bottom:  undefined;--ub-icon-border-left:  undefined\" class=\"wp-block-ub-icon\" id=\"ub-icon-\"><div class=\"ub_icon\"><div class=\"ub_icon_wrapper\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z\"><\/path><\/svg><\/div><\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">The indirect symptom: <code>sys load<\/code> rises<\/h3>\n\n\n\n<p>Many memory issues are not as obvious as those described above. When the system allocates or other high-level memory, it doesn&#8217;t perform memory compaction directly and leave you an obvious trace. Instead, it often mixes the compaction with other tasks, such as direct memory reclaim.<\/p>\n\n\n\n<p>Involving direct reclaim in the process makes our troubleshooting more perplexing. For example, when the unused physical memory in the normal zone is higher than the <code>high<\/code> watermark, the system still continuously reclaims memory. To get to the bottom of this, we need to dive deeper into the processing logic of slow memory allocation.<\/p>\n\n\n\n<p>The slow memory allocation breaks down into four major steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Asynchronous memory compaction<\/li>\n\n\n\n<li>Direct memory reclaim<\/li>\n\n\n\n<li>Direct memory compaction<\/li>\n\n\n\n<li>Out of memory (OOM) collection<\/li>\n<\/ol>\n\n\n\n<p>After each step, the system tries to allocate memory. If the allocation succeeds, the system returns the allocated page and skips the remaining steps. For each allocation, the kernel provides a fragmentation index for each order in the buddy system, which indicates whether the allocation failure is caused by insufficient memory or by fragmented memory.<\/p>\n\n\n\n<p>The fragmentation index is associated with the <code>\/proc\/sys\/vm\/extfrag_threshold<\/code> parameter. The closer the number is to 1,000, the more the allocation failure is related to memory fragmentation, and the kernel is more likely to perform memory compaction. The closer the number is to 0, the more the allocation failure is related to insufficient memory, and the kernel is more inclined to perform memory reclaim.<\/p>\n\n\n\n<p>Therefore, even when the unused memory is higher than the <code>high<\/code> watermark, the system may also frequently reclaim memory. Because THP consumes high-level memory, it compounds the performance fluctuation caused by memory fragmentation.<\/p>\n\n\n\n<p>To verify whether the performance fluctuation is related to memory fragmentation:<\/p>\n\n\n\n<p>1.<span style=\"font-size: revert; color: initial; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\">View the direct memory reclaim operations taken per second. Execute <\/span><code style=\"font-size: revert; background-color: rgb(255, 255, 255); color: initial;\">sar -B<\/code><span style=\"font-size: revert; color: initial; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\"> to observe <\/span><code style=\"font-size: revert; background-color: rgb(255, 255, 255); color: initial;\">pgscand\/s<\/code><span style=\"font-size: revert; color: initial; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\">. If this number is greater than 0 for a consecutive period of time, take the following steps to troubleshoot the problem.<\/span><\/p>\n\n\n\n<p>2.Observe the memory fragmentation index. Execute <code>cat \/sys\/kernel\/debug\/extfrag\/extfrag_index<\/code> to get the index**.** Focus on the fragmentation index of the block whose order is >= 3. If the number is close to 1,000, the fragmentation is severe; if it&#8217;s close to 0, the memory is insufficient.<\/p>\n\n\n\n<p>3.View the memory fragmentation status. Execute <code>cat \/proc\/buddyinfo<\/code> \uadf8\ub9ac\uace0 <code>cat \/proc\/pagetypeinfo<\/code> to show the status. (Refer to the <a style=\"font-size: revert; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\" href=\"https:\/\/man7.org\/linux\/man-pages\/man5\/proc.5.html\">Linux manual page<\/a> for details.) Focus on the number of pages whose order is >= 3.<\/p>\n\n\n\n<p>Compared to <code>buddyinfo<\/code>, <code>pagetypeinfo<\/code> displays more detailed information grouped by migration types. The buddy system implements anti-fragmentation through migration types. Note that if all the <code>Unmovable<\/code> pages are grouped in order &lt; 3, the kernel slab objects have severe fragmentation. In such cases, you need to troubleshoot the specific cause of the problem using other tools.<\/p>\n\n\n\n<p>4.For kernels that support the Berkeley Packet Filter (BPF), such as CentOS 7.6, <strong>you may also perform quantitative analysis on the latency<\/strong> using drsnoop or compactsnoop developed by PingCAP.<\/p>\n\n\n\n<p>5.(Optional) Trace the <code>mm_page_alloc_extfrag<\/code> event with ftrace. Due to memory fragmentation, the migration type steals physical pages from the backup migration type.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The atypical symptom: abnormal RES usage<\/h3>\n\n\n\n<p>Sometimes, when the service starts on an AARCH64 server, dozens of gigabytes of physical memory are occupied. By viewing the <code>\/proc\/pid\/smaps<\/code> file, you may see that most memory is used for THP. Because AARCH64&#8217;s CentOS 7 kernel sets its page size as 64 KB, its resident memory usage is many times larger than that of the x86_64 platform.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_deal_with_THP\"><\/span>How to deal with THP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>For applications that are not optimized to store their data contiguously, or applications that have sparse workloads, enabling THP and THP defrag is detrimental to the long-running services.<\/p>\n\n\n\n<p>Before Linux v4.6, the kernel doesn&#8217;t provide <code>defer<\/code> \ub610\ub294 <code>defer + madvise<\/code> for THP defrag. Therefore, for CentOS 7, which uses the v3.10 kernel, it is recommended to disable THP. If your applications do need THP, however, we suggest that you set THP as <code>madvise<\/code>, which allocates THP via the madvise system call. Otherwise, setting THP as <code>never<\/code> is the best choice for your application.<\/p>\n\n\n\n<p>To disable THP:<\/p>\n\n\n\n<p>1.View the current THP configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/sys\/kernel\/mm\/transparent_hugepage\/enabled<\/code><\/pre>\n\n\n\n<p>2.If the value is always, execute the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo never &gt; \/sys\/kernel\/mm\/transparent_hugepage\/enabled<br>echo never &gt; \/sys\/kernel\/mm\/transparent_hugepage\/defrag<\/code><\/pre>\n\n\n\n<p>Note that if you restart the server, THP might be turned on again. You can write the two commands in the <code>.service<\/code> file and let systemd manage it for you.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Join_our_community\"><\/span>Join our community<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you have any other questions about database performance tuning, or would like to share your expertise, feel free to join the <a href=\"https:\/\/slack.tidb.io\/invite?team=tidb-community&amp;channel=everyone&amp;ref=pingcap-blog\">TiDB Community Slack<\/a> workspace for further discussions.<\/p>","protected":false},"excerpt":{"rendered":"<p>This post dives deep into how transparent huge pages (THP) slow down the system. You&#8217;ll learn why you should disable THP to improve your database performance and how to disable it in Linux.<\/p>","protected":false},"author":226,"featured_media":1503,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ub_ctt_via":"","footnotes":""},"categories":[6],"tags":[70,35],"class_list":["post-1501","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-engineering","tag-linux","tag-performance-tuning"],"acf":[],"featured_image_src":"https:\/\/static.pingcap.com\/files\/2020\/12\/how-thp-slows-down-your-database-performance-banner-scaled.jpg","author_info":{"display_name":"Wenbo Zhang","author_link":"https:\/\/www.pingcap.com\/ko\/blog\/author\/zhangwenbo\/"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Transparent Huge Pages: Why We Disable It for Databases | TiDB<\/title>\n<meta name=\"description\" content=\"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post &quot;Transparent Huge Pages: Why We Disable It for Databases&quot; here.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Transparent Huge Pages: Why We Disable It for Databases | TiDB\" \/>\n<meta property=\"og:description\" content=\"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post &quot;Transparent Huge Pages: Why We Disable It for Databases&quot; here.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/\" \/>\n<meta property=\"og:site_name\" content=\"TiDB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/pingcap2015\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-10T08:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-28T15:54:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.pingcap.com\/files\/2020\/12\/how-thp-slows-down-your-database-performance-banner-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"854\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Wenbo Zhang\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:site\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Wenbo Zhang\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/\"},\"author\":{\"name\":\"Wenbo Zhang\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/3a46a13870b11ccb3f59734ca38ed634\"},\"headline\":\"Transparent Huge Pages: Why We Disable It for Databases\",\"datePublished\":\"2020-12-10T08:00:00+00:00\",\"dateModified\":\"2024-05-28T15:54:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/\"},\"wordCount\":1453,\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static.pingcap.com\/files\/2020\/12\/how-thp-slows-down-your-database-performance-banner-scaled.jpg\",\"keywords\":[\"Linux\",\"Performance tuning\"],\"articleSection\":[\"Engineering\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/\",\"url\":\"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/\",\"name\":\"Transparent Huge Pages: Why We Disable It for Databases | TiDB\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static.pingcap.com\/files\/2020\/12\/how-thp-slows-down-your-database-performance-banner-scaled.jpg\",\"datePublished\":\"2020-12-10T08:00:00+00:00\",\"dateModified\":\"2024-05-28T15:54:47+00:00\",\"description\":\"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post \\\"Transparent Huge Pages: Why We Disable It for Databases\\\" here.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#primaryimage\",\"url\":\"https:\/\/static.pingcap.com\/files\/2020\/12\/how-thp-slows-down-your-database-performance-banner-scaled.jpg\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2020\/12\/how-thp-slows-down-your-database-performance-banner-scaled.jpg\",\"width\":2560,\"height\":854},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pingcap.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Transparent Huge Pages: Why We Disable It for Databases\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pingcap.com\/#website\",\"url\":\"https:\/\/www.pingcap.com\/\",\"name\":\"TiDB\",\"description\":\"TiDB | SQL at Scale\",\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pingcap.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pingcap.com\/#organization\",\"name\":\"PingCAP\",\"url\":\"https:\/\/www.pingcap.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"width\":811,\"height\":232,\"caption\":\"PingCAP\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/pingcap2015\",\"https:\/\/x.com\/PingCAP\",\"https:\/\/linkedin.com\/company\/pingcap\",\"https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/3a46a13870b11ccb3f59734ca38ed634\",\"name\":\"Wenbo Zhang\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg\",\"caption\":\"Wenbo Zhang\"},\"description\":\"Linux Kernel Engineer\",\"url\":\"https:\/\/www.pingcap.com\/ko\/blog\/author\/zhangwenbo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Transparent Huge Pages: Why We Disable It for Databases | TiDB","description":"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post \"Transparent Huge Pages: Why We Disable It for Databases\" here.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pingcap.com\/ko\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/","og_locale":"ko_KR","og_type":"article","og_title":"Transparent Huge Pages: Why We Disable It for Databases | TiDB","og_description":"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post \"Transparent Huge Pages: Why We Disable It for Databases\" here.","og_url":"https:\/\/www.pingcap.com\/ko\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_published_time":"2020-12-10T08:00:00+00:00","article_modified_time":"2024-05-28T15:54:47+00:00","og_image":[{"width":2560,"height":854,"url":"https:\/\/static.pingcap.com\/files\/2020\/12\/how-thp-slows-down-your-database-performance-banner-scaled.jpg","type":"image\/jpeg"}],"author":"Wenbo Zhang","twitter_card":"summary_large_image","twitter_creator":"@PingCAP","twitter_site":"@PingCAP","twitter_misc":{"Written by":"Wenbo Zhang","Est. reading time":"7\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#article","isPartOf":{"@id":"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/"},"author":{"name":"Wenbo Zhang","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/3a46a13870b11ccb3f59734ca38ed634"},"headline":"Transparent Huge Pages: Why We Disable It for Databases","datePublished":"2020-12-10T08:00:00+00:00","dateModified":"2024-05-28T15:54:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/"},"wordCount":1453,"publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2020\/12\/how-thp-slows-down-your-database-performance-banner-scaled.jpg","keywords":["Linux","Performance tuning"],"articleSection":["Engineering"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/","url":"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/","name":"Transparent Huge Pages: Why We Disable It for Databases | TiDB","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#primaryimage"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2020\/12\/how-thp-slows-down-your-database-performance-banner-scaled.jpg","datePublished":"2020-12-10T08:00:00+00:00","dateModified":"2024-05-28T15:54:47+00:00","description":"Learn about the benefits of TiDB and the TiDB Cloud solutions from PingCAP. Read our latest post \"Transparent Huge Pages: Why We Disable It for Databases\" here.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#primaryimage","url":"https:\/\/static.pingcap.com\/files\/2020\/12\/how-thp-slows-down-your-database-performance-banner-scaled.jpg","contentUrl":"https:\/\/static.pingcap.com\/files\/2020\/12\/how-thp-slows-down-your-database-performance-banner-scaled.jpg","width":2560,"height":854},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pingcap.com\/"},{"@type":"ListItem","position":2,"name":"Transparent Huge Pages: Why We Disable It for Databases"}]},{"@type":"WebSite","@id":"https:\/\/www.pingcap.com\/#website","url":"https:\/\/www.pingcap.com\/","name":"\ud2f0DB","description":"TiDB | SQL at Scale","publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pingcap.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.pingcap.com\/#organization","name":"PingCAP","url":"https:\/\/www.pingcap.com\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/","url":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","width":811,"height":232,"caption":"PingCAP"},"image":{"@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/pingcap2015","https:\/\/x.com\/PingCAP","https:\/\/linkedin.com\/company\/pingcap","https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA"]},{"@type":"Person","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/3a46a13870b11ccb3f59734ca38ed634","name":"Wenbo Zhang","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/","url":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","contentUrl":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","caption":"Wenbo Zhang"},"description":"Linux Kernel Engineer","url":"https:\/\/www.pingcap.com\/ko\/blog\/author\/zhangwenbo\/"}]}},"grav_blocks":false,"card_markup":"<a class=\"card-resource bg-white\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/transparent-huge-pages-why-we-disable-it-for-databases\/\"><div class=\"card-resource__image-container\"><img class=\"card-resource__image\" alt=\"how-thp-slows-down-your-database-performance-banner.jpg\" src=\"https:\/\/static.pingcap.com\/files\/2020\/12\/how-thp-slows-down-your-database-performance-banner-scaled.jpg\" loading=\"lazy\" width=2560 height=854 \/><\/div><div class=\"card-resource__content-container\"><div class=\"card-resource__content-head\"><div class=\"card-resource__category\">Engineering<\/div><\/div><h5 class=\"card-resource__title\">Transparent Huge Pages: Why We Disable It for Databases<\/h5><\/div><\/a>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/1501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/users\/226"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/comments?post=1501"}],"version-history":[{"count":9,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/1501\/revisions"}],"predecessor-version":[{"id":17286,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/1501\/revisions\/17286"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media\/1503"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=1501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/categories?post=1501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/tags?post=1501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}