From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Should io_method=worker remain the default? |
Date: | 2025-09-03 22:22:46 |
Message-ID: | CA+hUKG+Ntah3r_rkCYvVP-O4-ajGKbFh-wU8S9-U2orQrQ-L_w@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Sep 4, 2025 at 6:50 AM Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> I like the idea of some kind of fallback for multiple reasons. I
> noticed that if I set io_workers=1, and then I SIGSTOP that worker,
> then sequential scans make no progress at all until I send SIGCONT. A
> fallback to synchronous sounds more robust, and more similar to what we
> do with walwriter and bgwriter. (That may be 19 material, though.)
This seems like a non-problem. Robustness against SIGSTOP of random
backends is not a project goal or reasonable goal, is it? You can
SIGSTOP a backend doing IO in any historical release, possibly
blocking other backends too based on locks etc etc.
That said, it is quite reasonable to ask why it doesn't just start a
new worker, and that's just code maturity:
* I have a patch basically ready to commit for v19 (CF #5913) that
would automatically add more workers if you did that. But even then
you could be unlucky and SIGSTOP a worker while it holds the
submission queue lock.
* I also had experimental versions that use a lock free queue, but it
didn't seem necessary given how hard it is to measure meaningful lock
contention so far; I guess it must be easier on a NUMA system and one
might wonder about per-NUMA-node queues, but that also feels a bit
questionable because if you had a very high end system you'd probably
be looking into better tuning including io_method=io_uring.
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2025-09-03 22:47:34 | Re: Should io_method=worker remain the default? |
Previous Message | postgresql.cache976 | 2025-09-03 22:17:01 | [PG19-3 PATCH] Don't ignore passfile |