Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kBins-0004dC-9w for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Aug 2020 18:08:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kBinq-0002zb-1B for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Aug 2020 18:08:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kBinp-0002tv-L4 for pgsql-hackers@lists.postgresql.org; Fri, 28 Aug 2020 18:08:41 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kBink-0005ef-84 for pgsql-hackers@postgresql.org; Fri, 28 Aug 2020 18:08:38 +0000 Received: from [192.168.0.112] (unknown [194.187.204.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 87D2221C29E5; Fri, 28 Aug 2020 21:08:34 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1598638114; bh=xuCNlEWBJo30FKluAHDHcU6x/kCf8ui+I2idHR1eeFM=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=Qb5CjpJNcU6eufPld8pNCZ+V4aHwcztTcY97tjz55o4ehohz4Pe42L67+YO0Fnrqq mZs8D1nwJJumKcLiaR+mXkUxE6JoYSkNaIci2kSfltJz6Fh4U1kRNgab8ewKdtRRPA tv2OS13FZBQ5frPJqcbBDPcx7w5QoBexAUuGEObQ= Subject: Re: MultiXact\SLRU buffers configuration To: "Andrey M. Borodin" , Daniel Gustafsson Cc: Kyotaro Horiguchi , pgsql-hackers References: <3B099683-ECCD-43CD-A3D6-F08C3745002A@yandex-team.ru> <20200514.151659.1224056315528271804.horikyota.ntt@gmail.com> <102F673B-C9C5-4823-A92F-96799FC61ED0@yandex-team.ru> <20200515.090333.24867479329066911.horikyota.ntt@gmail.com> <2ECE132B-C042-4489-930E-DBC5D0DAB84A@yandex-team.ru> From: Anastasia Lubennikova Message-ID: Date: Fri, 28 Aug 2020 21:08:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <2ECE132B-C042-4489-930E-DBC5D0DAB84A@yandex-team.ru> Content-Type: multipart/mixed; boundary="------------3CF0588B8103FC976B44B226" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------3CF0588B8103FC976B44B226 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 08.07.2020 10:03, Andrey M. Borodin wrote: > >> 2 июля 2020 г., в 17:02, Daniel Gustafsson написал(а): >> >>> On 15 May 2020, at 02:03, Kyotaro Horiguchi wrote: >>> Generally in such cases, condition variables would work. In the >>> attached PoC, the reader side gets no penalty in the "likely" code >>> path. The writer side always calls ConditionVariableBroadcast but the >>> waiter list is empty in almost all cases. But I couldn't cause the >>> situation where the sleep 1000u is reached. >> The submitted patch no longer applies, can you please submit an updated >> version? I'm marking the patch Waiting on Author in the meantime. > Thanks, Daniel! PFA V2 > > Best regards, Andrey Borodin. 1) The first patch is sensible and harmless, so I think it is ready for committer. I haven't tested the performance impact, though. 2) I like the initial proposal to make various SLRU buffers configurable, however, I doubt if it really solves the problem, or just moves it to another place? The previous patch you sent was based on some version that contained changes for other slru buffers numbers: 'multixact_offsets_slru_buffers' and 'multixact_members_slru_buffers'. Have you just forgot to attach them? The patch message "[PATCH v2 2/4]" hints that you had 4 patches) Meanwhile, I attach the rebased patch to calm down the CFbot. The changes are trivial. 2.1) I think that both min and max values for this parameter are too extreme. Have you tested them? +               &multixact_local_cache_entries, +               256, 2, INT_MAX / 2, 2.2) MAX_CACHE_ENTRIES is not used anymore, so it can be deleted. 3) No changes for third patch. I just renamed it for consistency. -- Anastasia Lubennikova Postgres Professional: http://www.postgrespro.com The Russian Postgres Company --------------3CF0588B8103FC976B44B226 Content-Type: text/x-patch; charset=UTF-8; name="v3-0001-Use-shared-lock-in-GetMultiXactIdMembers-for-offs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v3-0001-Use-shared-lock-in-GetMultiXactIdMembers-for-offs.pa"; filename*1="tch"