From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Christoph Berg <myon@debian.org>
Cc: Jason Petersen <jason@citusdata.com>
Cc: pgsql-pkg-debian@postgresql.org, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x
Date: Tue, 30 May 2017 16:38:52 -0400
Message-ID: <1564.1496176732@sss.pgh.pa.us> (raw)
In-Reply-To: <24279.1496162840@sss.pgh.pa.us>
References: <A37C3A5E-DDEA-40C9-BB67-133B42E4E0A8@citusdata.com>
<980D4281-A01F-4F5D-9874-FFED701F403F@citusdata.com>
<20160426151339.GF12563@msg.df7cb.de>
<20160426153235.GA2862@msg.df7cb.de>
<20160427230516.44fuzdxlifch2wwp@alap3.anarazel.de>
<20160428080824.GA22412@msg.df7cb.de>
<20170529155850.qojdfrwkkqnjb3ap@msg.df7cb.de>
<27883.1496087111@sss.pgh.pa.us>
<20170530161541.koj5xbvvovrrtxtd@alap3.anarazel.de>
<24279.1496162840@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-pkg-debian>
I wrote:
> Very possibly true, but I wish we had some hard facts and not just
> guesses.
As a simple but on-point test, I compared sizes of postgres_fdw.so
built with -fpic and -fPIC. I no longer have access to a wide variety
of weird architectures, but on what I do have in my office:
x86_64, RHEL6:
-fpic:
text data bss dec hex filename
85467 2632 64 88163 15863 postgres_fdw.so
-fPIC:
text data bss dec hex filename
85467 2632 64 88163 15863 postgres_fdw.so
This seems to confirm Andres' opinion that it makes no difference on
x86_64.
PPC, FreeBSD 10.3:
-fpic:
text data bss dec hex filename
86638 420 32 87090 15432 postgres_fdw.so
-fPIC:
text data bss dec hex filename
86474 1860 32 88366 1592e postgres_fdw.so
that's a 1.47% penalty
PPC, NetBSD 5.1.5:
-fpic:
text data bss dec hex filename
81880 420 56 82356 141b4 postgres_fdw.so
-fPIC:
text data bss dec hex filename
81688 2044 56 83788 1474c postgres_fdw.so
that's a 1.74% penalty
HPPA, HPUX 10.20:
-fpic:
text data bss dec hex filename
97253 17296 8 114557 1bf7d postgres_fdw.sl
-fPIC:
text data bss dec hex filename
102629 17320 8 119957 1d495 postgres_fdw.sl
that's a 4.7% penalty
It's somewhat noteworthy that the PPC builds show a large increase in data
segment size. That likely corresponds to relocatable pointer fields that
have to be massaged by the dynamic linker during shlib load. Thus one
could speculate that shlib load might be noticeably slower with -fPIC,
at least on PPC. But people rarely complain about the speed of that
anyway, so it's unlikely to be worth worrying about.
It'd be interesting if people could gather similar numbers on other
platforms of more real-world relevance, such as ppc64. But based on
this small sample, I wouldn't object to just going to -fPIC across
the board.
regards, tom lane
--
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-pkg-debian@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, myon@debian.org, jason@citusdata.com, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x
In-Reply-To: <1564.1496176732@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox