Skip site navigation (1) Skip section navigation (2)

Re: A patch for xlog.c

From: Matthew Kirkwood <matthew(at)hairy(dot)beasts(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: A patch for xlog.c
Date: 2001-02-24 20:37:20
Message-ID: Pine.LNX.4.10.10102242017210.15961-200000@sphinx.mythic-beasts.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Sat, 24 Feb 2001, Tom Lane wrote:

> > Here is a patch against 7.1beta5 to use mmap(), and thus a
> > single write, to initialise xlogs.  It may well improve
> > performance of this on platforms/filesystems which write
> > metadata synchronously.
>
> Have you *demonstrated* any actual performance improvement from this?
> How much?  On what platforms?

Forgive me if I posted it to the wrong place -- I was far from
proposing this for inclusion.  It is but a small step on the
way to my plan of mmap()ifying all of the WAL stuff (which may
also prove a waste of effort).

On Linux 2.4 w/asynchronous ext2, it's good for about 5%, which
certainly wouldn't alone be worth the effort.  I tried synchronous
ext2, but the numbers were so poor with both that nobody who cared
about performance would be using it (1.2 sec per file, vs. over a
minute).

I don't have access to any kind machine running UFS/FFS.  Perhaps
someone on the list might do me the favour of trying the attached
test on such a platform with synchronous metadata writes (see top
of file for #ifdefs).

> I don't believe in adding unportable alternative implementations
> without pretty darn compelling reasons ...

mmap() is hardly unportable.  From a quick look, all the current
names in include/port/ (which must surely make up a vast majority
of deployed recent postgresql versions) except QNX and Win32 can
support POSIX mmap.

Thanks for the reply,

Matthew.

Attachment: writetest.c
Description: text/plain (1.5 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2001-02-24 21:01:15
Subject: Re: A patch for xlog.c
Previous:From: Timothy H. KeittDate: 2001-02-24 20:22:33
Subject: Re: offset and limit in update and subselect

pgsql-patches by date

Next:From: Bruce MomjianDate: 2001-02-24 21:01:15
Subject: Re: A patch for xlog.c
Previous:From: Tom LaneDate: 2001-02-24 16:41:06
Subject: Re: A patch for xlog.c

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group