Re: [PATCH v4] parallel pg_restore: avoid disk seeks when jumping short distance forward - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH v4] parallel pg_restore: avoid disk seeks when jumping short distance forward
Date
Msg-id 382528.1760999007@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH v4] parallel pg_restore: avoid disk seeks when jumping short distance forward  (Dimitrios Apostolou <jimis@gmx.net>)
Responses Re: [PATCH v4] parallel pg_restore: avoid disk seeks when jumping short distance forward
List pgsql-hackers
Dimitrios Apostolou <jimis@gmx.net> writes:
> Thanks for the extensive testing! Did you see the same syscall pattern in strace output, as I did?

Yes, I did look at that, and it's the same as you saw:
HEAD repeats

        read(4k)
        lseek(~128k forward)

which is to be expected if we have to read data block headers
that are ~128K apart; while patched repeats

         read(4k)
         read(~128k)

which is a bit odd in itself, why isn't it merging the reads better?

> I was using an HDD,

Ah.  Your original message mentioned NVMe so I was assuming you
were also looking at solid-state drives.  I can imagine that
seeking is more painful on HDDs ...

            regards, tom lane



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Logical Replication of sequences
Next
From: Mihail Nikalayeu
Date:
Subject: Re: isolation tester limitation in case of multiple injection points in a single command