Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rVhcG-000p16-EZ for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Feb 2024 00:41:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rVhcF-008fe5-Dp for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Feb 2024 00:41:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rVhcE-008fdx-9K for pgsql-hackers@lists.postgresql.org; Fri, 02 Feb 2024 00:41:11 +0000 Received: from mail.clear-code.com ([2401:2500:102:3039:153:126:206:245]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rVhc9-004bw1-Vf for pgsql-hackers@postgresql.org; Fri, 02 Feb 2024 00:41:09 +0000 Received: from localhost (unknown [IPv6:2404:7a80:89c1:1200:6af9:2266:1443:f149]) by mail.clear-code.com (Postfix) with ESMTPSA id 454DB614700; Fri, 2 Feb 2024 09:40:59 +0900 (JST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.clear-code.com 454DB614700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=clear-code.com; s=default; t=1706834459; bh=4NToyBVbG+kstPZn4qtimpLTqje1JhI+jCsyGMpx6ZA=; h=Date:To:Cc:Subject:From:In-Reply-To:References:From; b=Jlds9BkC9KJaNN+DvYiuq9CfB3hXJ1QvKKeVRanyrrE0/NHZzBHxUVnBYIGbc8bqB zEXbx2sE47RjCx1FjopReMH956jN16DgTLDtDx1OZb3wWEnyOAlEa793nIOkm2aJ9l uu1XCBw9FjU9ZtQJrMjcMY9usB5Jd0ipAfoXgBto= Date: Fri, 02 Feb 2024 09:40:56 +0900 (JST) Message-Id: <20240202.094056.2076796621253456531.kou@clear-code.com> To: michael@paquier.xyz Cc: sawada.mshk@gmail.com, zhjwpku@gmail.com, andrew@dunslane.net, nathandbossart@gmail.com, pgsql-hackers@postgresql.org Subject: Re: Make COPY format extendable: Extract COPY TO format implementations From: Sutou Kouhei In-Reply-To: References: <20240202.001951.2021771265443873668.kou@clear-code.com> X-Mailer: Mew version 6.8 on Emacs 29.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 454DB614700 X-Rspamd-Server: mail.clear-code.com X-Spamd-Result: default: False [2.90 / 999.00]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:2518, ipnet:2404:7a80::/29, country:JP]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; TAGGED_RCPT(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; URIBL_BLOCKED(0.00)[localhost:helo,paquier.xyz:email]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,dunslane.net,postgresql.org]; RCPT_COUNT_FIVE(0.00)[6]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; SURBL_MULTI_FAIL(0.00)[paquier.xyz:server fail,localhost:server fail] X-Rspamd-Action: no action List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Fri, 2 Feb 2024 06:51:02 +0900, Michael Paquier wrote: > On Fri, Feb 02, 2024 at 12:19:51AM +0900, Sutou Kouhei wrote: >> Here are some numbers on my local machine (Note that my >> local machine isn't suitable for benchmark as I said >> before. Each number is median of "\watch 15" results): >>> >> I'll measure again on my local machine later. I'll stop >> other processes such as Web browser, editor and so on as >> much as possible when I do. > > Thanks for compiling some numbers. This is showing a lot of variance. > Expecially, these two lines in table 2 are showing surprising results > for v7: > direction format n_columns master v7 v10 > from csv 1 917.973 1695.401 871.991 > from binary 1 841.104 1422.012 820.786 Here are more numbers: 1: direction format n_columns master v7 v10 to text 1 1053.844 978.998 956.575 to csv 1 1091.316 1020.584 1098.314 to binary 1 1034.685 969.224 980.458 to text 10 4216.264 3886.515 4111.417 to csv 10 4649.228 4530.882 4682.988 to binary 10 4219.228 4189.99 4211.942 from text 1 851.697 896.968 890.458 from csv 1 890.229 936.231 887.15 from binary 1 784.407 817.07 938.736 from text 10 2549.056 2233.899 2630.892 from csv 10 2809.441 2868.411 2895.196 from binary 10 2985.674 3027.522 3397.5 2: direction format n_columns master v7 v10 to text 1 1013.764 1011.968 940.855 to csv 1 1060.431 1065.468 1040.68 to binary 1 1013.652 1009.956 965.675 to text 10 4411.484 4031.571 3896.836 to csv 10 4739.625 4715.81 4631.002 to binary 10 4374.077 4357.942 4227.215 from text 1 955.078 922.346 866.222 from csv 1 1040.717 986.524 905.657 from binary 1 849.316 864.859 833.152 from text 10 2703.209 2361.651 2533.992 from csv 10 2990.35 3059.167 2930.632 from binary 10 3008.375 3368.714 3055.723 3: direction format n_columns master v7 v10 to text 1 1084.756 1003.822 994.409 to csv 1 1092.4 1062.536 1079.027 to binary 1 1046.774 994.168 993.633 to text 10 4363.51 3978.205 4124.359 to csv 10 4866.762 4616.001 4715.052 to binary 10 4382.412 4363.269 4213.456 from text 1 852.976 907.315 860.749 from csv 1 925.187 962.632 897.833 from binary 1 824.997 897.046 828.231 from text 10 2591.07 2358.541 2540.431 from csv 10 2907.033 3018.486 2915.997 from binary 10 3069.027 3209.21 3119.128 Other processes are stopped while I measure them. But I'm not sure these numbers are more reliable than before... > I am going to try to plug in some rusage() calls in the backend for > the COPY paths. I hope that gives more precision about the backend > activity. I'll post that with more numbers. Thanks. It'll help us. -- kou