Re: ??: postgres cpu 100% need help

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)gmail(dot)com>
Cc: "657985552(at)qq(dot)com" <657985552(at)qq(dot)com>, Bill Moran <wmoran(at)potentialtech(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: ??: postgres cpu 100% need help
Date: 2015-11-23 22:59:21
Message-ID: CAHyXU0xcCk1DD_oC5P-6b1uFQ2si12Kp3wHduG=LDZt_UK4UUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Nov 23, 2015 at 9:30 AM, Kevin Grittner <kgrittn(at)gmail(dot)com> wrote:
> On Mon, Nov 23, 2015 at 12:20 AM, 657985552(at)qq(dot)com <657985552(at)qq(dot)com> wrote:
>
>> [root(at)pg1 ~]# cat /sys/kernel/mm/transparent_hugepage/enabled
>> [always] madvise never
>> [root(at)pg1 ~]# cat /sys/kernel/mm/transparent_hugepage/defrag
>> [always] madvise never
>
> There's your problem. You need to set those to "never". You can
> get immediate relief by echoing 'never' to those pseudo-files, but
> you need to configure your system to set them at OS boot time, too.

yup. IMNSHO automatic enabling of THP defrag is one of the worst
performance related mistakes I've ever seen in the history of the
linux kernel (although maybe the blame lies with the distros...I'm not
sure). It caused a number of terrible outages here before we figured
out the underlying cause. (of course, everyone blamed postgres until
then)

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2015-11-23 23:05:52 Re: using a postgres table as a multi-writer multi-updater queue
Previous Message Merlin Moncure 2015-11-23 22:51:48 Re: using a postgres table as a multi-writer multi-updater queue