Re: [HACKERS] less expensive pg_buffercache on big shmem

2016-09-29 Thread Heikki Linnakangas
On 09/29/2016 02:45 AM, Ivan Kartyshov wrote: > Secondly, I see this bit added to the loop over buffers: > > if (bufHdr->tag.forkNum == -1) > { > fctx->record[i].blocknum = InvalidBlockNumber; > continue; > } > > and I have no idea why this is needed (when it

Re: [HACKERS] less expensive pg_buffercache on big shmem

2016-09-28 Thread Ivan Kartyshov
Hello everyone, patch was rebased. Thank you Tomas for your reviewing this patch and for your valuable comments. From the very beginning we had the misunderstanding with the naming of meethods. > It'd be really useful if you could provide actual numbers, explain what > metrics you compare

Re: [HACKERS] less expensive pg_buffercache on big shmem

2016-09-28 Thread Robert Haas
On Tue, Sep 20, 2016 at 7:43 PM, Tomas Vondra wrote: > On 09/02/2016 11:01 AM, Robert Haas wrote: >> >> On Fri, Sep 2, 2016 at 8:49 AM, Andres Freund wrote: >>> >>> On 2016-09-02 08:31:42 +0530, Robert Haas wrote: I wonder whether we

Re: [HACKERS] less expensive pg_buffercache on big shmem

2016-09-20 Thread Tomas Vondra
On 09/02/2016 11:01 AM, Robert Haas wrote: On Fri, Sep 2, 2016 at 8:49 AM, Andres Freund wrote: On 2016-09-02 08:31:42 +0530, Robert Haas wrote: I wonder whether we ought to just switch from the consistent method to the semiconsistent method and call it good. +1. I

Re: [HACKERS] less expensive pg_buffercache on big shmem

2016-09-20 Thread Tomas Vondra
On 09/05/2016 06:19 PM, Ivan Kartyshov wrote: On 09/03/2016 05:04 AM, Tomas Vondra wrote: This patch needs a rebase, as 06d7fd6e bumped the version to 1.2. Thank you for a valuable hint. So, will we get a rebased patch? I see the patch is back in 'needs review' but there's no new version.

Re: [HACKERS] less expensive pg_buffercache on big shmem

2016-09-15 Thread Mark Kirkwood
On 02/09/16 15:19, Andres Freund wrote: On 2016-09-02 08:31:42 +0530, Robert Haas wrote: I wonder whether we ought to just switch from the consistent method to the semiconsistent method and call it good. +1. I think, before long, we're going to have to switch away from having locks &

Re: [HACKERS] less expensive pg_buffercache on big shmem

2016-09-05 Thread Ivan Kartyshov
On 09/03/2016 05:04 AM, Tomas Vondra wrote: > This patch needs a rebase, as 06d7fd6e bumped the version to 1.2. Thank you for a valuable hint. > > If we will replace consistent method, then we should replace it with the > > partially consistent method (called "nonconsistent") because: > > 1)

Re: [HACKERS] less expensive pg_buffercache on big shmem

2016-09-02 Thread Tomas Vondra
Hi Ivan, This patch needs a rebase, as 06d7fd6e bumped the version to 1.2. On 09/02/2016 01:38 PM, Ivan Kartyshov wrote: On 09/02/2016 06:01 AM, Robert Haas wrote: I wonder whether we ought to just switch from the consistent method to the semiconsistent method and call it good. I agree with

Re: [HACKERS] less expensive pg_buffercache on big shmem

2016-09-02 Thread Ivan Kartyshov
On 09/02/2016 06:01 AM, Robert Haas wrote: I wonder whether we ought to just switch from the consistent method to the semiconsistent method and call it good. I agree with you that taking every buffer partition lock simultaneously seems like too much locking. And in the future if we replace the

Re: [HACKERS] less expensive pg_buffercache on big shmem

2016-09-02 Thread Robert Haas
On Fri, Sep 2, 2016 at 8:49 AM, Andres Freund wrote: > On 2016-09-02 08:31:42 +0530, Robert Haas wrote: >> I wonder whether we ought to just switch from the consistent method to >> the semiconsistent method and call it good. > > +1. I think, before long, we're going to have to

Re: [HACKERS] less expensive pg_buffercache on big shmem

2016-09-01 Thread Peter Geoghegan
On Thu, Sep 1, 2016 at 8:19 PM, Andres Freund wrote: > On 2016-09-02 08:31:42 +0530, Robert Haas wrote: >> I wonder whether we ought to just switch from the consistent method to >> the semiconsistent method and call it good. > > +1. I think, before long, we're going to have to

Re: [HACKERS] less expensive pg_buffercache on big shmem

2016-09-01 Thread Andres Freund
On 2016-09-02 08:31:42 +0530, Robert Haas wrote: > I wonder whether we ought to just switch from the consistent method to > the semiconsistent method and call it good. +1. I think, before long, we're going to have to switch away from having locks & partitions in the first place. So I don't see a

Re: [HACKERS] less expensive pg_buffercache on big shmem

2016-09-01 Thread Robert Haas
On Wed, Aug 31, 2016 at 8:27 PM, Ivan Kartyshov wrote: > Recently I have finished my work on a patch for pg_buffercache contrib, I > think it's time to share my results. Thanks for sharing your results. > V1.2 implementation contains flexible loop which can collect

[HACKERS] less expensive pg_buffercache on big shmem

2016-08-31 Thread Ivan Kartyshov
Hi hackers, Recently I have finished my work on a patch for pg_buffercache contrib, I think it's time to share my results. Introduction I want to offer you the implementation that allows to decrease system workload by partially sacrificing (fully snapshot consistency) data