From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 934F9C05027 for ; Thu, 26 Jan 2023 21:53:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231915AbjAZVxf (ORCPT ); Thu, 26 Jan 2023 16:53:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230515AbjAZVxe (ORCPT ); Thu, 26 Jan 2023 16:53:34 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD7187167B for ; Thu, 26 Jan 2023 13:52:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674769925; 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=S85UsRzvZQYkTBKSceyocQTqqLH5TMTs40zJAWm4tFI=; b=dnBPeN6h8AMfocT5kko4NOlY5XHfaPtdF1Wacgjiqah1D2iUjdTZSzSt32kkyzkAUkQf3r W2KEM4VWRvfe8LiuTGZbtEEQzT5z7uXKWB5kOMMii9mv+H3YXc8dInYCTNHbZSEKyfuKT4 6avKSEidQCWNmNGeAQm+iT2Qk4zpHDw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-112-wV0OtDMPOH-CAD-JtIFcRw-1; Thu, 26 Jan 2023 16:52:00 -0500 X-MC-Unique: wV0OtDMPOH-CAD-JtIFcRw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3E5DA29AA382; Thu, 26 Jan 2023 21:52:00 +0000 (UTC) Received: from localhost (unknown [10.39.192.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6CEB251E5; Thu, 26 Jan 2023 21:51:59 +0000 (UTC) Date: Thu, 26 Jan 2023 16:51:57 -0500 From: Stefan Hajnoczi To: Maged Mokhtar Cc: Ilya Dryomov , Dongsheng Yang , ceph-devel@vger.kernel.org, vromanso@redhat.com, kwolf@redhat.com, mimehta@redhat.com, acardace@redhat.com Subject: Re: rbd kernel block driver memory usage Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iM7RHbsrI9xOGHBl" Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org --iM7RHbsrI9xOGHBl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 26, 2023 at 08:14:22PM +0200, Maged Mokhtar wrote: > in case of object map which the driver loads, takes 2 bits per 4 MB of im= age > size. 16 TB image requires 1 MB of memory. >=20 > > > I was trying to get a sense ofwhether to look deeper into the rbd dri= ver in a OOM kill scenario. >=20 > If you are looking into OOM, maybe look into lowering queue_depth which y= ou can specify when you map the image. Technically it belongs to the block = layer queue rather than the rbd driver itself, If you write 4MB block size = and your queue_depth is 1000, you need 4GB memory for inflight data for tha= t single image, if you have many images it could add up. Thanks! Stefan --iM7RHbsrI9xOGHBl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmPS9f0ACgkQnKSrs4Gr c8ivDwgAsbrnMzZapLKuvxV/IRG9GzERWB4v5myxCoMRZPH7wDgFWEqTQ+t6wxue qp1ScG3wFZLNLS9AdVpuPLZ3RAsnKq1tpIPfZ1v3hux8gp7XHvZrBuqtQuNCWlu3 EchbuHrmDvLOU/SkIvA8aEXy4TiVw4wsCKGtXrI1lxLk74NGOGI7lHKSuLYAWCFr 3IYnXCzFC2N0mJYhivzjSJccWA2gPLUkgA/iUETBYk79GCx2+kUGiAWYic9E+lqb nlzC7RlMDl6t5OHFsJBzS9ynx6jYyfAfeIUFrwUr4xI4VGZbS8/pOoMp1W+y/vLh D1UMBsWHfFO4L/T+iV4BSlqGRrII6A== =ZePB -----END PGP SIGNATURE----- --iM7RHbsrI9xOGHBl--