From owner-freebsd-performance@FreeBSD.ORG Mon Jun 30 23:39:51 2014 Return-Path: Delivered-To: performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C57FED20; Mon, 30 Jun 2014 23:39:51 +0000 (UTC) Received: from mailuogwhop.emc.com (mailuogwhop.emc.com [168.159.213.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mailuogwprd01.lss.emc.com", Issuer "RSA Corporate Server CA v2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7403622B7; Mon, 30 Jun 2014 23:39:51 +0000 (UTC) Received: from maildlpprd06.lss.emc.com (maildlpprd06.lss.emc.com [10.253.24.38]) by mailuogwprd01.lss.emc.com (Sentrion-MTA-4.3.0/Sentrion-MTA-4.3.0) with ESMTP id s5UNJEpH006353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Jun 2014 19:19:14 -0400 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd01.lss.emc.com s5UNJEpH006353 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=isilon.com; s=jan2013; t=1404170354; bh=Bde1GjU26eP1xNvV3fpwGHrQoPE=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:Content-Transfer-Encoding:MIME-Version; b=p+kMmU4OM2fl1xjeZ9JmkNDy57qCowYkefrDYrUH+TjwZSHEjDn2X4stKq1CHelZU 1/mNF32eaHmwVykFswdhXryA6ABIii1tV1nYRtZ/rPcnljrbIxzzApWyHSXXhmso+P jK4U/u2pXoKJm36bY7QeooIFyf4zdA0LFAy8fTDY= X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd01.lss.emc.com s5UNJEpH006353 Received: from mailusrhubprd51.lss.emc.com (mailusrhubprd51.lss.emc.com [10.106.48.24]) by maildlpprd06.lss.emc.com (RSA Interceptor); Mon, 30 Jun 2014 16:18:57 -0700 Received: from mxhub16.corp.emc.com (mxhub16.corp.emc.com [128.222.70.237]) by mailusrhubprd51.lss.emc.com (Sentrion-MTA-4.3.0/Sentrion-MTA-4.3.0) with ESMTP id s5UNIuFB010951 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 30 Jun 2014 19:18:56 -0400 Received: from MXHUB102.corp.emc.com (10.253.58.15) by mxhub16.corp.emc.com (128.222.70.237) with Microsoft SMTP Server (TLS) id 8.3.327.1; Mon, 30 Jun 2014 19:18:56 -0400 Received: from MX104CL01.corp.emc.com ([169.254.7.16]) by MXHUB102.corp.emc.com ([::1]) with mapi id 14.03.0181.006; Mon, 30 Jun 2014 19:18:55 -0400 From: "Rang, Anton" To: Konstantin Belousov , "performance@freebsd.org" Subject: RE: PostgreSQL performance on FreeBSD Thread-Topic: PostgreSQL performance on FreeBSD Thread-Index: AQHPkgc47QChxXd+UUuS516FdEccE5uKTpdQ Date: Mon, 30 Jun 2014 23:18:55 +0000 Message-ID: References: <20140627125613.GT93733@kib.kiev.ua> In-Reply-To: <20140627125613.GT93733@kib.kiev.ua> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.13.52.17] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Sentrion-Hostname: mailusrhubprd51.lss.emc.com X-RSA-Classifications: DLM_1, public X-Mailman-Approved-At: Tue, 01 Jul 2014 00:30:54 +0000 Cc: "current@freebsd.org" X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 23:39:52 -0000 Thanks for this. The cpu_search problem you reference came up here at Isilon as well. Here'= s a patch which should get clang to do the "right thing" (inlining 3 specia= lized copies of cpu_search); I haven't checked to make sure it doesn't hurt= gcc, though. Anton Index: sched_ule.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sched_ule.c (revision 268043) +++ sched_ule.c (working copy) @@ -622,11 +622,11 @@ for ((cpu) =3D 0; (cpu) <=3D mp_maxid; (cpu)++) \ if (CPU_ISSET(cpu, &mask)) =20 -static __inline int cpu_search(const struct cpu_group *cg, struct cpu_sear= ch *low, +static __always_inline int cpu_search(const struct cpu_group *cg, struct c= pu_search *low, struct cpu_search *high, const int match); -int cpu_search_lowest(const struct cpu_group *cg, struct cpu_search *low); -int cpu_search_highest(const struct cpu_group *cg, struct cpu_search *high= ); -int cpu_search_both(const struct cpu_group *cg, struct cpu_search *low, +int __noinline cpu_search_lowest(const struct cpu_group *cg, struct cpu_se= arch *low); +int __noinline cpu_search_highest(const struct cpu_group *cg, struct cpu_s= earch *high); +int __noinline cpu_search_both(const struct cpu_group *cg, struct cpu_sear= ch *low, struct cpu_search *high); =20 /* @@ -640,7 +640,7 @@ * match argument. It is reduced to the minimum set for each case. It is * also recursive to the depth of the tree. */ -static __inline int +static __always_inline int cpu_search(const struct cpu_group *cg, struct cpu_search *low, struct cpu_search *high, const int match) { -----Original Message----- From: owner-freebsd-current@freebsd.org [mailto:owner-freebsd-current@freeb= sd.org] On Behalf Of Konstantin Belousov Sent: Friday, June 27, 2014 7:56 AM To: performance@freebsd.org Cc: current@freebsd.org Subject: PostgreSQL performance on FreeBSD Hi, I did some measurements and hacks to see about the performance and scalabil= ity of PostgreSQL 9.3 on FreeBSD, sponsored by The FreeBSD Foundation. The results are described in https://kib.kiev.ua/kib/pgsql_perf.pdf. The uncommitted patches, referenced in the article, are available as https:= //kib.kiev.ua/kib/pig1.patch.txt https://kib.kiev.ua/kib/patch-2