Re: [PATCH v4] parallel pg_restore: avoid disk seeks when jumping short distance forward
| От | Tom Lane | 
|---|---|
| Тема | Re: [PATCH v4] parallel pg_restore: avoid disk seeks when jumping short distance forward | 
| Дата | |
| Msg-id | 381756.1760998513@sss.pgh.pa.us обсуждение исходный текст  | 
		
| Ответ на | Re: [PATCH v4] parallel pg_restore: avoid disk seeks when jumping short distance forward (Tom Lane <tgl@sss.pgh.pa.us>) | 
| Ответы | 
                	
            		Re: [PATCH v4] parallel pg_restore: avoid disk seeks when jumping short distance forward
            		
            		 | 
		
| Список | pgsql-hackers | 
I wrote:
> So for me, the proposed patch actually makes it 2X slower.
I went and tried this same test case on a 2024 Mac Mini M4 Pro.
Cutting to the chase:
HEAD:
$ time pg_restore -f /dev/null -t zedtable bench10000.dump
real    1m26.525s
user    0m0.364s
sys     0m6.806s
Patched:
$ time pg_restore -f /dev/null -t zedtable bench10000.dump
real    0m15.419s
user    0m0.279s
sys     0m8.224s
So on this hardware it *does* win (although maybe things would
be different for a parallel restore).  The patched pg_restore
takes just about the same amount of time as "cat", and iostat
shows both of them reaching a bit more than 6GB/s read speed.
My feeling at this point is that we'd probably drop the block
size test as irrelevant, and instead simply ignore ctx->hasSeek
within this loop if we think we're on a platform where that's
the right thing.  But how do we figure that out?
Not sure where we go from here, but clearly a bunch of research
is going to be needed to decide whether this is committable.
            regards, tom lane
		
	В списке pgsql-hackers по дате отправления: