Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp846850pxb; Thu, 21 Oct 2021 10:34:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnOgyqjJp7xwQInZxZt6W3ZnM6Hs6PE6sDf+dU2O0yZ8tpj9ZVJQOj/YuoBrPIUsKRs0lV X-Received: by 2002:a17:907:1741:: with SMTP id lf1mr8421480ejc.225.1634837648986; Thu, 21 Oct 2021 10:34:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634837648; cv=none; d=google.com; s=arc-20160816; b=f1OCJM7qXchRfTCwS6ZxPVixpga1qC1WqEzycwMtX6tl00hwEDrJO9fcGPl/f5m5uF i8qaVPxfhJlYMYEjrnT6wDcTv65mTesQEWhOcFwQeqNSn7k0/Zj+dSvkgpVdpUHfZRDG pDPZ3nx5jgfMoKeZ0Qbl+ASBHGl03fghoLEJvKX2exoE9bTWvq+d55KwYKc5AaE9k5wI tI48aZ1K/4evleKX0tG7WgvN/dYryVtEkT46tU3p1RQU8tafdKZ79rlk5sJc6hpMfVfi 8FOxGCuZ0lO9znH8kgFw+zQ3pQEhKYluZPKT1FajHrrmcwp0j6PPju5AFzXcRCAZ87Px o2RA== 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=SJAMQ/lcGY4sk4CL6bHetg46Z5X4ql3TWvBmtMeLlSQ=; b=VwAEe0dB9EwyfxRRBGz/kIKfNKCMMgKfrQ4mr/3GzeKlyLAURJ6S7E7C97g+2E2FZh LI2DwilnuZ0vdvCfGBbRM0pIczCc4YbShHgYl3yY3uWxJTnCypVl4Z30Nym8Zw9fjlP5 BZEGEWy5hbcFrcQCEfaJJteQzKbMiavG8drIqWYX3AAOAI8F2UgFg0TDCeO4IqvdatqH nhYxG+LycqoDaNf6iv1fpn5D07Yt5EZMh+cSdSI4cY7/0s61H0PX0YfvBaRuzpdeMxtT gj4kxT4vj0N+mMBnXGPQeNCN+8DfUQzjrM4UeeZN5k19OLmrTyYscSpfeE+5n/oA0Kol SEIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Eis4K7+l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ks15si7766405ejb.305.2021.10.21.10.33.43; Thu, 21 Oct 2021 10:34:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Eis4K7+l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231622AbhJURdK (ORCPT + 99 others); Thu, 21 Oct 2021 13:33:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:25886 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229567AbhJURdH (ORCPT ); Thu, 21 Oct 2021 13:33:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634837451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SJAMQ/lcGY4sk4CL6bHetg46Z5X4ql3TWvBmtMeLlSQ=; b=Eis4K7+lpsz9gZpWVGiCkmost1I1VYLrscXTIJLkWUY+UwWev8KPShK9QMzcFL8wZX37+L 95CVyzoZIzcfD6x0BIgFs+pp+iwdtCNrdubQTGN6FUPFdU8pVZTJNUWNd4JT/F8zuv6YQc TmkqDnjtj1tVgNlA38oD6nEczIRtYSg= Received: from mail-il1-f200.google.com (mail-il1-f200.google.com [209.85.166.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-495-Vpox3pXDMYaoOJky1c5U8Q-1; Thu, 21 Oct 2021 13:30:49 -0400 X-MC-Unique: Vpox3pXDMYaoOJky1c5U8Q-1 Received: by mail-il1-f200.google.com with SMTP id s8-20020a92cbc8000000b002582a281a7bso780593ilq.10 for ; Thu, 21 Oct 2021 10:30:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=SJAMQ/lcGY4sk4CL6bHetg46Z5X4ql3TWvBmtMeLlSQ=; b=qTOt12IUcpdcXlsWKR6BM9hzjvncD72uT1+alR06OUUvIOZCjGpMdODqC4uv/7iprB ewf5nqY2VVDjvQzyizdkP6Xq/dQpDbC/pnKHfb70gj58A5ZdQZjhjMKwa1rzoVTR1HeN cVkKTRQtXgEYMJhS/7PODAVp8lXJ6ChCtuW0w1u72WsEBmI6J4Xq6ltEZqvj5EJ+l6uM pzQ+XINzx6Rx2tela4xt3qh6RGDDLub3Sw3Kj6XyhGZyZCZcBYWJNSua8vZHDcRHLoAP SZ4YhsxHkCldewHv+Os1dIDDHqZRlifO3LEPMFwveWQv69T9J7hyTF57T2g1WI11yWqB gaWQ== X-Gm-Message-State: AOAM533e9SerEYiZN7nKIymB8pqihEz3bqIo9H8DjZfx0I9WRZHPs6Qm zrab7oBCCc08pjypVwwmWvIlIpNJpII7G5OB9qMTYZkFN+CyhqrN+sOPYevtKuC1+sEu1OQkcew BZZm71gWGGfCZd08PHibfP0pvI/ylUMiXpNCWiMX6 X-Received: by 2002:a6b:cd8b:: with SMTP id d133mr5217591iog.88.1634837448898; Thu, 21 Oct 2021 10:30:48 -0700 (PDT) X-Received: by 2002:a6b:cd8b:: with SMTP id d133mr5217575iog.88.1634837448627; Thu, 21 Oct 2021 10:30:48 -0700 (PDT) MIME-Version: 1.0 References: <20211020143708.14728-1-lhenriques@suse.de> <34e379f9dec1cbdf09fffd8207f6ef7f4e1a6841.camel@kernel.org> <99209198dd9d8634245f153a90e4091851635a16.camel@kernel.org> In-Reply-To: From: Patrick Donnelly Date: Thu, 21 Oct 2021 13:30:22 -0400 Message-ID: Subject: Re: [RFC PATCH] ceph: add remote object copy counter to fs client To: Jeff Layton Cc: =?UTF-8?Q?Lu=C3=ADs_Henriques?= , Ilya Dryomov , Ceph Development , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 21, 2021 at 12:35 PM Jeff Layton wrote: > > On Thu, 2021-10-21 at 12:18 -0400, Patrick Donnelly wrote: > > On Thu, Oct 21, 2021 at 11:44 AM Jeff Layton wrote= : > > > > > > On Thu, 2021-10-21 at 09:52 -0400, Patrick Donnelly wrote: > > > > On Wed, Oct 20, 2021 at 12:27 PM Jeff Layton w= rote: > > > > > > > > > > On Wed, 2021-10-20 at 15:37 +0100, Lu=C3=ADs Henriques wrote: > > > > > > This counter will keep track of the number of remote object cop= ies done on > > > > > > copy_file_range syscalls. This counter will be filesystem per-= client, and > > > > > > can be accessed from the client debugfs directory. > > > > > > > > > > > > Cc: Patrick Donnelly > > > > > > Signed-off-by: Lu=C3=ADs Henriques > > > > > > --- > > > > > > This is an RFC to reply to Patrick's request in [0]. Note that= I'm not > > > > > > 100% sure about the usefulness of this patch, or if this is the= best way > > > > > > to provide the functionality Patrick requested. Anyway, this i= s just to > > > > > > get some feedback, hence the RFC. > > > > > > > > > > > > Cheers, > > > > > > -- > > > > > > Lu=C3=ADs > > > > > > > > > > > > [0] https://github.com/ceph/ceph/pull/42720 > > > > > > > > > > > > > > > > I think this would be better integrated into the stats infrastruc= ture. > > > > > > > > > > Maybe you could add a new set of "copy" stats to struct > > > > > ceph_client_metric that tracks the total copy operations done, th= eir > > > > > size and latency (similar to read and write ops)? > > > > > > > > I think it's a good idea to integrate this into "stats" but I think= a > > > > local debugfs file for some counters is still useful. The "stats" > > > > module is immature at this time and I'd rather not build any qa tes= ts > > > > (yet) that rely on it. > > > > > > > > Can we generalize this patch-set to a file named "op_counters" or > > > > similar and additionally add other OSD ops performed by the kclient= ? > > > > > > > > > > > > > Tracking this sort of thing is the main purpose of the stats code. I'= m > > > really not keen on adding a whole separate set of files for reporting > > > this. > > > > Maybe I'm confused. Is there some "file" which is already used for > > this type of debugging information? Or do you mean the code for > > sending stats to the MDS to support cephfs-top? > > > > > What's the specific problem with relying on the data in debugfs > > > "metrics" file? > > > > Maybe no problem? I wasn't aware of a "metrics" file. > > > > Yes. For instance: > > # cat /sys/kernel/debug/ceph/*/metrics > item total > ------------------------------------------ > opened files / total inodes 0 / 4 > pinned i_caps / total inodes 5 / 4 > opened inodes / total inodes 0 / 4 > > item total avg_lat(us) min_lat(us) max_lat(us) = stdev(us) > -------------------------------------------------------------------------= ---------- > read 0 0 0 0 = 0 > write 5 914013 824797 1092343 = 103476 > metadata 79 12856 1572 114572 = 13262 > > item total avg_sz(bytes) min_sz(bytes) max_sz(bytes) = total_sz(bytes) > -------------------------------------------------------------------------= --------------- > read 0 0 0 0 = 0 > write 5 4194304 4194304 4194304 = 20971520 > > item total miss hit > ------------------------------------------------- > d_lease 11 0 29 > caps 5 68 10702 > > > I'm proposing that Luis add new lines for "copy" to go along with the > "read" and "write" ones. The "total" counter should give you a count of > the number of operations. Okay that makes more sense! Side note: I am a bit horrified by how computer-unfriendly that table-formatted data is. --=20 Patrick Donnelly, Ph.D. He / Him / His Principal Software Engineer Red Hat, Inc. GPG: 19F28A586F808C2402351B93C3301A3E258DD79D