Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TeT73-0001wv-TS for pgsql-performance@arkaria.postgresql.org; Fri, 30 Nov 2012 16:06:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TeT72-0005EF-TT for pgsql-performance@arkaria.postgresql.org; Fri, 30 Nov 2012 16:06:48 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TeT71-0005E9-KG for pgsql-performance@postgresql.org; Fri, 30 Nov 2012 16:06:47 +0000 Received: from smtp2.peak6.com ([38.98.137.9]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TeT6u-0003wW-9Y for pgsql-performance@postgresql.org; Fri, 30 Nov 2012 16:06:46 +0000 X-AuditID: 0a02cb20-b7f1a6d00000797a-7c-50b8d98e7f7f Received: from sswchi5pcas2.peak6.net (sswchi5pcas2.peak6.net [10.100.13.24]) by smtp2.peak6.com (Symantec Messaging Gateway) with SMTP id 63.03.31098.E89D8B05; Fri, 30 Nov 2012 10:06:38 -0600 (CST) Received: from [10.10.201.64] (10.10.201.64) by sswchi5pcas2.peak6.net (10.100.13.25) with Microsoft SMTP Server (TLS) id 14.2.247.3; Fri, 30 Nov 2012 10:06:37 -0600 Message-ID: <50B8D98C.8050507@optionshouse.com> Date: Fri, 30 Nov 2012 10:06:36 -0600 From: Shaun Thomas Reply-To: Organization: Peak6 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Niels_Kristian_Schj=F8dt?= CC: Kevin Grittner , Willem Leenen , Subject: Re: Optimize update query References: <20121130012426.69300@gmx.com> <855F8817-6C9A-4EFB-BB80-752BF7B73B56@autouncle.com> <50B8BC7F.4000005@optionshouse.com> <5F52712E-C339-4DF2-9EE5-A26643CEA2C2@autouncle.com> <50B8CA01.5040405@optionshouse.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Length: 1493 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.10.201.64] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEKsWRmVeSWpSXmKPExsXClcIrodt3c0eAwdxvkhYvj91htli66yyL xfWZ55gtdq7by+LA4tF5+Dyrx+OeM2weM56cZvW4sG8aewBLVAOjTWJeXn5JYkmqQkpqcbKt kn9BSWZ+XrFHfmlxqoJLZnFyTmJmbmqRkkJmiq2SsZJCQU5icmpual6JrVJiQUFqXoqSHZcC BrABKsvMU0jNS85PycxLt1XyDPbXtbAwtdQ1VLKLRwYJnSwZBzd8Yy7Yy1XR+i2tgXEWRxcj J4eEgInEqe+tzBC2mMSFe+vZQGwhgROMEufPpHQxcgHZKxkl/vxZBpbgFdCXuPj7MSOIzSKg KnF6/gswm01AV2JS/wqoZhWJvrM3mEBsfgFhiX0fmsAWiAqESazZc4gJYo6gxMmZT1i6GDk4 RAS8JX61JICEmQXKJCY+fswKYgsL6Eg0bbrOCnHDMSaJi9fngfVyCjhKLHz+jxWiwVbiwpzr LBC2vETz1tnMEDeoSqxonsgG8ZiCxP8r75gmMIrMQrJ6FpL2WUjaFzAyr2IULy5LTM7INCso zi0pMNIrSE3MNtPLSy3ZxAhKCEynFXYwbu6xOsQowMGoxMO7YNH2ACHWxLLiytxDjBIczEoi vH837ggQ4k1JrKxKLcqPLyrNSS0+xOgDDLOJzFKiyfnAZJVXEm9obGpgamlqaGpuamiEQ1hJ nDc0dFGAkEA6MPVkp6YWpBbBjGPi4JRqYEzguPZHJZe7PGse95+TUmXvrj7S9eN0EpIym/JQ hKEwubF8YtP8o+Kp71PSzmsFvfbcxNgX/6Ht+KW8LV4M11IWS7kcl6qW1P0jfrjNWfaZWSXf R5nWWfKpJ5oSsp8zya/UujPt5BqzGUeXR3SXrSpY/Xx+0Z22BfW3hfqKw5m+r1HTkT6ur8RS nJFoqMVcVJwIAPUlZvA1AwAA X-Pg-Spam-Score: -1.9 (-) 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 11/30/2012 09:44 AM, Niels Kristian Schj=F8dt wrote: Just a note on your iostat numbers. The first reading is actually just a summary. You want the subsequent readings. > The pgsql_tmp dir is not changing at all it's constantly empty (a size > of 4.0K). Good. > Filesystem 1K-blocks Used Available Use% Mounted on > /dev/md3 230619228 5483796 213420620 3% /ssd Good. You could just be seeing lots of genuine activity. But going back on the thread, I remember seeing this in your postgresql.conf: shared_buffers =3D 7680MB Change this to: shared_buffers =3D 4GB I say that because you mentioned you're using Ubuntu 12.04, and we were having some problems with PG on that platform. With shared_buffers over 4GB, it starts doing really weird things to the memory subsystem. Whatever it does causes the kernel to purge cache rather aggressively. We saw a 60% reduction in read IO by reducing shared_buffers to 4GB. Without as many reads, your writes should be much less disruptive. You'll need to restart PG to adopt that change. But I encourage you to keep iostat running in a terminal window so you can watch it for a while. It's very revealing. -- Shaun Thomas OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604 312-444-8534 sthomas@optionshouse.com ______________________________________________ See http://www.peak6.com/email_disclaimer/ for terms and conditions related= to this email --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance