RE: COPY performance on Windows - Mailing list pgsql-hackers

From Ryohei Takahashi (Fujitsu)
Subject RE: COPY performance on Windows
Date
Msg-id TY3PR01MB1189186455D964F8359044600823B2@TY3PR01MB11891.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: COPY performance on Windows  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi,


Thank you for your reply.
I tried your patch and report in this e-mail.

> 1.  Those code paths finish up in pg_pwritev(), but it has a loop over
> 8kb writes on Windows.  Does it help if we just make "zbuffer" bigger?
>  How big?

This patch improves the performance.

I applied 0001-Use-bigger-writes-in-pg_pwrite_zeros-on-Windows.patch over REL_16_6.
I changed the value "zbuffer" from 2 to 32.
I measured with nclients = 1.

16.6:                      453s
16.6 + patch (zbuffer = 2):  442s
16.6 + patch (zbuffer = 4):  434s
16.6 + patch (zbuffer = 8):  430s
16.6 + patch (zbuffer = 16): 429s
16.6 + patch (zbuffer = 32): 428s


Performance improved up to 8KB and remained stable after that.


> 2.  While pondering the goals of posix_fallocate(), I had a
> realisation about how we might implement FileFallocate() on Windows.
> Does this idea work?  Well?

This patch degrades the performance.

16.6:         453s
16.6 + patch: 479s


Regards,
Ryohei Takahashi


pgsql-hackers by date:

Previous
From: Junwang Zhao
Date:
Subject: Re: SQL Property Graph Queries (SQL/PGQ)
Next
From: "Ryohei Takahashi (Fujitsu)"
Date:
Subject: RE: COPY performance on Windows