Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a9wig-00027q-7Z for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Dec 2015 15:13:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a9wif-0008KS-QK for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Dec 2015 15:13:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a9rEz-0003pX-7l for pgsql-hackers@postgresql.org; Fri, 18 Dec 2015 09:22:21 +0000 Received: from newmail.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1a9rEs-0002d2-9E for pgsql-hackers@postgresql.org; Fri, 18 Dec 2015 09:22:20 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id B3F7521C5074; Fri, 18 Dec 2015 12:22:13 +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 1Jr8cYUs7ra3; Fri, 18 Dec 2015 12:22:13 +0300 (MSK) Received: from fujitsu (unknown [192.168.27.1]) by mail.postgrespro.ru (Postfix) with ESMTPSA id 520D921C503E; Fri, 18 Dec 2015 12:22:13 +0300 (MSK) Date: Fri, 18 Dec 2015 12:20:31 +0300 From: Aleksander Alekseev To: Amit Kapila Cc: Andres Freund , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: Patch: fix lock contention for HASHHDR.mutex Message-ID: <20151218122031.3f5bb865@fujitsu> In-Reply-To: References: <20151211170001.78ded9d7@fujitsu> <20151215122513.GC17724@alap3.anarazel.de> <20151217151418.GB2224@awork2.anarazel.de> <20151217190342.07e4533a@fujitsu> 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 > This idea can improve the situation with ProcLock hash table, but I > think IIUC what Andres is suggesting would reduce the contention > around dynahash freelist and can be helpful in many more situations > including BufMapping locks. I agree. But as I understand PostgreSQL community doesn't generally approve big changes that affects whole system. Especially if original problem was only in one particular place. Therefore for now I suggest only a small change. Naturally if it will be accepted there is no reason not to apply same changes for BufMapping or even dynahash itself with corresponding PROCLOCK hash refactoring. BTW could you (or anyone?) please help me find this thread regarding BufMapping or perhaps provide a benchmark? I would like to reproduce this issue but I can't find anything relevant in a mailing list. Also it seems to be a good idea to compare alternative approaches that were mentioned (atomics ops, group leader). Are there any discussions, benchmarks or patches regarding this topic? Frankly I have serious doubts regarding atomics ops since they will more likely create the same contention that a spinlock does. But perhaps there is a patch that works not the way I think it could work. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers