From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Sokolov Yura <funny(dot)falcon(at)postgrespro(dot)ru>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Increase Vacuum ring buffer. |
Date: | 2017-07-20 16:52:09 |
Message-ID: | CAMkU=1ziPhBJD-XJNGjLBcowddN3-ior3dz80dpVdqqgL342kQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jul 20, 2017 at 7:59 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> >
> > Initially I wanted to make BAS_BULKWRITE and BAS_VACUUM ring sizes
> > configurable, but after testing I don't see much gain from increasing
> > ring buffer above 16MB. So I propose just 1 line change.
>
> I think the question for this patch is "so, why didn't we do it this
> way originally?".
>
> It's no secret that making the ring buffer larger will improve
> performance -- in fact, not having a ring buffer at all would improve
> performance even more. But it would also increase the likelihood that
> the background work of vacuum would impact the performance of
> foreground operations, which is already a pretty serious problem that
> we probably don't want to make worse.
But having a very fast sequence of fdatasync calls is not terribly friendly
to the performance of the foreground operations, either.
I think the reason we didn't do it this way originally is tied the same
reason that autovacuum_vacuum_cost_delay = 20ms by default. If we want it
to be heavily throttled, there isn't much point in using a larger ring
buffer. It is just wasted space. Maybe we could have it start out at
BAS_VACUUM's default size, then grow by one buffer every time it had to
issue a WAL sync, until it reached BAS_BULKWRITE's size where it would max
out.
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2017-07-20 17:20:45 | Re: [WIP] Zipfian distribution in pgbench |
Previous Message | Alik Khilazhev | 2017-07-20 16:49:01 | Re: [WIP] Zipfian distribution in pgbench |