Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ita4y-0004s7-VW for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jan 2020 16:39:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ita3z-00043K-60 for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jan 2020 16:38:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ita3y-00041u-LT for pgsql-hackers@lists.postgresql.org; Mon, 20 Jan 2020 16:38:06 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ita3t-000254-8C for pgsql-hackers@postgresql.org; Mon, 20 Jan 2020 16:38:05 +0000 Received: by mail-wm1-x336.google.com with SMTP id u2so243525wmc.3 for ; Mon, 20 Jan 2020 08:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2gMZlYu/EvNWntNxSntmHei+EZQRTOsTyQveqZioPB0=; b=DWeQ2M4rdy9HhQ/vLk1xYlaRaNe3sKbBE5ujKhl3pFacS+rjPR7fQ4yL6eq0QbU4Dq 72be2P9SwuD41lHqJEOGmo6F08TZLun4pJmee5PR6qrdKDEbN+dDdG8pM6a6jCdLBhD+ 2asEkvbfjdEFsCvPgGkjVSvNGfLAaGaX1hRUEpX5LXKNe4yYSxpg8x6dHNT1eVM/nPOs tEFvs9s7T3ZADxVec5ECFEL/sa3zZzYx8d56vDXa7NDsr1GAvSaitEgHpITGKbUNasqW r0g6PmjL8PlYUmek30eyC5cFFHU1+MvzVqUYR5bviI6n8rZFEP599maZkbzcgsVZq4f7 +klw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2gMZlYu/EvNWntNxSntmHei+EZQRTOsTyQveqZioPB0=; b=Dh+5yFC3SnD2q8gNibI3Sk9yQfEbxgVR7ZQEsh+FseqLoK9ZlIXW/qG2Ahu0Cx0aEg WKcIovauWmY+np7awKdqLBBTA5QgeYUBf4BsoB7oKPOsgHdli5Vc3xezfhsu9fxjaiK1 9CFW6RzP3XsRoiz2Arot49enAjgfg5fIRv3un6LB6F3iaIpxH2MjigQYbUAoNdbOY+GU 2EbI1eHrrK7nc/iPkFVUV8151iCe/XxCArxFuk0iPA7av/DDe3obiPDfak6iuevUTkrJ /Hq1FqLPgCTldaF2SXQ9Ig3k7rV1ydIJ/FLRv0Ds5EN4H+gDbNnBtr+3MjTMb8Q0YWnA 8pSw== X-Gm-Message-State: APjAAAXprRviEiwYkZ/VwWciA0cF3X4+OMoMF/hIkC6xrhYW4U6WQzY8 qZQjajs5vn1MiaYHpl9MELATtfBbDjI= X-Google-Smtp-Source: APXvYqwO4XSDnSjJke+zMGw7UzsPVxjOjyoI4K6tKznfazq0vQdXM055dIK5J4vApI32tn5G5Ujqfw== X-Received: by 2002:a7b:c3d8:: with SMTP id t24mr165664wmj.175.1579538279893; Mon, 20 Jan 2020 08:37:59 -0800 (PST) Received: from localhost (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id z3sm48178449wrs.94.2020.01.20.08.37.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 08:37:56 -0800 (PST) Date: Mon, 20 Jan 2020 17:37:54 +0100 From: Tomas Vondra To: "tsunakawa.takay@fujitsu.com" Cc: "pgsql-hackers@postgresql.org" Subject: Re: SLRU statistics Message-ID: <20200120163754.mbbkbhzaummlo47c@development> References: <20200119143707.gyinppnigokesjok@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Jan 20, 2020 at 01:04:33AM +0000, tsunakawa.takay@fujitsu.com wrote: >From: Tomas Vondra >> One of the stats I occasionally wanted to know are stats for the SLRU >> stats (we have couple of those - clog, subtrans, ...). So here is a WIP >> version of a patch adding that. > >How can users take advantage of this information? I think we also need >the ability to set the size of SLRU buffers. (I want to be freed from >the concern about the buffer shortage by setting the buffer size to its >maximum. For example, CLOG would be only 1 GB.) > You're right the users can't really take advantage of this - my primary motivation was providing a feedback for devs, benchmarking etc. That might have been done with DEBUG messages or something, but this seems more convenient. I think it's unclear how desirable / necessary it is to allow users to tweak those caches. I don't think we should have a GUC for everything, but maybe there's some sort of heuristics to determine the size. The assumption is we actually find practical workloads where the size of these SLRUs is a performance issue. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services