Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXryp-0001EV-Nq for pgsql-performance@arkaria.postgresql.org; Tue, 05 Oct 2021 21:28:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mXryo-0006JC-Md for pgsql-performance@arkaria.postgresql.org; Tue, 05 Oct 2021 21:28:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXryo-0006J4-BQ for pgsql-performance@lists.postgresql.org; Tue, 05 Oct 2021 21:28:06 +0000 Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mXryl-0006wf-Mv for pgsql-performance@lists.postgresql.org; Tue, 05 Oct 2021 21:28:06 +0000 Received: by mail-qk1-x72f.google.com with SMTP id 72so429697qkk.7 for ; Tue, 05 Oct 2021 14:28:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=p+16KQLFPVSDIPMk/8lPcWZoB+M/5UUfpqEPdvpphOQ=; b=VdhnOCtkH0kxflsFKtH9euiXPnFKtranUSpP+drOrGt7KWQkkELwof6E5beScDfuyb KHzvdNCrFlbiWMWTSeT2VrADko1nrJiFW9neCWrF7i12whmwpIgT5CsUr5HBD44IVTmY HkGN4U8od2swPVYpe8kTrlqIDGE6aKyCbEN42/xxGVeoVwtEkIi/3naHP9mFbn+r2OV6 tF/nWLSa5h+mO8gQ027r4ht5TMpMsz+HSeNuresY2NZ40WmuieCNQAIlOYeQK4GZD7br 3lATF6qt0spGVgWdIHhgg9v7HJpQUf7eanruFRHwpCa4DDJimche69nZtf3heU8xAWec KyGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=p+16KQLFPVSDIPMk/8lPcWZoB+M/5UUfpqEPdvpphOQ=; b=EP7AiBybmf3GSt76zt77p+Pz3HKTH62ivp/Sh+3ZwUHlyOYtxjd16iwzkAtLIm5Un/ f45hF27UH8RkzjF/zbdNndk6TTU+zbc+0j1sDHNcmyXeWahZYvoU6uiWz5Bdc82yco3o o3jTeml+pl4nb7pCZU4UBfQEqiKiAXtKGUWDCQtd0e5gPccMeoXli1qh9pkx2cGM0OIY 0uR4mN6Vlii+uKDhMb/UoniB2BcBkH2aChLxebimeMm3yxJMU+rrgRzx47+CTODml/yK LR96avoUQZJHHyUFiJc7Kp8dMKPHs1gx4Yi9Qan8ZCIo1smICoO/qfJ7DOhNJKncvQSo VbOA== X-Gm-Message-State: AOAM532MOSvv8FNOkYs3fB1JADCsboBHfvm3o2qiJN+V6KU1MfEsXVkz qId0+x2wlS/Fu/VpNVtr30vvfsrzUs1grA== X-Google-Smtp-Source: ABdhPJyCWBjKUbP9PRmPdUb1j3jAYr5lKw9je0BpIR/RqhkbqCfUJFhUEd/qKbnjwC34YVNhvMHQzw== X-Received: by 2002:a37:b801:: with SMTP id i1mr17306958qkf.235.1633469280769; Tue, 05 Oct 2021 14:28:00 -0700 (PDT) Received: from [192.168.2.100] (pool-72-79-19-93.nwrknj.east.verizon.net. [72.79.19.93]) by smtp.gmail.com with ESMTPSA id h17sm11063653qtp.13.2021.10.05.14.28.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Oct 2021 14:28:00 -0700 (PDT) Message-ID: <72242042-49f0-954c-9572-e15d13584308@gmail.com> Date: Tue, 5 Oct 2021 17:27:59 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: Better, consistent instrumentation for postgreSQL using a similar API as Oracle Content-Language: en-US To: pgsql-performance@lists.postgresql.org References: From: Mladen Gogala In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Comments in-line On 10/5/21 16:24, Peter Geoghegan wrote: > On Fri, Oct 1, 2021 at 1:06 PM Jeff Holt wrote: >> Now looking closely at postgreSQL, I see an opportunity to more quickly implement Oracle's current feature list. >> >> I've come to this point because I see many roadblocks for users who want to see a detailed "receipt" for their response time. > I have heard of method R. Offhand it seems roughly comparable to > something like the Top-down Microarchitecture Analysis Method that low > level systems programmers sometimes use, along with Intel's pmu-tools > -- at least at a very high level. The point seems to be to provide a > workflow that can plausibly zero in on low-level bottlenecks, by > providing high level context. Many tricky real world problems are in > some sense a high level problem that is disguised as a low level > problem. And so all of the pieces need to be present on the board, so > to speak. > > Does that sound accurate? Yes, that is pretty accurate. It is essentially the same method described in the "High Performance Computing" books. The trick is to figure what the process is waiting for and then reduce the wait times. All computers wait at the same speed. > One obvious issue with much of the Postgres instrumentation is that it > makes it hard to see how things change over time. I think that that is > often *way* more informative than static snapshots. > > I can see why you'd emphasize the need for PostgreSQL to more or less > own the end to end experience for something like this. It doesn't > necessarily follow that the underlying implementation cannot make use > of infrastructure like eBPF, though. Fast user space probes provably > have no overhead, and can be compiled-in by distros that can support > it. There hasn't been a consistent effort to make that stuff > available, but I doubt that that tells us much about what is possible. > The probes that we have today are somewhat of a grab-bag, that aren't > particularly useful -- so it's a chicken-and-egg thing. Not exactly. There already is a very good extension for Postgres called pg_wait_sampling: https://github.com/postgrespro/pg_wait_sampling What is missing here is mostly the documentation. This extension should become a part of Postgres proper and the events should be documented as they are (mostly) documented for Oracle. Oracle uses trace files instead. However, with Postgres equivalence of files and tables, this is not a big difference. > > It would probably be helpful if you could describe what you feel is > missing in more general terms -- while perhaps giving specific > practical examples of specific scenarios that give us some sense of > what the strengths of the model are. ISTM that it's not so much a lack > of automation in PostgreSQL. It's more like a lack of a generalized > model, which includes automation, but also some high level top-down > theory. I am not Jeff and my opinion is not as valuable and doesn't carry the same weight, by far. However, I do believe that we may not see Jeff Holt again on this group so I am providing my opinion instead. At least I would, in Jeff's place, be reluctant to return to this group. -- Mladen Gogala Database Consultant Tel: (347) 321-1217 https://dbwhisperer.wordpress.com