Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dV7A8-0001Tn-UA for pgsql-performance@arkaria.postgresql.org; Wed, 12 Jul 2017 02:14:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dV7A8-0004Kk-Aa for pgsql-performance@arkaria.postgresql.org; Wed, 12 Jul 2017 02:14:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dV78M-0001G5-JF for pgsql-performance@postgresql.org; Wed, 12 Jul 2017 02:12:10 +0000 Received: from cat-porwal-prod-mail1.catalyst.net.nz ([2404:130:4080::4]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dV78G-0000ve-LQ for pgsql-performance@postgresql.org; Wed, 12 Jul 2017 02:12:09 +0000 Received: from localhost (localhost [127.0.0.1]) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTP id 6F0608030D; Wed, 12 Jul 2017 14:11:55 +1200 (NZST) X-Virus-Scanned: Debian amavisd-new at cat-porwal-prod-mail1.servers.catalyst.net.nz Received: from cat-porwal-prod-mail1.catalyst.net.nz ([127.0.0.1]) by localhost (cat-porwal-prod-mail1.servers.catalyst.net.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JwX2CyWcW8m3; Wed, 12 Jul 2017 14:11:54 +1200 (NZST) Received: from [192.168.1.64] (122-62-69-32.jetstream.xtra.co.nz [122.62.69.32]) (Authenticated sender: mark.kirkwood@catalyst.net.nz) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTPSA id F018B801FF; Wed, 12 Jul 2017 14:11:53 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catalyst.net.nz; s=catalyst; t=1499825514; bh=gbm3x91eFPZ3lZzfJ3o45Z0z3BBC09TPtIMWzJIwowc=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=cEZLeupN5WfqHpnrAO2Eo0DbuxJCdZBjPH65xJTUA1kKShojyLNBTvmASwgvBSOuD goZSMecCfJORyKNsu13O1W7BC8W5YrBUt/6jjhF6FiuG9QHsi1VG5958c0UgyCx/Xr 8BtboyGFCKRMXBAcX/5IEXq1JeNBZ8ceOyt4GWB0= Subject: Re: Very poor read performance, query independent To: Charles Nadeau , Igor Neyman Cc: Andreas Kretschmer , "pgsql-performance@postgresql.org" References: From: Mark Kirkwood Message-ID: Date: Wed, 12 Jul 2017 14:11:53 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US 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 Hmm - how are you measuring that sequential scan speed of 4MB/s? I'd recommend doing a very simple test e.g, here's one on my workstation - 13 GB single table on 1 SATA drive - cold cache after reboot, sequential scan using Postgres 9.6.2: bench=# EXPLAIN SELECT count(*) FROM pgbench_accounts; QUERY PLAN ------------------------------------------------------------------------------------ Aggregate (cost=2889345.00..2889345.01 rows=1 width=8) -> Seq Scan on pgbench_accounts (cost=0.00..2639345.00 rows=100000000 width=0) (2 rows) bench=# SELECT pg_relation_size('pgbench_accounts'); pg_relation_size ------------------ 13429514240 (1 row) bench=# SELECT count(*) FROM pgbench_accounts; count ----------- 100000000 (1 row) Time: 118884.277 ms So doing the math seq read speed is about 110MB/s (i.e 13 GB in 120 sec). Sure enough, while I was running the query iostat showed: Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util sda 0.00 0.00 926.00 0.00 114.89 0.00 254.10 1.90 2.03 2.03 0.00 1.08 100.00 So might be useful for us to see something like that from your system - note you need to check you really have flushed the cache, and that no other apps are using the db. regards Mark On 12/07/17 00:46, Charles Nadeau wrote: > After reducing random_page_cost to 4 and testing more, I can report > that the aggregate read throughput for parallel sequential scan is > about 90MB/s. However the throughput for sequential scan is still > around 4MB/s. > -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance