Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2631983rdh; Wed, 27 Sep 2023 08:13:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERfQpxEbC1uC8uzDKGrYjHjgeQolobU1OLnxFeRAOR/AwXHAbi7DfRdbmceLKEwrxldKhZ X-Received: by 2002:a05:6a20:8e26:b0:f0:50c4:4c43 with SMTP id y38-20020a056a208e2600b000f050c44c43mr3762036pzj.5.1695827603026; Wed, 27 Sep 2023 08:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695827603; cv=none; d=google.com; s=arc-20160816; b=iGK5ovXtrr+3+5te/QgM9z0tAvxB9wCUwJIBy7JEzJKtu3dXDNv0IZhrvoorIi92r0 xk0r78mugvz+djIFcpWLaxOcDpCypz64kpiYtbhXtK5zSbIIOx0PlfAD3lL/whZxwm7P fQ/FlC9coiNZvHUGmtlq/YikYbSndchioivRqAMUHhnycAx/gmPT4VrrK20PB+Wno+MX U7TQsLznay41S0im5new+wo3X5PJqm1b19edv7nw1KaxMF462zPcIngPe9RfcsVo7If4 Z0X8qaa7r7N2+hQ5KJPKKU8CVM7IwmE0UHiB/W0Qk1l1SjhFT8oDddSqgQFJCjdVy21D x1/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=YDHE3JkApzs60E1jlFo1xcOl7e6kV427DVyzUPY1i5Y=; fh=BqdyiU5jIbpRg89Fr0JhZEdClwCSu6nT9wDNuW1fyiU=; b=RigrS+uzxOtCjtUOfi1RL+X1kqX1dYzNj3ctlA78KF1buuy1Hj1/UQAsA0wK9W7lXE 3kNEfypUHOO1vxsIeQX+JOsSCQVgRp0JiXSQVkmcDJD9H2N3lSQEURibU9qJqd8mXfO9 jbtR7ynNdS871DMfkbByuCSPNvSXs1t51sLDbHOAS1nBZHWZR1hI3wsEfZ+VM9tn8FHs zOAQBwrHNHLDd+McPIPh0+zeRyjMcm+SyMThImow1yU8Ohhbis/cF94VAMxTuwJhD0np zQiOmO13DCGCroe60gfwxP/XauZ1LTidip46jjvCQAPfOZkD0p3jaFKfmxWL/RSF4ASU aK9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=esFuJVeN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id t9-20020a056a00138900b0068e37843a1bsi16744210pfg.162.2023.09.27.08.13.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 08:13:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=esFuJVeN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 0CF0F801B923; Wed, 27 Sep 2023 04:22:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231143AbjI0LWR (ORCPT + 99 others); Wed, 27 Sep 2023 07:22:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjI0LWQ (ORCPT ); Wed, 27 Sep 2023 07:22:16 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C144013A for ; Wed, 27 Sep 2023 04:22:14 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2c038a1e2e6so170504331fa.2 for ; Wed, 27 Sep 2023 04:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1695813733; x=1696418533; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YDHE3JkApzs60E1jlFo1xcOl7e6kV427DVyzUPY1i5Y=; b=esFuJVeNmryVgwpxBY9xtj+nQN9392WUx7/AyyrQkqU8LXcEemss/svhq94OGx9+0s BFwmpjRVKVnLkmc+psjYmLhntNNT3SR02QIGiTCv2FGAitHiSk12GLwYM355Hw3bZL3a RjSb1FQtpNnatJabymshL70mcxxZ4R1Y76yVpPs+JEkMcbsEB48KpJfWjdzCadhQIp7S QaU/sPY5NTkY9r2bjG40o9JwQpw62WOvl4Ro62JF4URDc255+JNJa1R59T+0lcSAYc03 H76oo/esywub9TtLhBkvpf0+BwteZa3S8+REa7tk4O4eSe+CP4nA7YtTQLuh+M87S9TW wLCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695813733; x=1696418533; h=content-transfer-encoding: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=YDHE3JkApzs60E1jlFo1xcOl7e6kV427DVyzUPY1i5Y=; b=t5WdESCdImZQJRmQzF9a3eecBm3AGzyCP2Dn9b94hUEef54ZxUqY7/Czse/Hb27FJD 2SeUQUGgLYhwtpg8xcPs+K/Mjk/uRvQ9g2XQpUf1G+zmJLRLV/RKiXFhcurwo29A8F/n x3tnLacPPdjUqvDcPycxlpHNd5dojudJ+w99myT7c+Xxvv3sLRBHNMi3bWE2SfszodrM ftXJ69ijdBBnaqDTMnwJnECcxDSsB2BCzibK9NM1IG5BJl59PhAe1igcnGaYn5cLatUW ERQA8vAICI7AVOQSUxH2ICaJLtce+5v3mg2JBr29tEWcA5MNAcizzKgS+lMCmOZGlTNm W6Dw== X-Gm-Message-State: AOJu0Yy+tj9Qf2qcrcSxwiXHDvekjKoZtLg8d+KFaRF9vluVarbWOBJH RcwgznVkr0GwEltiiiQkZevr74MYbKv4HXfgZSPDCA== X-Received: by 2002:a2e:7a09:0:b0:2c0:2edb:3b1 with SMTP id v9-20020a2e7a09000000b002c02edb03b1mr1625754ljc.37.1695813733051; Wed, 27 Sep 2023 04:22:13 -0700 (PDT) MIME-Version: 1.0 References: <20230922062558.1739642-1-max.kellermann@ionos.com> In-Reply-To: From: Max Kellermann Date: Wed, 27 Sep 2023 13:22:01 +0200 Message-ID: Subject: Re: [PATCH 1/2] fs/ceph/debugfs: make all files world-readable To: Ilya Dryomov Cc: Xiubo Li , Jeff Layton , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Venky Shankar , Gregory Farnum Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 27 Sep 2023 04:22:25 -0700 (PDT) On Wed, Sep 27, 2023 at 12:53=E2=80=AFPM Ilya Dryomov = wrote: > > This "ceph" tool requires installing 90 MB of additional Debian > > packages, which I just tried on a test cluster, and "ceph fs top" > > fails with "Error initializing cluster client: ObjectNotFound('RADOS > > object not found (error calling conf_read_file)')". Okay, so I have to > > configure something.... but .... I don't get why I would want to do > > that, when I can get the same information from the kernel without > > installing or configuring anything. This sounds like overcomplexifying > > the thing for no reason. > > I have relayed my understanding of this feature (or rather how it was > presented to me). I see where you are coming from, so adding more > CephFS folks to chime in. Let me show these folks how badly "ceph fs stats" performs: # time ceph fs perf stats {"version": 2, "global_counters": ["cap_hit", "read_latency", "write_latency"[...] real 0m0.502s user 0m0.393s sys 0m0.053s Now my debugfs-based solution: # time cat /sys/kernel/debug/ceph/*/metrics/latency item total avg_lat(us) min_lat(us) max_lat(us) stdev(us) [...] real 0m0.002s user 0m0.002s sys 0m0.001s debugfs is more than 200 times faster. It is so fast, it can hardly be measured by "time" - and most of these 2ms is the overhead for executing /bin/cat, not for actually reading the debugfs file. Our kernel-exporter is a daemon process, it only needs a single pread() system call in each iteration, it has even less overhead. Integrating the "ceph" tool instead would require forking the process each time, starting a new Python VM, and so on... For obtaining real-time latency statistics, the "ceph" script is the wrong tool for the job. Max