Re: Change prefetch and read strategies to use range in pg_prewarm ... and raise a question about posix_fadvise WILLNEED

2024-03-07 Thread Cédric Villemain
Hi Nazir, On 07/03/2024 12:19, Nazir Bilal Yavuz wrote: On Wed, 6 Mar 2024 at 18:23, Cédric Villemain wrote: The behavior is 100% OK, and in fact it might a bad idea to prefetch block by block as the result is just to put more pressure on a system if it is already under pressure. Though

Re: Change prefetch and read strategies to use range in pg_prewarm ... and raise a question about posix_fadvise WILLNEED

2024-03-06 Thread Cédric Villemain
status, or you ensure to clean it first. [1] https://man7.org/linux/man-pages/man2/posix_fadvise.2.html#DESCRIPTION [2] https://elixir.bootlin.com/linux/latest/source/mm/readahead.c#L303 My apologize about the email address with sub-address which leads to undelivered email. Please update with the current one. --- Cédric Villemain +33 (0)6 20 30 22 52 https://Data-Bene.io PostgreSQL Expertise, Support, Training, R&D

linux cachestat in file Readv and Prefetch

2024-01-17 Thread Cédric Villemain
interest to go further in this direction. --- Cédric Villemain +33 (0)6 20 30 22 52 https://Data-Bene.io PostgreSQL Expertise, Support, Training, R&D From 4cdc5e952e0cd729bde472bdc3d7ff7bbc3009ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Villemain?= Date: Thu, 18 Jan 2024 01:00:37 +0

Re: Extension Enhancement: Buffer Invalidation in pg_buffercache

2024-01-14 Thread Cédric Villemain
:25 AM, Cédric Villemain wrote: Hi Palak, I did a quick review of the patch: +CREATE FUNCTION pg_buffercache_invalidate(IN int, IN bool default true) +RETURNS bool +AS 'MODULE_PATHNAME', 'pg_buffercache_invalidate' +LANGUAGE C PARALLEL SAFE; --> Not enforced anywhere,

Re: doing also VM cache snapshot and restore with pg_prewarm, having more information of the VM inside PostgreSQL

2024-01-05 Thread Cédric Villemain
t proposing that PostgreSQL handles those tasks transparently or itself, but offering options to the users via extensions like we do with pg_prewarm and pg_buffercache. It's just the same for virtual memory/filesystem. --- Cédric Villemain +33 (0)6 20 30 22 52 https://Data-Bene.io PostgreSQL Expertise, Support, Training, R&D

Re: Extension Enhancement: Buffer Invalidation in pg_buffercache

2024-01-03 Thread Cédric Villemain
} +    else +    { +        UnlockBufHdr(bufHdr, buf_state); +        return false; +    } Maybe safe to remove the else {} ... Maybe more tempting to start the big if with the following instead less nested...): +    if ((buf_state & BM_VALID) != BM_VALID) +    { +        UnlockBufHdr(bufHdr, buf

Re: Streaming I/O, vectored I/O (WIP)

2023-12-30 Thread Cédric Villemain
s patches here: * to use range prefetch in pg_prewarm (smgrprefetch only at the moment, using smgrreadv to come next). * to support nblocks=0 in smgrprefetch (posix_fadvise supports a len=0 to apply flag from offset to end of file). Should I add to commitfest ? --- Cédric Villemain +33 (0)6 20 3

Re: Extension Enhancement: Buffer Invalidation in pg_buffercache

2023-11-22 Thread Cédric Villemain
counts', 0, true, true, B'111000'); relpath | os_page_size | os_pages_free | pages_loaded | pages_unloaded --+--+---+--+ base/11874/16447 | 4096 |408376 |3 | 3 ---