Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a9vvg-0004sw-Eu for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Dec 2015 14:22:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a9vvf-00031c-P1 for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Dec 2015 14:22:43 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a9vuK-0000uC-IG for pgsql-hackers@postgresql.org; Fri, 18 Dec 2015 14:21:20 +0000 Received: from newmail.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1a9vuH-0008LS-GS for pgsql-hackers@postgresql.org; Fri, 18 Dec 2015 14:21:19 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 2BA4821C5049; Fri, 18 Dec 2015 17:21:16 +0300 (MSK) Received: from mail.postgrespro.ru ([127.0.0.1]) by localhost (mail.postgrespro.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X92lYdWRUTYk; Fri, 18 Dec 2015 17:21:15 +0300 (MSK) Received: from fujitsu (unknown [192.168.27.1]) by mail.postgrespro.ru (Postfix) with ESMTPSA id C6EE721C500B; Fri, 18 Dec 2015 17:21:15 +0300 (MSK) Date: Fri, 18 Dec 2015 17:19:33 +0300 From: Aleksander Alekseev To: Teodor Sigaev Cc: Robert Haas , Andres Freund , "pgsql-hackers@postgresql.org" , Amit Kapila Subject: Re: Patch: fix lock contention for HASHHDR.mutex Message-ID: <20151218171933.500845f6@fujitsu> In-Reply-To: <56740E41.4010708@sigaev.ru> References: <20151211170001.78ded9d7@fujitsu> <20151215122513.GC17724@alap3.anarazel.de> <20151217151418.GB2224@awork2.anarazel.de> <20151217190342.07e4533a@fujitsu> <56740E41.4010708@sigaev.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org > Could we split one freelist in hash to NUM_LOCK_PARTITIONS freelists? > Each partition will have its own freelist and if freelist is empty > then partition should search an entry in freelists of other > partitions. To prevent concurrent access it's needed to add one > LWLock to hash, each partition should lock LWlock in share mode to > work with its own freelist and exclusive to work with other freelists. > > Actually, I'd like to improve all partitioned hashes instead of > improve only one case. It seems to be a most promising direction of research for now. I will send a patch and benchmark results soon. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers