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.96) (envelope-from ) id 1w4X7Z-002HuK-28 for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2026 04:42:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w4X7X-00FK42-1D for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2026 04:42:31 +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.96) (envelope-from ) id 1w4X7W-00FK3t-34 for pgsql-hackers@lists.postgresql.org; Mon, 23 Mar 2026 04:42:31 +0000 Received: from mail-dl1-x1243.google.com ([2607:f8b0:4864:20::1243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w4X7V-00000000Z9d-2hRO for pgsql-hackers@postgresql.org; Mon, 23 Mar 2026 04:42:30 +0000 Received: by mail-dl1-x1243.google.com with SMTP id a92af1059eb24-1271257ae53so4130731c88.1 for ; Sun, 22 Mar 2026 21:42:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774240949; cv=none; d=google.com; s=arc-20240605; b=al2Hu1wlD6isw9u9WhHCv6YcHff4ysuK0ia8A6rnDdFS/1KZJKZwUwRFaQP+2DPFbM LqplRzWHWyEyRo91JhLU8B7GmDqxe+dNuQ8BJLRpgp/HwnoRwJkCiQQBfs9wMsGpkuJu 8gVF5uKIbXNJCjSD9ZJNyfnGtpFficprywTi0LDQ58uMpBvhfO+ylsg9pPOlKQt7w9Ur eDhTbCT/E2MUj0iLXj0Cu7+PdNe5cNvUdd8i8/pEiu7umv200fqlRLR9m128e6one2mU VZaGPZzT+KlFDYwF7L2xC1roj1AxcJm7icW//9XfXeYoFR5CNtAEeFKNRDDhKQKp2Ba+ pRYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=wBrsHkCQW45dKnheHIM7Xo9eCHJoY+HKDKvShVcUNTI=; fh=FBiHKjYlMRRTbUqPLi6xEs1cHaI94KhPOXSTvXPDVLg=; b=XygnM3EgSV9l+xDDTbUgdvjn/fMpBRi3fEqLjFfJp7cxyFUInjXikMO/IpJ5C5By0d v7d8BJ1rXjvOZHiURA1JSv/vwOjHVYSqDC4MpXZZNBBhwrlBW5QVgbvsh6fvuEw+jvZ4 pAP9RfoLEVa98QA78jSp4LugR3l4ElGm1GyavIODwNqJnW8DmV5mXrqjOxSaVAsYLjUq 3ksCAdNmuQ0e9X8acvj5p5XPf+cHVfVM2tYsknpl1CwefaJ6Mob1Fc3oDIRM8ovSpJfd nGKQN751bfJFApqDgzN7AbJrqJ30NFUXXD9ziwmGEYTQe4m13KScFBq9EtHzwNRWGOZq wlTQ==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1774240949; x=1774845749; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wBrsHkCQW45dKnheHIM7Xo9eCHJoY+HKDKvShVcUNTI=; b=GxHZAnus8fd+fNIokUPh09T0RkpiqFWDrW9L+ySP9s383NZFrw8XppVyxPPUSAxgli 0IaVHcHBfoStevhveiLQpRvrDS6Yx81JXuqGXst7Xkpl3iqKblMDHej03CKRXqyijgwq sCokhUl3X6yhFbpATi7X5J2hek0fEQYA7AbBsMlJBqxbDjUJNOXumePoG2ByiT5Orsui JFVQuW8++SLn5DvUncoc0njlvfc1nZ0dUymP674XM5L6z06TF0+H/octQ0TXexBRJcZS 9rlL1Fah9QYPBVz1yzJNI58UJz10+QpDCle8IySrfIfyrs/HQLENAoATlnvq9+QQVUfG 39iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774240949; x=1774845749; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wBrsHkCQW45dKnheHIM7Xo9eCHJoY+HKDKvShVcUNTI=; b=rnEyFxGXMp7FSf/v+MZhhC0gBtyrbat2Cg8I6rxBzzoHH5OUv87ToGX267aE6y8P2v /+e3o7oszgiaLkh/z+haQI/Pn0Zv7F/ppsnUHJYw2evpS4zTxynUH0jTXrtRzkWhRss1 8LHuQ6LGSiCs1o1oYczzy7K5mUrWMjMWkYrNw/dGwNZFssINUzIQIQs0ScZD0z9AD/Zb iCVZEuYd82K1nkYKux0CnwPnkYcAzGExG7mOk4IYCi+MBZZSylu1KgBNhOR3oO6j7zCL MrZV89cwVxF/r9jTGW8rW7qbCc3Xqgalcf80HU4unEHknay+v30CCSCzc22ZyBMHSOAg NlnQ== X-Forwarded-Encrypted: i=1; AJvYcCXEYs28QZWAxDUxAsyCBxS5STbrkOa2GSz6oCqTU18nI6GZaKM9ee+z5umykuG2TC6IV1Ui+YWp3/+lbhnP@postgresql.org X-Gm-Message-State: AOJu0YwRS2nvuvWNDkqCGKkbikdL78amfsXYFRkTwLbTluRsNGq9U0kl OAvQzbbpIKgVEaL/m3n8IZ5cNzsrf9ftTOm6OpSriguE+2JHERiAw936TnK/CcN9fwgFDWsPuz2 DV2QQqT40tBi+W9T5HnDv+ltffgYj4TU= X-Gm-Gg: ATEYQzw0VWJH5vv1g1cfDxLPBCw+W31BEKRbR4dyquoDsd0KOWa6gKQBFUYOjut5Ddw C/tmmSv8bcAzyzLhj3d1rkwlCa3rDMBZ4zoimN44PRi8JFU7pZ6RAGnLPi1HcLBFeeaZs/hlUFs P3C8f/Fv0eyHabgRwPEHhCPIkEu8mlpzLGsaRaa58cGR0Zdc/UPJYDhMC9YsqLiUaQKr+7fTfnX R8Z4yyX2uWHgFzb1LNA7J3Re7DIC2sYfItI8oLXW9ShVT4nYyF7pohilO8/veLizwcwaWIqFe1a 0OH9+P8loJvEvM3yqg== X-Received: by 2002:a05:7022:612:b0:128:d4db:447b with SMTP id a92af1059eb24-12a726fac5fmr4731429c88.38.1774240948528; Sun, 22 Mar 2026 21:42:28 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: lakshmi Date: Mon, 23 Mar 2026 10:15:59 +0530 X-Gm-Features: AQROBzCdxPOwfCzR6eROhzrQFz0uSCjX017FdhlxzggYV9A1CIun73w25aEL-OU Message-ID: Subject: Re: Avoid multiple calls to memcpy (src/backend/access/index/genam.c) To: Ranier Vilela Cc: Bryan Green , Pg Hackers Content-Type: multipart/alternative; boundary="0000000000007babb7064da9a9c1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000007babb7064da9a9c1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Thanks for the reply. Here are the details of my test setup. I ran the tests on Debian Linux (6.1.0-10-amd64, x86_64) on an AMD Ryzen 5 7535U (6 cores / 12 threads). The PostgreSQL version was 19devel, built from source using gcc 12.2.0 with enable-debug. For benchmarking, I used pgbench with the following command: pgbench -p 55432 -d postgres -c 10 -j 4 -T 60 The database was initialized with scale factor 1 (pgbench -i). I ran multiple iterations for both the original and patched versions and compared TPS and latency across runs. All tests were done on the same system under similar conditions. Please let me know if you=E2=80=99d like me to try any other scenarios or p= rovide more details. Regards, Lakshmi G On Fri, Mar 20, 2026 at 4:28=E2=80=AFPM Ranier Vilela = wrote: > Hi. > > Em sex., 20 de mar. de 2026 =C3=A0s 06:50, lakshmi > escreveu: > >> Hi, >> >> I tried this change on PostgreSQL (19devel) and ran a few simple tests >> using pgbench to see how it behaves in practice. >> >> I used 10 clients and 4 threads and ran each test for 60 seconds. >> >> From my runs, the original version was giving around ~663 TPS with ~15.0= 7 >> ms latency. >> With the patched version, I observed TPS in the range of ~638=E2=80=9365= 7, >> averaging around ~648 TPS, with latency slightly higher (~15.2=E2=80=931= 5.6 ms). >> > Thanks for the benchmark. > Could you share the tests and the environment? > compiler > OS > etc. > > best regards, > Ranier Vilela > --0000000000007babb7064da9a9c1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

Thanks for the reply.

Here are the detai= ls of my test setup.

I ran the tests on Debian Linux (6.1.0-10-amd64= , x86_64) on an AMD Ryzen 5 7535U (6 cores / 12 threads).

The Postgr= eSQL version was 19devel, built from source using gcc 12.2.0 with enable-de= bug.

For benchmarking, I used pgbench with the following command:pgbench -p 55432 -d postgres -c 10 -j 4 -T 60

The database was init= ialized with scale factor 1 (pgbench -i). I ran multiple iterations for bot= h the original and patched versions and compared TPS and latency across run= s.

All tests were done on the same system under similar conditions.<= br>
Please let me know if you=E2=80=99d like me to try any other scenari= os or provide more details.

Regards,
Lakshmi G

On Fri, Mar 20, 2026 at 4:28=E2=80=AFPM Ranier Vilela <ranier.vf@gmail.com> wrote:
Hi.
=
Em sex= ., 20 de mar. de 2026 =C3=A0s 06:50, lakshmi <lakshmigcdac@gmail.com> escreveu:<= br>
Hi,

I tried this change on PostgreSQL (19devel) and ran a few simpl= e tests using pgbench to see how it behaves in practice.

I used 10 c= lients and 4 threads and ran each test for 60 seconds.

From my runs,= the original version was giving around ~663 TPS with ~15.07 ms latency.With the patched version, I observed TPS in the range of ~638=E2=80=93657,= averaging around ~648 TPS, with latency slightly higher (~15.2=E2=80=9315.= 6 ms).
Thanks for the benchmark.
Could= you share the tests and the environment?
compiler
OS
etc.

best regards,
Ranier Vilel= a
--0000000000007babb7064da9a9c1--