Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a9rw1-0001fM-Ij for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Dec 2015 10:06:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a9rw0-0006u9-2D for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Dec 2015 10:06:48 +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 1a9rvy-0006tU-Sd for pgsql-hackers@postgresql.org; Fri, 18 Dec 2015 10:06:47 +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 1a9rvr-0003Bk-Cp for pgsql-hackers@postgresql.org; Fri, 18 Dec 2015 10:06:45 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 6C19921C5050; Fri, 18 Dec 2015 13:06:37 +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 7gOPVAWvc0sl; Fri, 18 Dec 2015 13:06:37 +0300 (MSK) Received: from fujitsu (unknown [192.168.27.1]) by mail.postgrespro.ru (Postfix) with ESMTPSA id 0788421C48AE; Fri, 18 Dec 2015 13:06:37 +0300 (MSK) Date: Fri, 18 Dec 2015 13:04:54 +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: <20151218130454.391e44df@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=UTF-8 Content-Transfer-Encoding: quoted-printable 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 =D0=B0ppr=D0=BEv=D0=B5 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. --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers