Re: A couple of patches for PostgreSQL 64bit support

Lists: pgsql-hackerspgsql-patches
From: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>
To: pgsql-patches(at)postgresql(dot)org
Cc: Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-07 06:47:05
Message-ID: 42CCCFE9.9040809@intellilink.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Hi all,

Here're a couple of patches for PostgreSQL 64bit support. There're just
two extension to 64bit, size of shared memory and transaction ID.

Please take a look at overview.txt for this proposal and pathces, based
upon 8.0.3.

Any discussions are welcome.

--
-------------------------------------------
Koichi Suzuki
Open Source Engineeering Departmeent,
NTT DATA Intellilink Corporation
Phone: +81-3-5566-9628 WWW: http://www.intellilink.co.jp
------------------------------------------

Attachment Content-Type Size
oveerview.txt text/plain 4.6 KB
pg803-shmem64.diff text/plain 14.5 KB
pg803-xid64.tgz application/octet-stream 14.7 KB

From: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>
To: pgsql-patches(at)postgresql(dot)org
Cc: Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-07 06:57:32
Message-ID: 42CCD25C.8000801@intellilink.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Hi, all,

I have posted a couple of patches with regard to 64bit environment
support to PATCHES ml. It expands size of shared memory to 64bit space
and extends XID to 64bit. Please take a look at it.

--
-------------------------------------------
Koichi Suzuki
Open Source Engineeering Departmeent,
NTT DATA Intellilink Corporation
Phone: +81-3-5566-9628 WWW: http://www.intellilink.co.jp
------------------------------------------


From: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>
To:
Cc: pgsql-hackers(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-07 07:54:42
Message-ID: 42CCDFC2.6020100@intellilink.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Hi, all,

I have posted a couple of patches with regard to 64bit environment
support to PATCHES ml. It expands size of shared memory to 64bit space
and extends XID to 64bit. Please take a look at it.

--
-------------------------------------------
Koichi Suzuki
Open Source Engineeering Departmeent,
NTT DATA Intellilink Corporation
Phone: +81-3-5566-9628 WWW: http://www.intellilink.co.jp
------------------------------------------


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>
Cc: pgsql-patches(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-07 13:51:11
Message-ID: 7404.1120744271@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp> writes:
> Here're a couple of patches for PostgreSQL 64bit support. There're just
> two extension to 64bit, size of shared memory and transaction ID.

I asked originally for some experimental evidence showing any value
in having more than 2Gb of shared buffers. In the absence of any
convincing demonstration, I'm not very inclined to worry about whether
we can handle wider-than-int shared memory size.

As for the XID change, I don't think this patch accurately reflects the
size of the impact. There are a lot of things that in practice need to
be the same size as XID (CID, most obviously, but I suspect also OID).
And again, some demonstration of the performance impact would be
appropriate. Here, not only do you have to prove that widening XID
isn't a big performance hit in itself, but you also have to convince
us that it's a win compared to the existing approach of vacuuming at
least every billion transactions.

regards, tom lane


From: Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-07 16:23:40
Message-ID: 42CD570C.3000103@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp> writes:
>
>>Here're a couple of patches for PostgreSQL 64bit support. There're just
>>two extension to 64bit, size of shared memory and transaction ID.
>
>
> I asked originally for some experimental evidence showing any value
> in having more than 2Gb of shared buffers. In the absence of any
> convincing demonstration, I'm not very inclined to worry about whether
> we can handle wider-than-int shared memory size.

There is some practical evidence. Recently the number of large boxes in
the field is almost growing exponentially. Today I have heard somebody
say "this box has 'just 4 gig of ram' ".
On large installations we have already seen problems with too small
caches (= 2gb).
Surprisingly this has turned out to be a quite important issue in the
field. Tests have shown that the cache provided by the OS is a lot worse
for the database.

64-bit XIDs seem to be an overkill - the only practical impact I can see
is an even larger tuple header (this can be an issue on large boxes too
- at least compared to Oracle).

Best regards,

Hans


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
Cc: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-07 16:35:36
Message-ID: 16399.1120754136@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <postgres(at)cybertec(dot)at> writes:
> There is some practical evidence. Recently the number of large boxes in
> the field is almost growing exponentially. Today I have heard somebody
> say "this box has 'just 4 gig of ram' ".
> On large installations we have already seen problems with too small
> caches (= 2gb).
> Surprisingly this has turned out to be a quite important issue in the
> field. Tests have shown that the cache provided by the OS is a lot worse
> for the database.

*What* tests? This is all handwaving :-(

What I would find credible is a set of, say, OSDL test runs, showing a
continuing increase of performance with shared_buffers right up to the
2Gb limit. Everything done to date says that you hit the point of
diminishing returns well before that.

regards, tom lane


From: Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-07 16:54:28
Message-ID: 42CD5E44.8060101@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> =?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <postgres(at)cybertec(dot)at> writes:
>
>>There is some practical evidence. Recently the number of large boxes in
>>the field is almost growing exponentially. Today I have heard somebody
>>say "this box has 'just 4 gig of ram' ".
>>On large installations we have already seen problems with too small
>>caches (= 2gb).
>>Surprisingly this has turned out to be a quite important issue in the
>>field. Tests have shown that the cache provided by the OS is a lot worse
>>for the database.
>
>
> *What* tests? This is all handwaving :-(
>
> What I would find credible is a set of, say, OSDL test runs, showing a
> continuing increase of performance with shared_buffers right up to the
> 2Gb limit. Everything done to date says that you hit the point of
> diminishing returns well before that.
>
> regards, tom lane

well, you can easily try it on a big machine with gigs of ram and
nothing but the database running. using a very low number of shared
buffers will lead to worse performance than many shared buffers - even
if the operating system caches some disk i/O (which is done by linux if
nobody else want to have some ram). i have no public hard figures i
could post here but customers have told me that 2Q cache vs. kernel
cache is around 5-10 times faster (it varies of course).

the 2gb thing is especially important for data crunchers - not
necessarily for 'normal' OLTP databases. just assume somebody getting 5
gig of data and doing some repeated computation with this data. you
definitely don't want to go to disk in this case. people will assume
that postgresql can work with large caches ("it is a good database - why
do i get errors on startup" - this is the usual story). people rather
tend to rely on PostgreSQL than on some operating system thing ;).

i might have some time to provide some real hard facts to prove this but
i am a bit busy at the moment.

best regards,

hans


From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Wieck <JanWieck(at)yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-07 16:58:02
Message-ID: 200507070958.02681.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Koichi,

> I have posted a couple of patches with regard to 64bit environment
> support to PATCHES ml. It expands size of shared memory to 64bit space
> and extends XID to 64bit. Please take a look at it.

In case you weren't aware, feature freeze was last Friday. So your patch is
liable to remain in the queue for a while before anyone looks at it.

Incidentally, what about 64-bit support for work_mem and maintenance_work_mem?
64bit shared_mem support isn't that needed *yet* (I've yet to see a server
use more than 500mb of the shared_mem) but being able to allocate 6GB to
index creation would be very useful.

I take it extending the XID to 64bit is intended to postpone the need for
vacuuming even in a high-activity database? Have you tested whether there
are any performance effects?

--
Josh Berkus
Aglio Database Solutions
San Francisco


From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of p.tches for PostgreSQL 64bit support
Date: 2005-07-07 17:11:21
Message-ID: 20050707171120.GB10035@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Thu, Jul 07, 2005 at 06:23:40PM +0200, Hans-Jürgen Schönig wrote:
> Tom Lane wrote:
> >Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp> writes:
> >
> >>Here're a couple of patches for PostgreSQL 64bit support. There're just
> >>two extension to 64bit, size of shared memory and transaction ID.
> >
> >
> >I asked originally for some experimental evidence showing any value
> >in having more than 2Gb of shared buffers. In the absence of any
> >convincing demonstration, I'm not very inclined to worry about whether
> >we can handle wider-than-int shared memory size.
>
> There is some practical evidence. Recently the number of large boxes in
> the field is almost growing exponentially. Today I have heard somebody
> say "this box has 'just 4 gig of ram' ".

Yes, but the point is if it's a good idea to have that many shared
buffers. Is there a measurable difference between that, and leaving the
extra memory for the kernel to manage cache? Remember that there have
been measurements that showed, for previous releases, that having shared
buffers set too high was detrimental to performance. So the first thing
to do is present results showing that this is no longer true.

This could very well be the case, because of the rewriting of the buffer
manager.

--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"El destino baraja y nosotros jugamos" (A. Schopenhauer)


From: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-08 00:36:10
Message-ID: 42CDCA7A.2030607@intellilink.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

I have some experimeltal data about this extension. I will gather it
and post hopefully this weekend.

Tom Lane wrote:
> Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp> writes:
>
>>Here're a couple of patches for PostgreSQL 64bit support. There're just
>>two extension to 64bit, size of shared memory and transaction ID.
>
>
> I asked originally for some experimental evidence showing any value
> in having more than 2Gb of shared buffers. In the absence of any
> convincing demonstration, I'm not very inclined to worry about whether
> we can handle wider-than-int shared memory size.
>
> As for the XID change, I don't think this patch accurately reflects the
> size of the impact. There are a lot of things that in practice need to
> be the same size as XID (CID, most obviously, but I suspect also OID).
> And again, some demonstration of the performance impact would be
> appropriate. Here, not only do you have to prove that widening XID
> isn't a big performance hit in itself, but you also have to convince
> us that it's a win compared to the existing approach of vacuuming at
> least every billion transactions.
>
> regards, tom lane
>

--
-------------------------------------------
Koichi Suzuki
Open Source Engineeering Departmeent,
NTT DATA Intellilink Corporation
Phone: +81-3-5566-9628 WWW: http://www.intellilink.co.jp
------------------------------------------


From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
To: postgres(at)cybertec(dot)at, pgsql-patches(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-08 00:38:07
Message-ID: 20050708093449.3CC4.ITAGAKI.TAKAHIRO@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Hans-J|rgen Schvnig <postgres(at)cybertec(dot)at> wrote:

> 64-bit XIDs seem to be an overkill - the only practical impact I can see
> is an even larger tuple header (this can be an issue on large boxes too
> - at least compared to Oracle).

I agreed, too. The changes of XIDs cannot be ignored because the overhead
will be 32bytes per tuple.

Avoiding overheads, can XIDs/CIDs be different bit length? For example,
can XIDs/CIDs be changed to 48/16-bit or 40/24-bit?

---
ITAGAKI Takahiro
NTT Cyber Space Laboratories


From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: postgres(at)cybertec(dot)at, pgsql-patches(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of p.tches for PostgreSQL 64bit support
Date: 2005-07-08 02:37:04
Message-ID: 20050708023704.GA29807@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Fri, Jul 08, 2005 at 09:38:07AM +0900, ITAGAKI Takahiro wrote:
> Hans-J|rgen Schvnig <postgres(at)cybertec(dot)at> wrote:
>
> > 64-bit XIDs seem to be an overkill - the only practical impact I can see
> > is an even larger tuple header (this can be an issue on large boxes too
> > - at least compared to Oracle).
>
> I agreed, too. The changes of XIDs cannot be ignored because the overhead
> will be 32bytes per tuple.
>
> Avoiding overheads, can XIDs/CIDs be different bit length? For example,
> can XIDs/CIDs be changed to 48/16-bit or 40/24-bit?

Not unless you change the definition of HeapTupleFields
(src/include/access/htup.h). Alignment concerns would probably bite you
if you changed it, anyway.

--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"Ninguna manada de bestias tiene una voz tan horrible como la humana" (Orual)


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>, postgres(at)cybertec(dot)at, pgsql-patches(at)postgresql(dot)org, Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of p.tches for PostgreSQL 64bit support
Date: 2005-07-08 03:03:40
Message-ID: 7162.1120791820@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> On Fri, Jul 08, 2005 at 09:38:07AM +0900, ITAGAKI Takahiro wrote:
>> Avoiding overheads, can XIDs/CIDs be different bit length? For example,
>> can XIDs/CIDs be changed to 48/16-bit or 40/24-bit?

> Not unless you change the definition of HeapTupleFields
> (src/include/access/htup.h). Alignment concerns would probably bite you
> if you changed it, anyway.

I don't think we could feasibly reduce the width of CID anyway; we've
already seen a few complaints of people overrunning 2^32 commands per
transaction, and surely this is a bigger rather than a lesser concern
if you are thinking of large databases.

It probably would be possible to keep CID at 32 bits and lay out the
HeapTupleHeader so that you only pay for three, not four, 64-bit
fields ... but that's still twelve bytes added per tuple.

regards, tom lane


From: Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>, postgres(at)cybertec(dot)at, pgsql-patches(at)postgresql(dot)org, Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of p.tches for PostgreSQL 64bit support
Date: 2005-07-11 03:13:20
Message-ID: 42D1E3D0.6060706@nttdata.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Hi guys,

BTW, I found the work_mem is still limited to 2GB.

If we support 64bit shared memory, we also need to support
64bit work_mem.

Thanks.
--
NAGAYASU Satoshi <nagayasus(at)nttdata(dot)co(dot)jp>


From: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>
To: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-12 09:11:40
Message-ID: 42D3894C.4040604@intellilink.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Hi,

Attached is a result of pgbench with 64bit patch PostgreSQL (base is
8.0.1). Benchmark machine is dual opteron (1.4GHz, 1MB cache each) with
8GB of memory and 120GB of IDE hard disk.

Koichi Suzuki wrote:
> I have some experimeltal data about this extension. I will gather it
> and post hopefully this weekend.

--
-------------------------------------------
Koichi Suzuki
Open Source Engineeering Departmeent,
NTT DATA Intellilink Corporation
Phone: +81-3-5566-9628 WWW: http://www.intellilink.co.jp
------------------------------------------

Attachment Content-Type Size
64-bit-pgbench20050712.pdf application/pdf 18.7 KB

From: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-14 09:05:35
Message-ID: 42D62ADF.5040708@intellilink.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches


> I asked originally for some experimental evidence showing any value
> in having more than 2Gb of shared buffers. In the absence of any
> convincing demonstration, I'm not very inclined to worry about whether
> we can handle wider-than-int shared memory size.

Hi,

Attached is a result of pgbench with 64bit patch PostgreSQL (base is
8.0.1). Benchmark machine is dual opteron (1.4GHz, 1MB cache each) with
8GB of memory and 120GB of IDE hard disk.

Koichi Suzuki wrote:

>> I have some experimeltal data about this extension. I will gather it
>> and post hopefully this weekend.

-------------------------------------------
Koichi Suzuki
Open Source Engineeering Departmeent,
NTT DATA Intellilink Corporation
Phone: +81-3-5566-9628 WWW: http://www.intellilink.co.jp
------------------------------------------

Attachment Content-Type Size
64-bit-pgbench20050712.pdf application/pdf 18.7 KB

From: Mark Wong <markw(at)osdl(dot)org>
To: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-18 23:01:25
Message-ID: 200507182301.j6IN15jA019174@smtp.osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Hi,

I grabbed the patches to try, but I was wondering if it would be more
interesting to try them against CVS rather than 8.0.3 (and if it would
be easy to port :)?

Mark


From: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>
To: Mark Wong <markw(at)osdl(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of patches for PostgreSQL 64bit support
Date: 2005-07-20 00:44:26
Message-ID: 42DD9E6A.2070804@intellilink.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Mark,

I've not seen CVS in detail. I begain this work against 8.0.1 and
continued thru 8.0.2 to 8.0.3. It was not a great work. The patch is
rather straightforward and I appreciate if you try to port against CVS.

Mark Wong wrote:
> Hi,
>
> I grabbed the patches to try, but I was wondering if it would be more
> interesting to try them against CVS rather than 8.0.3 (and if it would
> be easy to port :)?
>
> Mark
>

--
-------------------------------------------
Koichi Suzuki
Open Source Engineeering Departmeent,
NTT DATA Intellilink Corporation
Phone: +81-3-5566-9628 WWW: http://www.intellilink.co.jp
------------------------------------------


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>
Cc: pgsql-patches(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of patches for PostgreSQL 64bit support
Date: 2005-08-20 23:40:02
Message-ID: 17064.1124581202@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp> writes:
> Here're a couple of patches for PostgreSQL 64bit support. There're just
> two extension to 64bit, size of shared memory and transaction ID.

I've applied the part of this that seemed reasonably noncontroversial,
namely the fixes to do shared memory size calculation in size_t
arithmetic instead of int arithmetic. (While at it, I extended the Size
convention to all the shared memory sizing routines, not just buffers,
and added code to detect overflows in the calculations. That way we
don't need a "64 bit" configure switch.) While I still remain
unconvinced that there's any real-world need for more than 2Gb of
shared_buffers, this change certainly makes the code more robust against
configuration errors, and it has essentially zero cost (except maybe a
few more milliseconds during postmaster start).

On the other hand, I think the 64-bit XID idea needs considerably more
work before being proposed again. That would incur serious costs due
to the expansion of tuple headers, and there's no evidence that the
distributed cost would be bought back by avoiding one vacuum pass every
billion transactions. (Your description of the patch claimed that
vacuuming requires shutting down the database, which is simply wrong.)
Also, as previously noted, you can't just whack the size of XID around
without considering side-effects on CID, OID, Datum, etc.

regards, tom lane


From: Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, ikubo(at)intellilink(dot)co(dot)jp, yasunaga <yasunaga(dot)hisato(at)soft(dot)fujitsu(dot)com>, Bruce Momjian <root(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, sakata(dot)tetsuo(at)lab(dot)ntt(dot)co(dot)jp, "T(dot)Honishi" <honishi(dot)takashi(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: A couple of patches for PostgreSQL 64bit support
Date: 2005-09-02 10:36:42
Message-ID: 43182B3A.5070002@intellilink.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Thanks a lot for the port to CVS.

I agree that we need more benckmark efforts to clarify real outcome of
"more than 2GB" memory. Please let me spend some more for this. I
will post benchmark results. As long as I see from pgbench, it looks
more memory gets more throuput. Maybe big SQL against big dataset is
another example to show the effect.

I also agree that we need much more study to show the effect of 64bit
TID (and perhaps CID). Based on the patch I posted, I'll continue my
effort and also post the results for discussion.

Best Regards;

Tom Lane wrote:
> Koichi Suzuki <koichi(at)intellilink(dot)co(dot)jp> writes:
>
>>Here're a couple of patches for PostgreSQL 64bit support. There're just
>>two extension to 64bit, size of shared memory and transaction ID.
>
>
> I've applied the part of this that seemed reasonably noncontroversial,
> namely the fixes to do shared memory size calculation in size_t
> arithmetic instead of int arithmetic. (While at it, I extended the Size
> convention to all the shared memory sizing routines, not just buffers,
> and added code to detect overflows in the calculations. That way we
> don't need a "64 bit" configure switch.) While I still remain
> unconvinced that there's any real-world need for more than 2Gb of
> shared_buffers, this change certainly makes the code more robust against
> configuration errors, and it has essentially zero cost (except maybe a
> few more milliseconds during postmaster start).
>
> On the other hand, I think the 64-bit XID idea needs considerably more
> work before being proposed again. That would incur serious costs due
> to the expansion of tuple headers, and there's no evidence that the
> distributed cost would be bought back by avoiding one vacuum pass every
> billion transactions. (Your description of the patch claimed that
> vacuuming requires shutting down the database, which is simply wrong.)
> Also, as previously noted, you can't just whack the size of XID around
> without considering side-effects on CID, OID, Datum, etc.
>
> regards, tom lane
>

--
-------------------------------------------
Koichi Suzuki
Open Source Engineeering Departmeent,
NTT DATA Intellilink Corporation
Phone: +81-3-5566-9628 WWW: http://www.intellilink.co.jp
------------------------------------------