Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eevQk-0005p8-Ic for pgsql-admin@arkaria.postgresql.org; Fri, 26 Jan 2018 04:15:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eevQj-0002p9-Ox for pgsql-admin@arkaria.postgresql.org; Fri, 26 Jan 2018 04:15:57 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eevQj-0002oy-Eb for pgsql-admin@lists.postgresql.org; Fri, 26 Jan 2018 04:15:57 +0000 Received: from cat-porwal-prod-mail1.catalyst.net.nz ([2404:130:4080::4]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eevQa-000599-Ll for pgsql-admin@lists.postgresql.org; Fri, 26 Jan 2018 04:15:55 +0000 Received: from [IPv6:2406:e001:839:1:a9b7:328b:dd2c:e5f7] (unknown [IPv6:2406:e001:839:1:a9b7:328b:dd2c:e5f7]) (Authenticated sender: mark.kirkwood@catalyst.net.nz) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTPSA id 53C7380D83 for ; Fri, 26 Jan 2018 17:15:39 +1300 (NZDT) Subject: Re: OOM Killing on Docker while ANALYZE running To: pgsql-admin@lists.postgresql.org References: <20180125194720.ammwkya3dvj23rjc@alvherre.pgsql> <29102.1516913306@sss.pgh.pa.us> <4e519ceb-d4ff-1cbf-1536-a96a79426ea2@vt.edu> From: Mark Kirkwood Message-ID: <41aac336-d5ed-9cf2-15d8-cf3783b7fea5@catalyst.net.nz> Date: Fri, 26 Jan 2018 17:15:39 +1300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <4e519ceb-d4ff-1cbf-1536-a96a79426ea2@vt.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Authentication-Results: auth=pass smtp.auth=mark.kirkwood@catalyst.net.nz smtp.mailfrom=mark.kirkwood@catalyst.net.nz List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 26/01/18 15:51, Ray Stell wrote: > On 1/25/18 3:48 PM, Tom Lane wrote: > >> Alvaro Herrera writes: >>> Jorge Daniel wrote: >>>> Hi guys , I'm dealing with OOM killing on Postgresql 9.4.8 running >>>> on docker > > Mike Coleman's talk at DockerCon17 is here: > http://training.play-with-docker.com/ops-stage1/ > At about the 38 minute mark, on the topic of transitioning enterprise > apps to docker: > "define your guardrails,  leave the db out in the VM."  Mike is a > docker evangelist. > > Hmm - I don't think docker per se is the problem here - that default_statistics_target of 10000 is the more likely culprit. A minimal allowance of resources (e.g memory in this case) combined with hugely over spec'ed memory use (the default_statistics_target setting) is gonna trigger OOM for any environment. regards Mark