Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0Clo-0005Ie-84 for pgsql-hackers@arkaria.postgresql.org; Tue, 10 May 2016 18:52:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b0Cln-0001rn-8Q for pgsql-hackers@arkaria.postgresql.org; Tue, 10 May 2016 18:52:35 +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_2) (envelope-from ) id 1b0CkR-0000NI-Bc for pgsql-hackers@postgresql.org; Tue, 10 May 2016 18:51:11 +0000 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1b0CkM-0008RG-HU for pgsql-hackers@postgresql.org; Tue, 10 May 2016 18:51:10 +0000 Received: by mail-lf0-x229.google.com with SMTP id u64so25336143lff.3 for ; Tue, 10 May 2016 11:51:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=gzsNYWdQcCGEhs/t3UhaMoXiyEha8RMM5JEGuiWXlMI=; b=usFoC5QKZfN/tl7ymHRb5l0xp/zqYobNXePWAyFFmKoTt5s9nhKu4k8HT2tWnCilCl wz4YQg9OqIW+qqFz6Yfev0IBuCqrvYlZzbgjeEWH1dwS3xvDsa8PQMyeUtXqZV+zsfzD Epqj6zFGSE4MSX6q8ZWYbEymvSkqHFytjt2wRhjxiGbV7pXTTrtzig4+hfbrqZfm8oek jX3/0uufS/UNjWzoBMRgOjnKdEUYFY8hMFVjtVH9hlyoIbYQP54cusyAWVnq6FgjBwPB nHd2YC5fb5wuccfuhHopcYH92LEVFmjpXbCax79Vl8D6usnrvS220g5zTj0ekbR9t/VV R10A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=gzsNYWdQcCGEhs/t3UhaMoXiyEha8RMM5JEGuiWXlMI=; b=RdEsOudxCLH6ABTkopSlPIeApE52gJIXfGS2kyMQT6zljnkkE9uzqr2sy2B1XO9Kv3 24FGu+aTrTe1HBbC3xHlj/oWJDm3n9/ZdPt28CGNdacqOxaQ5UCwmngCQVAUvigDIcWy Zq9cRGX6ZRQOSSGmLmwKQKOoYYa2yu5rvStBiaOKHyFdBefDo21ika9NmfxfAUYEw8Uu 5h5VKIos87YzCjb//t0jlJJA+9DCopU1bKsOPt0OzBwN6I0DWwW5OPrO+ujwtkroWZgv ICovFqWL75eDTP2tz4iNtyKrJ6rNL6Oz24XlRiRG/B/gvgF5Qm9q4d65tPtQ9izqvy9q zl6g== X-Gm-Message-State: AOPr4FUJbtj5zhyWOxw28Z77tl2TFH50KjFgy2tHYSXMQWa+GAyrDoGxmTaGX4TtGs37AqUy3ZX+dJRi4XUNmrMA7WMgIteBhg/h+5kkNkRzRehTteWkUHU3QLuTojzVfdAiJGEh0gZokjwQtIg1CGzrT0PI6hZloYIQpLo7LjR0a4HzMOnF6Pf6TwkDQKZzuOfd8IXOhBuL X-Received: by 10.25.24.65 with SMTP id o62mr17736105lfi.147.1462906265518; Tue, 10 May 2016 11:51:05 -0700 (PDT) Received: from [10.137.2.20] ([194.136.21.34]) by smtp.gmail.com with ESMTPSA id j6sm619450lbd.32.2016.05.10.11.51.03 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 May 2016 11:51:04 -0700 (PDT) Subject: Re: what to revert To: Robert Haas References: <20160503162209.ufuezlkovbrdrayp@alap3.anarazel.de> <20160503174104.tk7oz4akwbeqsmuq@alap3.anarazel.de> <20160503224241.rwtxrhgmprzqxhlv@alap3.anarazel.de> Cc: Kevin Grittner , Andres Freund , "pgsql-hackers@postgresql.org" From: Tomas Vondra Message-ID: Date: Tue, 10 May 2016 20:51:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Thunderbird/46.0a2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 Hi, On 05/10/2016 07:36 PM, Robert Haas wrote: > On Tue, May 10, 2016 at 12:31 PM, Tomas Vondra > wrote: >> The following table shows the differences between the disabled and reverted >> cases like this: >> >> sum('reverted' results with N clients) >> ---------------------------------------- - 1.0 >> sum('disabled' results with N clients) >> >> for each scale/client count combination. So for example 4.83% means with a >> single client on the smallest data set, the sum of the 5 runs for reverted >> was about 1.0483x than for disabled. >> >> scale 1 16 32 64 128 >> 100 4.83% 2.84% 1.21% 1.16% 3.85% >> 3000 1.97% 0.83% 1.78% 0.09% 7.70% >> 10000 -6.94% -5.24% -12.98% -3.02% -8.78% > > /me scratches head. > > That doesn't seem like noise, but I don't understand the > scale-factor-10000 results either. Reverting the patch makes the code > smaller and removes instructions from critical paths, so it should > speed things up at least nominally. The question is whether it makes > enough difference that anyone cares. However, removing unused code > shouldn't make the system *slower*, but that's what's happening here > at the higher scale factor. /me scratches head too > > I've seen cases where adding dummy instructions to critical paths > slows things down at 1 client and speeds them up with many clients. > That happens because the percentage of time active processes fighting > over the critical locks goes down, which reduces contention more than > enough to compensate for the cost of executing the dummy > instructions. If your results showed performance lower at 1 client > and slightly higher at many clients, I'd suspect an effect of that > sort. But I can't see why it should depend on the scale factor. That > suggests that, perhaps, it's having some effect on the impact of > buffer eviction, maybe due to a difference in shared memory layout. > But I thought we weren't supposed to have such artifacts any more > now that we start every allocation on a cache line boundary... > I think we should look for issues in the testing procedure first, perhaps try to reproduce it on a different system. Another possibility is that the revert is not perfectly correct - the code compiles and does not crash, but maybe there's a subtle issue somewhere. I'll try to collect some additional info (detailed info from sar, aggregated transaction log, ...) for further analysis. And also increase the number of runs, so that we can better compare all the separate combinations. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers