Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X5W64-0007lw-Q0 for pgsql-performance@arkaria.postgresql.org; Fri, 11 Jul 2014 08:22:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X5W64-00063n-4i for pgsql-performance@arkaria.postgresql.org; Fri, 11 Jul 2014 08:22:24 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X5W63-00063h-7j for pgsql-performance@postgresql.org; Fri, 11 Jul 2014 08:22:23 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X5W5v-0002Xf-Cr for pgsql-performance@postgresql.org; Fri, 11 Jul 2014 08:22:21 +0000 Received: by mail.anarazel.de (Postfix, from userid 108) id 7F2E9500002; Fri, 11 Jul 2014 10:22:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail X-Spam-Level: X-Spam-Status: No, score=-5.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, FUZZY_VPILL autolearn=ham version=3.2.5 Received: from anarazel.de (p5DDC4604.dip0.t-ipconnect.de [93.220.70.4]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 02300500001; Fri, 11 Jul 2014 10:22:07 +0200 (CEST) Received: by anarazel.de (Postfix, from userid 1000) id 8196A1007FB; Fri, 11 Jul 2014 10:22:07 +0200 (CEST) Date: Fri, 11 Jul 2014 10:22:07 +0200 From: Andres Freund To: Mark Kirkwood Cc: pgsql-performance@postgresql.org Subject: Re: 60 core performance with 9.3 Message-ID: <20140711082207.GI17261@awork2.anarazel.de> References: <53ACB190.2030206@catalyst.net.nz> <53ACD6C4.9050605@catalyst.net.nz> <20140627091951.GA16680@awork2.anarazel.de> <53B283F3.7020005@catalyst.net.nz> <20140701101307.GO21422@awork2.anarazel.de> <53BF326F.2070903@catalyst.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53BF326F.2070903@catalyst.net.nz> 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 2014-07-11 12:40:15 +1200, Mark Kirkwood wrote: > On 01/07/14 22:13, Andres Freund wrote: > >On 2014-07-01 21:48:35 +1200, Mark Kirkwood wrote: > >>- cherry picking the last 5 commits into 9.4 branch and building a package > >>from that and retesting: > >> > >>Clients | 9.4 tps 60 cores (rwlock) > >>--------+-------------------------- > >>6 | 70189 > >>12 | 128894 > >>24 | 233542 > >>48 | 422754 > >>96 | 590796 > >>192 | 630672 > >> > >>Wow - that is more like it! Andres that is some nice work, we definitely owe > >>you some beers for that :-) I am aware that I need to retest with an > >>unpatched 9.4 src - as it is not clear from this data how much is due to > >>Andres's patches and how much to the steady stream of 9.4 development. I'll > >>post an update on that later, but figured this was interesting enough to > >>note for now. > > > >Cool. That's what I like (and expect) to see :). I don't think unpatched > >9.4 will show significantly different results than 9.3, but it'd be good > >to validate that. If you do so, could you post the results in the > >-hackers thread I just CCed you on? That'll help the work to get into > >9.5. > > So we seem to have nailed read only performance. Going back and revisiting > read write performance finds: > > Postgres 9.4 beta > rwlock patch > pgbench scale = 2000 > > max_connections = 200; > shared_buffers = "10GB"; > maintenance_work_mem = "1GB"; > effective_io_concurrency = 10; > wal_buffers = "32MB"; > checkpoint_segments = 192; > checkpoint_completion_target = 0.8; > > clients | tps (32 cores) | tps > ---------+----------------+--------- > 6 | 8313 | 8175 > 12 | 11012 | 14409 > 24 | 16151 | 17191 > 48 | 21153 | 23122 > 96 | 21977 | 22308 > 192 | 22917 | 23109 On that scale - that's bigger than shared_buffers IIRC - I'd not expect the patch to make much of a difference. > kernel.sched_autogroup_enabled=0 > kernel.sched_migration_cost_ns=5000000 > net.core.somaxconn=1024 > /sys/kernel/mm/transparent_hugepage/enabled [never] > > Full report http://paste.ubuntu.com/7777886/ > # > 8.82% postgres [kernel.kallsyms] [k] > _raw_spin_lock_irqsave > | > --- _raw_spin_lock_irqsave > | > |--75.69%-- pagevec_lru_move_fn > | __lru_cache_add > | lru_cache_add > | putback_lru_page > | migrate_pages > | migrate_misplaced_page > | do_numa_page > | handle_mm_fault > | __do_page_fault > | do_page_fault > | page_fault So, the majority of the time is spent in numa page migration. Can you disable numa_balancing? I'm not sure if your kernel version does that at runtime or whether you need to reboot. The kernel.numa_balancing sysctl might work. Otherwise you probably need to boot with numa_balancing=0. It'd also be worthwhile to test this with numactl --interleave. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, 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