Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vu1Ha-0000dZ-Jr for pgsql-performance@arkaria.postgresql.org; Fri, 20 Dec 2013 14:42:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vu1Ha-0001Vn-1h for pgsql-performance@arkaria.postgresql.org; Fri, 20 Dec 2013 14:42:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vu1HY-0001Te-LV for pgsql-performance@postgresql.org; Fri, 20 Dec 2013 14:42:28 +0000 Received: from smtp.peak6.com ([38.98.137.6]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vu1HU-0002dG-Te for pgsql-performance@postgresql.org; Fri, 20 Dec 2013 14:42:28 +0000 X-AuditID: 0a64cb20-b7f256d000000fb3-01-52b4574f2c27 Message-ID: <52B4574E.7040800@optionshouse.com> Date: Fri, 20 Dec 2013 08:42:22 -0600 From: Shaun Thomas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Sergey Konoplev , Sev Zaslavsky CC: "pgsql-performance@postgresql.org" Subject: Re: slow query - will CLUSTER help? References: <52A9F2A2.4080901@gmail.com> <52B35CF9.9080402@gmail.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed content-transfer-encoding: 7bit X-Originating-IP: [10.10.201.64] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEIsWRmVeSWpSXmKPExsXClcIroesfviXIoGePjMWRxXoW12eeY7aY 2PyO2YHZY+esu+weF/ZNYw9gimpgtEnMy8svSSxJVUhJLU62VfIvKMnMzyv2yC8tTlVwySxO zknMzE0tUlLITLFVMlZSKMhJTE7NTc0rsVVKLChIzUtRsuNSwAA2QGWZeQqpecn5KZl56bZK nsH+uhYWppa6hkp28cggoZMl4+yhx8wFZ7krNn/dytLAOI2zi5GDQ0LAROLgorouRk4gU0zi wr31bCA2r4C+xIsjB8FsFgFViVen5rOA2GwCuhKT+leAxUUFwiTaL8xkhqgXlDg58wlYjYiA p8SPzX/BapiB7I5TqxhBbGEBM4ktK6eydzFycQgJnGeUaJnfwQ6S4BQIlPi+9wQjRIOtxIU5 11kgbHmJ7W/ngC0QAjpiRfNENohDFST+X3nHNIFRYBaS3bOQtM9C0r6AkXkVo3hxWWJyRqZp QXFuSYGRXkFqYraZXl5qySZGcESeVtjB+L3T6hCjAAejEg+vgsnmICHWxLLiytxDjBIczEoi vJ99tgQJ8aYkVlalFuXHF5XmpBYfYvQBBs5EZinR5HxgssgriTc0NjUwtTQ1NDU3NTTCIawk zsuVMzVISCAdmBqyU1MLUotgxjFxcEo1MAZU/aqbp1vLGMAl4Si1gcV84VQdHwm54jyhq7mZ imdkGC1Or+wqX3RLvMi90/vblsiXXjd3n6pf0ekuxSs78a7PtS+uVzr3XBTwP/NO5mJ7+Cq2 q/XMbTL5M7skzggythfMv+34akHtPQeWme7LfZvDJrhYFVmpNH3Zfuh5eeO5nc1aTklrlViK MxINtZiLihMBy14DAfUCAAA= 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 12/19/2013 03:24 PM, Sergey Konoplev wrote: > 2. You are limited with IO > I would also suggest you to upgrade your storage in this case. I think this is the case. If I recall correctly, his setup includes a single RAID-1 for everything, and he only has 32GB of RAM. In fact, the WAL traffic from those inserts alone are likely saturating the write IO, especially if it starts a checkpoint while the load is still going on. I wouldn't want to be around for that. Even with a fairly selective index, just the fetches necessary to identify the rows and verify the data pages will choke a RAID-1 with almost every query. Any table with several hundred million rows is also too big to fit in cache if any significant portion of it is fetched on a regular basis. The cache turnover is probably extremely high, too. That workload is just too high for a system of that description. It would be fine for a prototype, development, or possibly a QA system, but if that's intended to be a production resource, it needs more memory and IO. Also since I can't see part of this conversation and it doesn't seem anyone else mentioned it, the WAL directory *must* be moved to a separate set of disks for a workload of this volume. The amount of writes here will constantly degrade read IO and further increase fetch times. -- Shaun Thomas OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604 312-676-8870 sthomas@optionshouse.com ______________________________________________ See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance