Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tfNCj-001tRs-Mn for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Feb 2025 17:59:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tfNCi-006gPu-Ky for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Feb 2025 17:59:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tfNCi-006gPj-Ap for pgsql-hackers@lists.postgresql.org; Tue, 04 Feb 2025 17:59:20 +0000 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tfNCf-003AJJ-2g for pgsql-hackers@postgresql.org; Tue, 04 Feb 2025 17:59:19 +0000 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-30229d5b21cso44705301fa.1 for ; Tue, 04 Feb 2025 09:59:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738691956; x=1739296756; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Vama41t0rJjBSYuDqBqIAMQ/rZdXSSlo2Z05MbODoL8=; b=QuHQqjMrmu4hfBrdGtPlkfw+Av3gnvST9FZIwt/Mevg5QtbAk8EDyV1AIrkz0uPtXF I98UUVQs6qhQiaM3EoSDz5L3zEM64YINnDAYy+335cDXUE61RhhlNSbsYAZmGEAds+dB obctSRDVeTEpGt2CYeo6EiApTde4iHSO1w2fFqei/KCsBP0mLbcSLEBt+uyhN+Szy+8K Kt/Nam+HVRzv2tJRCidFAKCoui9J+zlZx1Zl6HyEYDloDqMJlroblxwgLWe0joipm6PL M+Z/kiUq7yuEdwUXLEfWPV8DTGA02729EvO+yQ5yxirpiZh0PFPjnN9QS8X3DJ+ew1c4 xGMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738691956; x=1739296756; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Vama41t0rJjBSYuDqBqIAMQ/rZdXSSlo2Z05MbODoL8=; b=uEYSJi3m9GNGjUa1OEoVz7EsGA+4L8Qda2/l8elgw78helV827RO5YAxxs+cVlJmzl gdktmlL466LvxzLDesv1JJK4uvEDgmOP8P1OQQrKePvBVhSPxvyXBMLirURJ4vM8ZmXD KUxaKpOv0s/vSy6OQhscqqn1pw0rpPTaiOUVxChH+bNZfvxahezcI/nEIHwvcW4Czjr1 ZceFskAWGd8AzUBIIlnU1Ex62/E/ef7qdo78EMhn0E5eLVN/QBGo7Io189fp1i/wwGZe h802A9TBPpkB8pwCf5eVMSV/Lzh/DJAERT/mmhfuNMNyQpuFQt7kCTgoim1WdercMHcX PRgg== X-Forwarded-Encrypted: i=1; AJvYcCUe0BYVr4eldaju/LKASixUHATr+042nWKKAf02gg3A4P5u5kh9zbc/9JifhPbnMLT836NCbjNfzhjzMMvM@postgresql.org X-Gm-Message-State: AOJu0YwVy2Id2J0FtVOEXN16+eglcLNQK9+RliwjqoVbvdcLqRC7qU9d tiC5yCLA48qg4dwRQVVzsQfeuVSVfxIs+7F2PMck6oXZFnr8wxqAX9tRA3PyggEHUa7QFUVcriq f0q94iywu7jz1CtbMoidRHWM5CgM= X-Gm-Gg: ASbGncvYNsluQLlGbZHfAUNNkt/ZuaX7wKKcHy8kMx0/XDkt/yZk8MVhBDb8U48u3ik KYPLx8VDpSqsNvcYie5LHvg4raulhmVT9IVbS0WS85KGtkp/kWcVSXUYZ97AThETJhd5jRcA= X-Google-Smtp-Source: AGHT+IGzherd+3F9fX6kjLFBx70BMQaKkPZcB82hRkwI+MF9OacfwnfOo8s4tX79JQQv2vDa8PvTIreqjuk81ETt5xU= X-Received: by 2002:a05:651c:247:b0:302:3534:1fba with SMTP id 38308e7fff4ca-307968e6d2cmr112422201fa.17.1738691956202; Tue, 04 Feb 2025 09:59:16 -0800 (PST) MIME-Version: 1.0 References: <20994d10-ab44-4c6b-91bc-c4675cd2e58e@tantorlabs.com> <9D8A5BC8-A3A5-4DA9-9382-F30D343247D1@yandex-team.ru> <6cf6270b-e8fa-4d99-b74a-17e781cdf309@tantorlabs.com> <3a27c830-b81f-4560-9774-a87d9b922fbd@tantorlabs.com> <7AD765EF-14DE-4B3E-8282-E82A9B44DBAA@yandex-team.ru> <0c7770bd-9750-4200-a472-bdb262583c2f@tantorlabs.com> <18631d46-1741-4edc-b116-8d9631cdf919@tantorlabs.com> <4f98ec33-c627-4eb4-84f3-9994a0982277@tantorlabs.com> In-Reply-To: <4f98ec33-c627-4eb4-84f3-9994a0982277@tantorlabs.com> From: Sami Imseih Date: Tue, 4 Feb 2025 11:59:05 -0600 X-Gm-Features: AWEUYZlZieBi9nbrAs7wGaNnrt9UA1KysjMuqYnHwcpreO3tNnVs8SU8D3N3IEA Message-ID: Subject: Re: Sample rate added to pg_stat_statements To: Ilia Evdokimov Cc: Andrey Borodin , Alena Rybakina , Alexander Korotkov , Michael Paquier , Greg Sabino Mullane , pgsql-hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > To summarize the results of all benchmarks, I compiled them into a table: Thanks for compiling the benchmark data above. The main benefit of this patch will be to give the user a toggle if they are observing high spinlock contention due to pg_stat_statements which will likely occur on larger machines. I also did not see this thread [1] mentioned in the thread above, but one of the reasons pg_stat_statements.track_planning was turned off by default was due to the additional spinlock acquire to track the planning stats. Bringing this up as sample_rate might also be beneficial as well if a user decides to track planning. Regards, Sami [1] https://www.postgresql.org/message-id/flat/2895b53b033c47ccb22972b589050dd9@EX13D05UWC001.ant.amazon.com