Re: Some questions about PostgreSQL’s design.

From: 陈宗志 <baotiao(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Some questions about PostgreSQL’s design.
Date: 2024-08-22 08:50:16
Message-ID: CAGbZs7iQ098NasJjFXn344iGq+9beVywmfto+muqKR_HrnEpJw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I disagree with the point made in the article. The article mentions
that ‘prevents the kernel from reordering reads and writes to optimize
performance,’ which might be referring to the file system’s IO
scheduling and merging. However, this can be handled within the
database itself, where IO scheduling and merging can be done even
better.

Regarding ‘does not allow free memory to be used as kernel cache,’ I
believe the database itself should manage memory well, and most of the
memory should be managed by the database rather than handed over to
the operating system. Additionally, the database’s use of the page
cache should be restricted.

On Wed, Aug 21, 2024 at 12:55 AM Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> On Tue, Aug 20, 2024 at 04:46:54PM +0300, Heikki Linnakangas wrote:
> > There are pros and cons. With direct I/O, you cannot take advantage of the
> > kernel page cache anymore, so it becomes important to tune shared_buffers
> > more precisely. That's a downside: the system requires more tuning. For many
> > applications, squeezing the last ounce of performance just isn't that
> > important. There are also scaling issues with the Postgres buffer cache,
> > which might need to be addressed first.
> >
> > With double write buffering, there are also pros and cons. It also requires
> > careful tuning. And replaying WAL that contains full-page images can be much
> > faster, because you can write new page images "blindly" without reading the
> > old pages first. We have WAL prefetching now, which alleviates that, but
> > it's no panacea.
>
> 陈宗志, you mimght find this blog post helpful:
>
> https://momjian.us/main/blogs/pgblog/2017.html#June_5_2017
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
> EDB https://enterprisedb.com
>
> Only you can decide what is important to you.

--
---
Blog: http://www.chenzongzhi.info
Twitter: https://twitter.com/baotiao
Git: https://github.com/baotiao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-08-22 08:51:42 Re: Conflict detection and logging in logical replication
Previous Message 陈宗志 2024-08-22 08:49:55 Re: Some questions about PostgreSQL’s design.