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 1lspIH-000411-Vc for pgsql-performance@arkaria.postgresql.org; Mon, 14 Jun 2021 16:18:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lspIG-0007PX-V8 for pgsql-performance@arkaria.postgresql.org; Mon, 14 Jun 2021 16:18:32 +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 1lspIG-0007PP-NM for pgsql-performance@lists.postgresql.org; Mon, 14 Jun 2021 16:18:32 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lspI9-00027n-V9 for pgsql-performance@lists.postgresql.org; Mon, 14 Jun 2021 16:18:31 +0000 Received: by mail-ed1-x52b.google.com with SMTP id t3so47316360edc.7 for ; Mon, 14 Jun 2021 09:18:25 -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=17owfvOcF+4+0NXFfIewNaPoOCOGVKQ39iIUjkgIPbM=; b=eUMjIVi6AboU/HMiLQjYnVxTQfp6FkizHHtC5ZnR+XTLGx65I0Uyz14njcsPfyyCGy U3YkAQ/Huwsaj+aENbAS+m6R66yDV8LkFvd2tS1Vt4wkuYNcgJJEg29beL3adjT+Coiy RoZzTs0jfwwGLA7GSpIQzxJrqDyVozzgcpwdpRdFKt9+pHDX5RA2oF1edZU3x7MVYZQw iETM2yFmDbKfC6A+ydhcooZSyKKcqUvkwzPL95gTgZdgZ02FicZEeUXDgoNK2iDdywgv NdVPJgKU1e5lg2eVJQjxyMRIbm1m6YCHWBZPH3zADfXtdlkQVmEqDBQStIQDAF2U7weo ag4A== 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=17owfvOcF+4+0NXFfIewNaPoOCOGVKQ39iIUjkgIPbM=; b=Mb3vvAD8FgU8en7S5UMNk06psIPxAgbi5Xk2RKSN1gWO1Q8mnrgdtbggC3nQkRgEsJ 8/hsvVUQTju8/tPW4vFnZrnKWSGozZNCAbaX/P86XFclYX58ZUTOsfKfm+OFtE2Rdn5a PMWMaI/gq1giKBML2OFg82wySoQNZsv5zhhYUkxC/2chsZHEO/KjqHJCVWkaDnGstESs mY7+oMFcRO2Jy9jONnw7m8wRcRVuBV+bU10/cH4Q6uEvBzlEaqj2rt2XJc/R3rbejous VpkP61Z6dO7Zx1WAdv3X6S59HBb9tjPHmgetUUMOlFHADD9Qkpz7udw90OkdKvWoV/Tg NhtQ== X-Gm-Message-State: AOAM532wtJ4OA2QzpFHBX1a1jcvLq7wTyr2H4P9rgFeg+qsJaBMt8kEA HrJ4d3op+MLMr4JE9GchWakA+g== X-Google-Smtp-Source: ABdhPJxQU07S5saMcNt7rV5q1ja6fXLPw3OqR14Q0fMdtJT4BSr0vTIQjYGP9FgLzVtQO3Ub1E3+1w== X-Received: by 2002:a05:6402:3082:: with SMTP id de2mr17468073edb.214.1623687504060; Mon, 14 Jun 2021 09:18:24 -0700 (PDT) Received: from localhost.localdomain (217-149-174-218.nat.highway.telekom.at. [217.149.174.218]) by smtp.gmail.com with ESMTPSA id a19sm7702961ejk.46.2021.06.14.09.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 09:18:23 -0700 (PDT) Message-ID: <8f67083bf8fee0c8af858d1b47b6505ebb106c93.camel@cybertec.at> Subject: Re: overcommit_ratio setting From: Laurenz Albe To: Yi Sun , pgsql-performance@lists.postgresql.org Date: Mon, 14 Jun 2021 18:18:23 +0200 In-Reply-To: References: 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 Mon, 2021-06-14 at 18:16 +0800, Yi Sun wrote: > After checking doc, only mentioned vm.overcommit_memory=2, but didn't mentioned vm.overcommit_ratio recommended value > https://www.postgresql.org/docs/11/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT > some articles mentioned that 80 or 90 configuration in their env > So is it OK just to configure vm.overcommit_ratio to 90 please? It depends on the size of RAM and swap space: overcommit_ratio < (RAM - swap) / RAM * 100 Here, RAM is the RAM available to PostgreSQL. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com