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 1rfLLy-00H4U0-Q4 for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Feb 2024 14:56:15 +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 1rfLLx-00BMb9-Du for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Feb 2024 14:56:13 +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 1rfLLx-00BMb0-4a for pgsql-hackers@lists.postgresql.org; Wed, 28 Feb 2024 14:56:13 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rfLLs-001pA7-4e for pgsql-hackers@postgresql.org; Wed, 28 Feb 2024 14:56:11 +0000 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-565c6cf4819so1597746a12.1 for ; Wed, 28 Feb 2024 06:56:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1709132167; x=1709736967; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6pJQZjdUz9Bx2ncdwUdLmkY8f7ivsfMJyJiJ/1+30Qg=; b=AR/+PxDWMFXxJhOxLHXA/BVofabRIFimXj0xR5UbmYvz0sdyUd7w3T+XC9MPojQ6mC FMfcojFoAN01yb9q8OzfoBLsIBtiURwFPEGDoC2XJH01Zv4wrl5K5vZQYEdRpfY57wgI uOQn0YXGfZX6YZ0+GFjAYo4CaIssVgo352PtXZuTDD2odq3ySp7zyO8KGXk/ckUvG6GJ RfuVv47LpWwmX2XIWC2P4Ibs0AaNsgKaxrJtYzYXg8AE3Tc37GGeIt30fBFWhNLAasXG APqGyG24PQ5TUmEIQbE9OpRvvlFl+TFVEA/qgTVma/ZeE6zdfoLYxhliMNYfQYfQNBa+ y6ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709132167; x=1709736967; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6pJQZjdUz9Bx2ncdwUdLmkY8f7ivsfMJyJiJ/1+30Qg=; b=JvSkzUg1X0s82WtBbiZHvWNcV5xUJucTtPD5pLnQuhTMd36rjTBz++TNrWNuIZzp/g k1eMjE42XfCgMvkv4HaeUegSTuvrrdI9DV95MBAUU7kNI8x2yL8arQgzq4OLFmDYNqvt U1e31p0e8tIvuSAzdo6eaaMiFcnLk/lRdwo3bGuz3B7RRRK3mRsEVXxtrEgSr/TMxT8N YFTGm6yYNtXFI0+snpgT5hhRJ9ZENpuLvo34ouIlWh7yv+pZTYsyP7ou1ALCf3/m+/2o EIF4kRgc0oxD0LrchQ65bxTm35tUSZDd5WQqZDS1/fqLOo2pqLJ1Uw43jgwPG1jOXYSh qA5g== X-Forwarded-Encrypted: i=1; AJvYcCUmJ2bWTujtIEuJmdxgtKp4Zb3F8EKV7y4mOwyZ09pXat0NIfnJwOOHQGspxsF7H6TOcL5xCq3DEpvxaINguP+35/1FRiAOEvmT7+aa X-Gm-Message-State: AOJu0YzTuMNNd9s2yFS6ddqwe8PDFRV5mYOnBv24oEKmC7eHSvVrIbl6 nvPcdpYCxBMSAfjjY9fsrgEySNCkrxMIytpOkdOeSLdXObUCg1kx50XrSywKjA== X-Google-Smtp-Source: AGHT+IGeD+mSEPVMDdWCaRrzsYVadZ7LG++JCr6+RS44t+dBzxk8UDNsahxXnJYgEluU82qmM2LKXA== X-Received: by 2002:a17:906:d0d7:b0:a3f:c3f0:69bf with SMTP id bq23-20020a170906d0d700b00a3fc3f069bfmr2418831ejb.13.1709132167410; Wed, 28 Feb 2024 06:56:07 -0800 (PST) Received: from [10.137.0.18] (ip-86-49-229-30.bb.vodafone.cz. [86.49.229.30]) by smtp.gmail.com with ESMTPSA id cm27-20020a170906f59b00b00a3f3d0d30c8sm1909506ejd.213.2024.02.28.06.56.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Feb 2024 06:56:07 -0800 (PST) Message-ID: <4b751bc5-446f-4357-a1e1-827585bf22b0@enterprisedb.com> Date: Wed, 28 Feb 2024 15:56:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: BitmapHeapScan streaming read user and prelim refactoring Content-Language: en-US To: Melanie Plageman Cc: Andres Freund , Pg Hackers , Thomas Munro , Heikki Linnakangas , Nazir Bilal Yavuz References: <20240214194228.jf4o7luxtyra5ggv@awork3.anarazel.de> <20240216173559.xiy5xcl5dqmsprns@liskov> <20240227015028.knohvy3spaqwk7lf@liskov> <20240227142230.nu3ytvcjwouvczlt@liskov> <40c213cc-6a15-4e2c-9e56-dae344d52a73@enterprisedb.com> From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/28/24 15:38, Melanie Plageman wrote: > On Wed, Feb 28, 2024 at 8:22 AM Tomas Vondra > wrote: >> >> Hi, >> >> I haven't looked at the code very closely yet, but I decided to do some >> basic benchmarks to see if/how this refactoring affects behavior. >> >> Attached is a simple .sh script that >> >> 1) creates a table with one of a couple basic data distributions >> (uniform, linear, ...), with an index on top >> >> 2) runs a simple query with a where condition matching a known fraction >> of the table (0 - 100%), and measures duration >> >> 3) the query is forced to use bitmapscan by disabling other options >> >> 4) there's a couple parameters the script varies (work_mem, parallel >> workers, ...), the script drops caches etc. >> >> 5) I only have results for table with 1M rows, which is ~320MB, so not >> huge. I'm running this for larger data set, but that will take time. >> >> >> I did this on my two "usual" machines - i5 and xeon. Both have flash >> storage, although i5 is SATA and xeon has NVMe. I won't share the raw >> results, because the CSV is like 5MB - ping me off-list if you need the >> file, ofc. > > I haven't looked at your results in detail yet. I plan to dig into > this more later today. But, I was wondering if it was easy for you to > run the shorter tests on just the commits before the last > https://github.com/melanieplageman/postgres/tree/bhs_pgsr > i.e. patches 0001-0013. Patch 0014 implements the streaming read user > and removes all of the existing prefetch code. I would be interested > to know if the behavior with just the preliminary refactoring differs > at all. > Sure, I can do that. It'll take a couple hours to get the results, I'll share them when I have them. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company