Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp744980ybb; Wed, 1 Apr 2020 08:52:19 -0700 (PDT) X-Google-Smtp-Source: APiQypKS81fAM0cHQenLlpqUZv28GMGOrK2/IYJyo1HgvEe3mQUqVhviFhC6ZUzcKlQcAJ2Cth8E X-Received: by 2002:aca:b382:: with SMTP id c124mr3104591oif.64.1585756338927; Wed, 01 Apr 2020 08:52:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585756338; cv=none; d=google.com; s=arc-20160816; b=hrBMvUFx9xG4mv5crGZmVHimoIYroVaD896YdHlYnQRd6HQ1AI/roaw4lNy11iwI2v 5bjBwskElcGqmDOqK07rERGstHAvKqTIeNDKzDMGRttDrH4vI80AYGslcD5Dy3CRlZHs e5szqLQOYN4IYSufggJ+cVdY/seijTCRpVdnghf2D0KoY39UybD3Fvy07HrabPJMD0tv dUQgu976ck9kJOqp4ixXlBS1J6qZDu6z6WlUhn7ac7kMoDMmIh7xO++7+pCi1oN6fYCG xu8BHi48dNmbIihCDum/XioD3RU6xWgQ8Zc1uuD4deglSFrvIHw+KitPu0fyBmdimx6i 44qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization :dkim-signature; bh=9Hue9l1/UJQF2U4lKyhSbPFzaMnHT5K5mJD7PcBNrM4=; b=oIN+tgZsjwk51LDu8sqaZ0u3NDyMbE1ce7WHn61ccfNE8eiSM/VlK3D5hEILGaiJuK 4p28IgiLlLqo5GLUS51zKBZA/ByGvMR1qICUHeTDZjTtzvpSaVnh5BBGkDseeR39nqzX g5cnyV3wc9uIvrzuyZ3GRTldUkt0Pf+g860EAKl9traKihnyyJ3OewUbiVkINssM51Uy w4Eb8b0ZarQkwKXPoli2JDAXDB2fGKCBcSwro0flg3AromHiEW7uat0UHUKX+QIHi/P/ xok+lIOvL0iFcwGZk3Jla6wqKhC2NKjq2po3HDmML4W3cwC0xHykDdFTL09pM1OO8GlY kPCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c2ypOqQp; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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. [209.132.180.67]) by mx.google.com with ESMTP id u207si1013336oia.176.2020.04.01.08.52.00; Wed, 01 Apr 2020 08:52:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c2ypOqQp; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 S1732929AbgDAPv4 (ORCPT + 99 others); Wed, 1 Apr 2020 11:51:56 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:51876 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732889AbgDAPvz (ORCPT ); Wed, 1 Apr 2020 11:51:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585756314; 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: in-reply-to:in-reply-to:references:references; bh=9Hue9l1/UJQF2U4lKyhSbPFzaMnHT5K5mJD7PcBNrM4=; b=c2ypOqQpiZB+D9K0IxvRsf2huk/tx7a+qg27vupMRMBFb0oSk0TFcMeyo6+LLabjXxEEkz gt27cysjL68cE7KsZUYdOdTfEINfktwxA+Oq/IBQYE21ZGXqQRyIQXebJ4WTS+Xozg24FX KYt7exPiHq3QvK+/3ZLn9u1gSkv5veA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-191-W2iZb2t4MKawS3j31oos7A-1; Wed, 01 Apr 2020 11:51:53 -0400 X-MC-Unique: W2iZb2t4MKawS3j31oos7A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1338113F7; Wed, 1 Apr 2020 15:51:48 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-114-243.ams2.redhat.com [10.36.114.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id D631696B87; Wed, 1 Apr 2020 15:51:43 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <158454408854.2864823.5910520544515668590.stgit@warthog.procyon.org.uk> <50caf93782ba1d66bd6acf098fb8dcb0ecc98610.camel@themaw.net> <2465266.1585729649@warthog.procyon.org.uk> To: Miklos Szeredi Cc: dhowells@redhat.com, Ian Kent , Linus Torvalds , Al Viro , Linux NFS list , Andreas Dilger , Anna Schumaker , "Theodore Ts'o" , Linux API , linux-ext4@vger.kernel.org, Trond Myklebust , Miklos Szeredi , Christian Brauner , Jann Horn , "Darrick J. Wong" , Karel Zak , Jeff Layton , linux-fsdevel@vger.kernel.org, LSM , linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/13] VFS: Filesystem information [ver #19] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2583799.1585756303.1@warthog.procyon.org.uk> Date: Wed, 01 Apr 2020 16:51:43 +0100 Message-ID: <2583800.1585756303@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Miklos Szeredi wrote: > For 30000 mounts, f= 146400us f2= 136766us p= 1406569us p2= > 221669us; p=9.6*f p=10.3*f2 p=6.3*p2 f = 146400us f2= 136766us p = 1406569us <--- Order of magnitude slower p2= 221669us And more memory used because it's added a whole bunch of inodes and dentries to the cache. For each mount that's a pair for each dir and a pair for each file within the dir. So for the two files my test is reading, for 30000 mounts, that's 90000 dentries and 90000 inodes in mountfs alone. (gdb) p sizeof(struct dentry) $1 = 216 (gdb) p sizeof(struct inode) $2 = 696 (gdb) p (216*696)*30000*3/1024/1024 $3 = 615 so 615 MiB of RAM added to the caches in an extreme case. We're seeing customers with 10000+ mounts - that would be 205 MiB, just to read two values from each mount. I presume you're not going through /proc/fdinfo each time as that would add another d+i - for >1GiB added to the caches for 30000 mounts. David