Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z0EHe-0000qs-1T for pgsql-performance@arkaria.postgresql.org; Wed, 03 Jun 2015 19:25:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z0EHd-0003Sh-DN for pgsql-performance@arkaria.postgresql.org; Wed, 03 Jun 2015 19:25:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z0EHb-0003SV-9w for pgsql-performance@postgresql.org; Wed, 03 Jun 2015 19:24:59 +0000 Received: from mail-wi0-f172.google.com ([209.85.212.172]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Z0EHS-0004TT-T6 for pgsql-performance@postgresql.org; Wed, 03 Jun 2015 19:24:58 +0000 Received: by wibut5 with SMTP id ut5so113427915wib.1 for ; Wed, 03 Jun 2015 12:24:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=owIyNAQvD9D3Z33y/PtYUZPSpAr/VGxx3g0GpM7T/ok=; b=mgRKNE5Wzsw9/eJqd8XVmMQbu/9TFnbCJgi6NQqxjbdk0Tk9f5Dm7eBwP4VDTLhkIC S1oUCtrB41qLuliT9LpLE2nPKohOdA7o1/d10Qu5VILcC/5lu/gl8RGC1njJLK8kcfiw J7Ty+09tZkDw0DtqYI658+oUsgY/gm1zxOSq7H2S9BDIdw6GlaNS8Y/MKRaWf/WBL/sK TgxL9EyWujFtWVuX4rPmfnXTzj3iVhAOn/wE9hP2VAF+gu+Ad5ovCE4j1bIgWYaXlMAL y4MOnWosPZ4s6r2eIlhSBDA+Aefuj4WWQjSt15f7tD1sFvK3BBFbTimkKzVYnh7JWyV/ nYxg== X-Gm-Message-State: ALoCoQn4Xn9Yd4yv0znslRrYKAoxIuGyDX9tGmA6Y38hmcpM5haTi8jn8ldVvg5IaYtw2Fytaabf8l949FA1lIuSw1v1UsI/X8PPWwj47h7pJK1L0rjr74umPILUbdA1EnUGalGckYSRL8emTlGHk8HDgWp+4xxP7Bf7DXrHVwBbUH6uoGObdmsq8+NAv0JZir5lIVEtSmLoBRswrg6r7YfR67r5jrQfGg== X-Received: by 10.194.238.193 with SMTP id vm1mr64030706wjc.57.1433359489065; Wed, 03 Jun 2015 12:24:49 -0700 (PDT) Received: from [10.137.2.12] (ip-78-45-136-74.net.upcbroadband.cz. [78.45.136.74]) by mx.google.com with ESMTPSA id ju2sm2995126wid.12.2015.06.03.12.24.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 12:24:48 -0700 (PDT) Message-ID: <556F547D.5040206@2ndquadrant.com> Date: Wed, 03 Jun 2015 21:24:45 +0200 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Scott Marlowe CC: "pgsql-performance@postgresql.org" Subject: Re: How to reduce writing on disk ? (90 gb on pgsql_tmp) References: <1433334092106-5852321.post@n5.nabble.com> <1433337082772-5852328.post@n5.nabble.com> <556F0649.9000402@2ndquadrant.com> <9DED5F42-2C51-4CDE-A179-56A8A9370338@playrion.com> <556F15AD.4040801@2ndquadrant.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 06/03/15 17:09, Scott Marlowe wrote: > On Wed, Jun 3, 2015 at 8:56 AM, Tomas Vondra >> >> >> I don't see why you think you have less than 3GB used. The output you posted >> clearly shows there's only ~300MB memory free - there's 15GB shared buffers >> and ~45GB of page cache (file system cache). > > Because you subtract cached from used to see how much real spare > memory you have. The kernel will dump cached mem as needed to free up > space for memory usage. So 64141-61761=2380MB used. Well, except that 15GB of that is shared_buffers, and I wouldn't call that 'free'. Also, I don't see page cache as entirely free - you probably want at least some caching at this level. In any case, even if all 64GB were free, this would not be enough for the query that needs >95GB for temp files. -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance