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 1rl98V-000N2v-Pg for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Mar 2024 15:06:20 +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 1rl98U-009qhh-7i for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Mar 2024 15:06:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rl98T-009qhZ-SC for pgsql-hackers@lists.postgresql.org; Fri, 15 Mar 2024 15:06:18 +0000 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rl98R-004fdG-7o for pgsql-hackers@lists.postgresql.org; Fri, 15 Mar 2024 15:06:17 +0000 Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-7c8c9f02eadso56837739f.0 for ; Fri, 15 Mar 2024 08:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710515173; x=1711119973; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fXRbAkrBsNEXfoInqtg11xoHYXrWrLgCPejWk/imEeg=; b=RpXXSP8dY96B4R+LihwAdttHhgOXoKt3MOIlWzeeYVu/cVrBU07sb01EAcJ+ddL+Zd YQ+MjyzBmmWj9gk9Ux9C13vgJGvVJzBBbD0eT9DodZ1azRL/4CnJE6ch10iRODZ84ep8 veGlTdn4udc3M30tJxrp8fAHJ85pUYmZHU6CeX7tzUWVLBgEWHX6L3QBn1BqOa1u97oX 89rDvAc/Cjv2sZmJe08X+4RAxUgpizk/JNLjoSKaOVwkJzRJIwCzecRnXIIjHHnUQJnP gn3p9bIkOfTiw3sA0ZZhUOaZP3lay+4zdthbU3A1FTLnLYgD/rLCYdhCvX5OsQ0aktk3 yqRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710515173; x=1711119973; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fXRbAkrBsNEXfoInqtg11xoHYXrWrLgCPejWk/imEeg=; b=HvnJJNQtnXlEGGUher1nFbuSugg2r3426WyAwz2F5vABIpG9ZB/FZuUU9ubExULp/D ZUubAJiUgwW5qXwLy9P7YpH0NNdtxwxdLljmJ3wb8M4Cm8EDpV1ZkN3Sp3X7b0QbCjXE xsJjYd15OaBklya4aNFNRgfcjZYZmmowc+AjzfrWuG8Bunz8nZFTnmCUSJdembiiYuoQ ACtlgU6+mibMMYA09kYJKEtDt+3H7+Ro4enW3e72y/TxzSCWvzQe8cZcHhH/7pyq2XoH EqkU7MClkWOKpWfFjNLopFyZNvWt0ETaepcTOWKVdfb++xHO5heqgsAJ0yeRb2fT7cd1 gO8w== X-Forwarded-Encrypted: i=1; AJvYcCXCcbLiIJjl/BNpaomcvkb6FoxHioDhxOywhjVC27I9m8Rp1cVzz0a/Mghi0TNeJFfuMyCrmS/M5CGOo3KUL+cX6UilZcsSj9wsYohKJMcUGV2Q X-Gm-Message-State: AOJu0Yy82j7GdzBD8HAWa2bPjAnIUM74RKfjjdrMqPQ8qqdptpVdkSeg PrU/ODbsygko769KtG0DWLtVY5AoRYPFFkM4CPrvVxsh9/jKo1r0 X-Google-Smtp-Source: AGHT+IF8w/Vc0Xl/4Z9pXttyCFs8MAoG96pQyHlaWO6H8PPWA+DrWhEtFfUXBAzkXbxFG9CSEIfMzQ== X-Received: by 2002:a05:6602:131b:b0:7cc:20f:b0ec with SMTP id h27-20020a056602131b00b007cc020fb0ecmr329797iov.3.1710515173346; Fri, 15 Mar 2024 08:06:13 -0700 (PDT) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id i24-20020a02c618000000b00477229b9381sm798170jan.116.2024.03.15.08.06.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 08:06:13 -0700 (PDT) Date: Fri, 15 Mar 2024 10:06:11 -0500 From: Nathan Bossart To: "Amonson, Paul D" Cc: Andres Freund , Alvaro Herrera , "Shankaran, Akash" , Noah Misch , Tom Lane , Matthias van de Meent , "pgsql-hackers@lists.postgresql.org" Subject: Re: Popcount optimization using AVX512 Message-ID: <20240315150611.GA3495582@nathanxps13> References: <20240304222118.GB3367383@nathanxps13> <20240305163730.GA3479896@nathanxps13> <20240307173318.GA455851@nathanxps13> <20240307213600.GA563369@nathanxps13> <20240312013436.GA1787866@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 14, 2024 at 07:50:46PM +0000, Amonson, Paul D wrote: > As for new performance numbers: I just ran a full suite like I did > earlier in the process. My latest results an equivalent to a pgbench > scale factor 10 DB with the target column having varying column widths > and appropriate random data are 1.2% improvement with a 2.2% Margin of > Error at a 98% confidence level. Still seeing improvement and no > regressions. Which test suite did you run? Those numbers seem potentially indistinguishable from noise, which probably isn't great for such a large patch set. I ran John Naylor's test_popcount module [0] with the following command on an i7-1195G7: time psql postgres -c 'select drive_popcount(10000000, 1024)' Without your patches, this seems to take somewhere around 8.8 seconds. With your patches, it takes 0.6 seconds. (I re-compiled and re-ran the tests a couple of times because I had a difficult time believing the amount of improvement.) [0] https://postgr.es/m/CAFBsxsE7otwnfA36Ly44zZO%2Bb7AEWHRFANxR1h1kxveEV%3DghLQ%40mail.gmail.com -- Nathan Bossart Amazon Web Services: https://aws.amazon.com