Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1etCV1-000594-Ds for pgsql-general@arkaria.postgresql.org; Tue, 06 Mar 2018 13:19:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1etCUz-00070H-LG for pgsql-general@arkaria.postgresql.org; Tue, 06 Mar 2018 13:19:21 +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.89) (envelope-from ) id 1etCUz-0006zw-9s for pgsql-general@lists.postgresql.org; Tue, 06 Mar 2018 13:19:21 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1etCUr-0007V3-IQ for pgsql-general@postgresql.org; Tue, 06 Mar 2018 13:19:20 +0000 Received: by mail-wr0-x241.google.com with SMTP id n7so20913812wrn.5 for ; Tue, 06 Mar 2018 05:19:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=bUe2w5nFRH1+BvX95fALukA2OozwBwxFpe1BTW6dfPk=; b=0yB4O7kFuhFP9wE9G2j2APW3C3nh41MXvELKGi4k0i3FGXC/n6kfxOZ86JNWPkSMYq d96rhXkLM1heR5M9RUmhnF41hyyk3a0SOYo1F1Ret62ObHaAffe5QaZpPXysK0xC24sn fcOB6pUGPMu3KL+VEBU02h7f/Ut8/j9/4nnIJXfF8y8bVA8LMeK7K51/oK8Z5RutsVOs 4pbn6nxphCPpMckH3GkhQrAgFjfQsXE+HzKd5QPOjRIjcquKKyVL9qdUWQisQ250J851 pPFxJJjSxoPAvc58/fiXYoGgcsz6MOlsRIfopo31pPq+v1PyrspYFUtJCXOLpYmux61s zQBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bUe2w5nFRH1+BvX95fALukA2OozwBwxFpe1BTW6dfPk=; b=PmEN79wrZEceIiIzsXkdQHVrZ0gbG6wrxjknVcJPeuB4yVsnlYjeU7NaOjx4y3r0GO fYzoVSnr0QnunPSo6TcVahepmYN+wmOuHKJ1GgloUvTH8WvWMpwYap3etN3rs48qSfIq YYSfKEObdsBCcptJgIwWwNBjboUiU+6oz5BzmBGLmzx9CBfJhKp57Xe4IitPDGDsJPxG HQifqXiA26se44ze2SqFeYuCF95F7UUGRqU/WyUZV4jPSgN+PDraqeZOjbNH64oi0Ike hjE59e9yAiQR90dcKO54zKSSuxjbTAbsHluTHarZ9gqXyHhZkpBEJncGsmsGIWZvrTRg WHaw== X-Gm-Message-State: APf1xPDYkleGoPgw0niZq2RwaPOJwmUUIwZZorBv/xTwMUnE349rOcJv DVy/PSQucElgDF6SJc44eUgMJ1cxUhbValf54o98DSitgH5CC1TouGvSdzLkC01HehraA2Zp3Zu B7BJg/v1hS3dYT3Fl9CB+mUNOHQnrcSRhU/R83/XqL0TISx3UnoWi7kBA2fz0cTJhVGoSfH2r+5 b5IuXM0yJY6HW6ww== X-Google-Smtp-Source: AG47ELuSJsilJkYVtLo7tH9SHdm/Jzsxx37tg8Pdd7s7D10uosjL+PBK2Q7yemY2abUJfyYdA/nAdw== X-Received: by 10.223.139.16 with SMTP id n16mr15446174wra.171.1520342351302; Tue, 06 Mar 2018 05:19:11 -0800 (PST) Received: from [10.137.2.17] ([212.24.157.174]) by smtp.gmail.com with ESMTPSA id q14sm11887497wre.83.2018.03.06.05.19.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Mar 2018 05:19:10 -0800 (PST) Subject: Re: dirty_ratio & dirty_background_ratio settings with huge memory To: Laurenz Albe , pinker , pgsql-general@postgresql.org References: <1520331809441-0.post@n3.nabble.com> <1520338619.2601.26.camel@cybertec.at> From: Tomas Vondra Message-ID: <4319071a-3cbf-cf63-c3a2-69aef34be930@2ndquadrant.com> Date: Tue, 6 Mar 2018 14:19:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1520338619.2601.26.camel@cybertec.at> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 03/06/2018 01:16 PM, Laurenz Albe wrote: > pinker wrote: >> I've got cutomer with really huge RAM, now it's: >> total used free shared buffers cached >> Mem: 3102111 3052596 49515 208801 992 2961185 >> -/+ buffers/cache: 90418 3011693 >> Swap: 8191 1 8190 >> >> (free -m) >> >> and before it was twice more (6TB). >> >> and trying to figure out how to set dirty_ratio & dirty_background_ratio >> parameters. Even for normal sized server those default sizes are to high, >> but now would be ridiculously huge, respectively 1,24TB and 300GB. >> I'm thinking about 1 percent for dirty_ratio and not using >> dirty_background_ratio because it's not possible to set it below 1% but to >> set dirty_background_bytes instead to about 1-2GB. >> Maybe someone has got other experience with RAM of this size and those >> settings? > > Yes, you should set vm.dirty_background_bytes and vm.dirty_bytes > and not use the *_ratio settings. > > 2 GB for vm.dirty_background_bytes and 1 GB for vm.dirty_bytes sounds fine. > It should be the other way around: dirty_background_bytes < dirty_bytes regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services