From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f176.google.com (mail-qk0-f176.google.com [209.85.220.176]) by kanga.kvack.org (Postfix) with ESMTP id D69DE6B0253 for ; Mon, 24 Aug 2015 16:46:16 -0400 (EDT) Received: by qkda128 with SMTP id a128so37953359qkd.3 for ; Mon, 24 Aug 2015 13:46:16 -0700 (PDT) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0080.outbound.protection.outlook.com. [207.46.100.80]) by mx.google.com with ESMTPS id w203si11143455ywa.60.2015.08.24.13.46.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Aug 2015 13:46:15 -0700 (PDT) From: James Hartshorn Subject: Re: Can we disable transparent hugepages for lack of a legitimate use case please? Date: Mon, 24 Aug 2015 20:46:11 +0000 Message-ID: References: ,<20150824201952.5931089.66204.70511@amd.com> In-Reply-To: <20150824201952.5931089.66204.70511@amd.com> Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BLUPR02MB1698B29C7908833FA1364C8ACD620BLUPR02MB1698namp_" MIME-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: "Bridgman, John" , "linux-mm@kvack.org" --_000_BLUPR02MB1698B29C7908833FA1364C8ACD620BLUPR02MB1698namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable As a general purpose sysadmin I've mostly struggled with its default being = always, if it were never (or possibly madvise?) then I think all the very r= eal performance problems would go away. Those who know they need it could = turn it on. I have begun looking into asking the distros to change this (i= s it a distro choice?) but am not getting that far. Just to be clear the d= efault of always causes noticeable pauses of operation on almost all databa= ses, analogous to having a stop the world gc. As for THP in APU type applications have you run into any JEMalloc defrag p= erformance issues? My research into THP issues indicates this is part of t= he performance problem that manifests for databases. Some more links to discussion about THP: Postgresql https://lwn.net/Articles/591723/ Postgresql http://www.postgresql.org/message-id/20120821131254.1415a545@jek= yl.davidgould.org Mysql (tokudb) https://dzone.com/articles/why-tokudb-hates-transparent Redis http://redis.io/topics/latency http://antirez.com/news/84 Oracle https://blogs.oracle.com/linux/entry/performance_issues_with_transpa= rent_huge MongoDB http://docs.mongodb.org/master/tutorial/transparent-huge-pages/ Couchbase http://blog.couchbase.com/often-overlooked-linux-os-tweaks Riak http://underthehood.meltwater.com/blog/2015/04/14/riak-elasticsearch-a= nd-numad-walk-into-a-red-hat/ ________________________________ From: Bridgman, John Sent: Monday, August 24, 2015 1:20 PM To: James Hartshorn; linux-mm@kvack.org Subject: Re: Can we disable transparent hugepages for lack of a legitimate = use case please? We find it useful for GPU compute applications (APU I suppose, with GPU acc= ess via IOMMUv2) working on large datasets. I wouldn't have expected THP to find much use for databases -- those seem t= o be more like graphics stacks where you have enough hints about future usa= ge to justify explicit management of pages. I thought of THP as "the soluti= on for everything else". From: James Hartshorn Sent: Monday, August 24, 2015 3:12 PM To: linux-mm@kvack.org Subject: Can we disable transparent hugepages for lack of a legitimate use = case please? Hi, I've been struggling with transparent hugepage performance issues, and can'= t seem to find anyone who actually uses it intentionally. Virtually every = database that runs on linux however recommends disabling it or setting it t= o madvise. I'm referring to: /sys/kernel/mm/transparent_hugepage/enabled I asked on the internet http://unix.stackexchange.com/questions/201906/does= -anyone-actually-use-and-benefit-from-transparent-huge-pages and got no res= ponses there. Independently I noticed "sysctl: The scan_unevictable_pages sysctl/node-interface has been disabled= for lack of a legitimate use case. If you have one, please send an email = to linux-mm@kvack.org." And thought wow that's exactly what should be done to transparent hugepages= . Thoughts? --_000_BLUPR02MB1698B29C7908833FA1364C8ACD620BLUPR02MB1698namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

As a general purpose sysadmin I've mostly struggled with its default bei= ng always, if it were never (or possibly madvise?) then I think all the ver= y real performance problems would go away.  Those who know they need i= t could turn it on.  I have begun looking into asking the distros to change this (is it a distro choice?) but a= m not getting that far.  Just to be clear the default of always causes= noticeable pauses of operation on almost all databases, analogous to = having a stop the world gc.


As for THP in APU type applications have you run into any JEMalloc defra= g performance issues?  My research into THP issues indicates this is p= art of the performance problem that manifests for databases.


Some more links to discussion about THP:

Postgresql  https://lwn.net/Articles/591723/

Postgresql http://www.postgresql.org/message= -id/20120821131254.1415a545@jekyl.davidgould.org

Mysql (tokudb) https://dzone.com/articles/why-tokudb-ha= tes-transparent

Redis http://redis.io/topics/latency http://antirez.com/news/84

MongoDB http://docs.mongodb.org/master/tutorial/tr= ansparent-huge-pages/
Riak http:/= /underthehood.meltwater.com/blog/2015/04/14/riak-elasticsearch-and-numad-wa= lk-into-a-red-hat/





From: Bridgman, John <Jo= hn.Bridgman@amd.com>
Sent: Monday, August 24, 2015 1:20 PM
To: James Hartshorn; linux-mm@kvack.org
Subject: Re: Can we disable transparent hugepages for lack of a legi= timate use case please?
 
From: James Hartshorn
Sent: Monday, August 24, 2015 3:12 PM
To: linux-mm@kvack.org
Subject: Can we disable transparent hugepages for lack of a leg= itimate use case please?

Hi,


I've been struggling with transparent hugepage performance issues, and c= an't seem to find anyone who actually uses it intentionally.  Virtuall= y every database that runs on linux however recommends disabling it or sett= ing it to madvise.  I'm referring to:


/sys/kernel/mm/transparent_hugepage/enabled


I asked on the internet http://unix.stackexchange.com/que= stions/201906/does-anyone-actually-use-and-benefit-from-transparent-huge-pa= ges and got no responses there.  



Independently I noticed 


"sysctl: The scan_unevictable_pages sysctl/node-interface has been = disabled for lack of a legitimate use case.  If you have one, please s= end an email to linux-mm@kvack.org."


And thought wow that's exactly what should be done to transparent hugepa= ges.  


Thoughts?  

--_000_BLUPR02MB1698B29C7908833FA1364C8ACD620BLUPR02MB1698namp_-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org