Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aJjc1-0000sl-Io for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Jan 2016 15:14:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aJjc1-0007xw-61 for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Jan 2016 15:14:57 +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 1aJjc0-0007xp-G3 for pgsql-hackers@postgresql.org; Thu, 14 Jan 2016 15:14:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aJjbt-0005KH-KZ for pgsql-hackers@postgresql.org; Thu, 14 Jan 2016 15:14:55 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u0EFEhI6019269; Thu, 14 Jan 2016 10:14:43 -0500 From: Tom Lane To: Andres Freund cc: Robert Haas , =?utf-8?B?0JLQsNGB0LjQu9GM0LXQsiDQlNC80LjRgtGA0LjQuQ==?= , pgsql-hackers@postgresql.org Subject: Re: Performance degradation in commit ac1d794 In-reply-to: <20160114143931.GG10941@awork2.anarazel.de> References: <9F7A592C-323B-40CF-AEB6-20D28EAEFFDD@anarazel.de> <19322.1451067023@sss.pgh.pa.us> <19834.1451068135@sss.pgh.pa.us> <20151225211326.z4umuafvv27nczya@alap3.anarazel.de> <24833.1451078993@sss.pgh.pa.us> <20151226112248.uv3qxmroe4va7wke@alap3.anarazel.de> <20160114143931.GG10941@awork2.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 14 Jan 2016 15:39:31 +0100" Date: Thu, 14 Jan 2016 10:14:43 -0500 Message-ID: <19268.1452784483@sss.pgh.pa.us> 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 Andres Freund writes: > 0004 currently contains one debatable optimization, which I'd like to > discuss: Currently the 'sock' passed to WaitLatchOrSocket is not > removed/added to the epoll fd, if it's the numerically same as in the > last call. That's good for performance, but would be wrong if the socket > were close and a new one with the same value would be waited on. I > think a big warning sign somewhere is sufficient to deal with that > problem - it's not something we're likely to start doing. And even if > it's done at some point, we can just offer an API to reset the last used > socket fd. Perhaps a cleaner API solution would be to remove the socket argument per se from the function altogether, instead providing a separate SetSocketToWaitOn() call. (Also, if there is a need for it, we could provide a function that still takes a socket argument, with the understanding that it's to be used for short-lived sockets where you don't want to change the process's main epoll state.) regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers