Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrbLH-0005Vm-Lv for pgsql-admin@arkaria.postgresql.org; Fri, 11 Jun 2021 07:12:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lrbLG-0003LB-MX for pgsql-admin@arkaria.postgresql.org; Fri, 11 Jun 2021 07:12:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrbLG-0003L2-DX for pgsql-admin@lists.postgresql.org; Fri, 11 Jun 2021 07:12:34 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lrbLE-0006wq-3z for pgsql-admin@lists.postgresql.org; Fri, 11 Jun 2021 07:12:33 +0000 Received: by mail-wm1-x329.google.com with SMTP id g204so7485812wmf.5 for ; Fri, 11 Jun 2021 00:12:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=ToqPOTiJRwtDp0zlNMYJe1AdtL1zE/Tqt7hbKyYx0W4=; b=GXUwE3pOjfQ2dVfNJR5/idhia7JDyyvP4eMegcIFUYl9OXYl814Iku8rWPOT2ZlRLD O9O7puG1zbLywbXoR3c2W2v3kCShr0oJjkWNfATI4bpPMX0lr+nAVmcaJMSLZBCEGI92 CjLYiwMhNBnmUFntcyKIJCcVPMIeD1aKScywTixMETUTORAUme4Suop80ojmkQWjbyYc fqhdTJSfd/Nccx/B7FASf4E6BdOHJgdTKapfuDaAote+jC0igGNZ2mMYD/tyKvnpJzFK F7Rry0pwn+XJ2lI7PCU0ZCDnCl2Xk2z3q7f7JshSeiRdIT3Az6IHNOM9J/uzavpOmrWA xiLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=ToqPOTiJRwtDp0zlNMYJe1AdtL1zE/Tqt7hbKyYx0W4=; b=uI+BWf7IJRHH00hg0vC+1JIt51UDhWBQbAeLry0R45Bv4aZYrJssc8UZoQo0L5uB8S Amk79twYvlM3mXmnWDCCnqRdB/7u/4aPaGyjt44LfivJKF7+QbkTMomHA3Y6Df7b81LR pY27dbf7wnlzZpbxZXBWbshaFat5VKeQzmIUL6r5XbM0jbXFg0t4qrS1RQ+ycED+kdn/ Y2HSAJk974nrr1rwTyZrj8Vnyhz8/pf71Jj2ejg5G5xXY5zkt8dUJNdl9ZJpLVd76AE5 Ww950zXj9zFNttOFmhYMqLl8uUniQIkmgRARFhgW+hhiMfi5ifSeCOrlfUlpJCMlvqKB 4hoA== X-Gm-Message-State: AOAM531svvbg1A6lxUhcCcRqQG0rscCFFpfoDMZtcthrbD3b6c+g3Yd5 wmjQQauXkjBcN3aZx5dgduFJ1w== X-Google-Smtp-Source: ABdhPJwMed6IpRYqDSKBWxeDsxgwWFRPX6I5FXTu390lvSeU0uM7XoL+JDQLaDOxg5TwPvhONpevWQ== X-Received: by 2002:a1c:4b0d:: with SMTP id y13mr2400187wma.179.1623395549652; Fri, 11 Jun 2021 00:12:29 -0700 (PDT) Received: from localhost.localdomain (217-149-170-190.nat.highway.telekom.at. [217.149.170.190]) by smtp.gmail.com with ESMTPSA id l3sm5436479wmh.2.2021.06.11.00.12.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 00:12:29 -0700 (PDT) Message-ID: Subject: Re: RHEL-8 Kernel Settings From: Laurenz Albe To: Johannes Truschnigg , pgsql-admin@lists.postgresql.org Date: Fri, 11 Jun 2021 09:12:28 +0200 In-Reply-To: <20210611070617.GB5793@vault.lan> References: <20210611070617.GB5793@vault.lan> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2021-06-11 at 09:06 +0200, Johannes Truschnigg wrote: > On Fri, Jun 11, 2021 at 08:56:13AM +0200, Laurenz Albe wrote: > > [...] > > I recommend setting > > > > vm.overcommit_memory = 2 > > Be careful with this though, most applications no not allocate memory as > thoughtfully as Postgres - so if your server is running any other kind of > service/software in addition to Postgres, you should make sure that can > survive Linux not overcommitting like there's no tomorrow, too. On the contrary: if there is some software that allocates memory like crazy, you want to disable overcommit, so that you get a nice OOM error rather than killed processes, which result in PostgreSQL going through crash recovery. But I think that running such a misbehaving program on a database machine is a bad idea. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com