Re: MMAP Buffers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: MMAP Buffers
Date
Msg-id 29531.1303068534@sss.pgh.pa.us
Whole thread Raw
In response to Re: MMAP Buffers  (Joshua Berkus <josh@agliodbs.com>)
List pgsql-hackers
Joshua Berkus <josh@agliodbs.com> writes:
> I, for one, am glad he did this work.  We've discussed MMAP in the code off and on for years, but nobody wanted to do
thework to test it.  Now someone has, and we can decide whether it's worth pursuing based on the numbers.
 

Well, the troubling issue is that it's not clear whether this patch is
realistic enough to think that performance measurements based on it
are representative of the whole idea of using mmap.  The business of
remapping individual buffers in order to transition them to writable
state seems likely to me to be a huge performance penalty --- first
there's the direct cost of having to incur a kernel call each time we
do that, and second there's the distributed cost of asking the kernel
to manage thousands or millions of tiny mappings.

IOW, if this patch shows little or no performance improvement (as seems
likely to happen at scale), that doesn't prove that mmap in general
isn't potentially interesting, only that this isn't the right way to
approach it.

Still, if you do some tests and don't find a win, that might save time
compared to actually trying to understand and vet the patch ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Joshua Berkus
Date:
Subject: Re: MMAP Buffers
Next
From: Robert Haas
Date:
Subject: Re: MMAP Buffers