Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp216886pxu; Fri, 4 Dec 2020 01:14:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjiBcgEyTFv9+6KqCDrb0knrBSYvR1H3f97ufZlPg8dg8vLdIPlMA5YKf6pvYtnIIRvE3t X-Received: by 2002:a17:906:1752:: with SMTP id d18mr6323061eje.529.1607073269879; Fri, 04 Dec 2020 01:14:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607073269; cv=none; d=google.com; s=arc-20160816; b=bbydhNx73VssyU0+rkno0uAsugbZViffywWCm7yvtyCOMUvSrt0qauFq1cF31iEbCZ 9E1VfVCOvZf75KxyqCwNlwJHyAMySAFihqVHQinztrkS6GB0iv8fKzqEKfeBxA149y6E 426+IFvISy0w2fA+56Fz/gJiwnoaL5HKVy2K/xqCE5XONkJvbDoxRbLDvznpK0eo4yWG XpbOv+QNjxhsWUxq+UbK+0EM3pkezLte63SMWc5Xl8weJGEQfSQ+T1Jc/ACI1hCXYRxo cfyt6MFOP97v7qQPXobyfxbJCRjDQxrA7he9jKva/au6oYgEnU89sJo7TkFN9FjptdOm 2bJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/N3JWPWSHjuCdyfo7VgFC9Eox7LNMnKOtYh5z7qZpF8=; b=u3i3/+CidcYZChHAoCgIfTiLHy5A/tCiKwpCkjhfTUIwoSbGI0tyIiJi5cjoQrDNkA wQwIkEJcBSZOVm5xW+VVHV4u2+WIqFGNJzFjY635x41vedY0Z82I1I7Vcy7hTssfgiXU DRrAA1Na/9D+czSJ0GkbhaQhCjXtXsMt6T3roZ1uGmVZenVMt/yjBPuDar//L1otuIap WABnsnmWD9A8AfCeQoN7p4u0Q5ODrmZpjQTRxMZC092QSKfELRop4SOsG/oIAMl9RSyy ic6DXVOj6ND71MDfXbKfXlcMZYjxAVL/LqMrhUPq8GsEdlV58WFWwKz8LiXV6GLoEGsu 3eqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gcctQfqb; 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 ga12si271262ejb.522.2020.12.04.01.14.06; Fri, 04 Dec 2020 01:14:29 -0800 (PST) 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=gcctQfqb; 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 S1727479AbgLDJMj (ORCPT + 99 others); Fri, 4 Dec 2020 04:12:39 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49048 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725969AbgLDJMj (ORCPT ); Fri, 4 Dec 2020 04:12:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607073072; 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=/N3JWPWSHjuCdyfo7VgFC9Eox7LNMnKOtYh5z7qZpF8=; b=gcctQfqb8AVkEqNUbD2y8dyh4BUzjUXF6oFAtVQkiPeFdD26h5J4BBA/NRGuRd3C4wwFtz rkXGxi+Lmb1GDX+3yWzREhEI6bplJt6bSsvDNg770yiOntbNzE4agQ3l0HNTxRkI2SAuGt 0rM5hTAappZkAfk5+Dd4PuC+cmVz2oI= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-363-QKVokSULMzS_Ha8ORdW4Gg-1; Fri, 04 Dec 2020 04:11:09 -0500 X-MC-Unique: QKVokSULMzS_Ha8ORdW4Gg-1 Received: by mail-pj1-f69.google.com with SMTP id kk4so3004725pjb.7 for ; Fri, 04 Dec 2020 01:11:09 -0800 (PST) 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:user-agent; bh=/N3JWPWSHjuCdyfo7VgFC9Eox7LNMnKOtYh5z7qZpF8=; b=SDXhjH0wRl1S72Yc1dnGcfMZMlEZjkpDKjJQ9MlRj41RnBEgWVIbfQAMJkei6e5DNf ZZAXCpLtWy3BsdIfW2hNastY4h+rpKvd4XO6A9mFHj5ApJS8eqCGA2PDuymHwTqv2QoQ 8aKiJGaL2SjrFgSkMhzcmHe7dcMlSBK+ooSdIJvBdk9S8Pqk9SGu62XDaRZH5kIyaixT as/i2dgnan0v4VU9hHOTjIEyJJ5OjY5WlrAan6HDEiCLykUxMQAIjwTE0KTD2C+mASPq y8GNkHr4+hDGqcGtfJTZYyfFafg3xd2/1XWztc7nyFRxeSuLm/p5vjyyCtSh4PYxelg+ D0jQ== X-Gm-Message-State: AOAM530y6UAUSytv/cWecx9ir7aBqh/4b8BI6jEMHF/5idicwKQjSk6v R6BW7XXfaPJ38KKgMNaBcn2Db3aEt9TPKmiSXUB1bLeN4JglhCmkD5fC+7jaNZ4raG9yNkc8cjg HeKqup2qQruALjvrKtZXgyPg4 X-Received: by 2002:a17:90a:6809:: with SMTP id p9mr3167714pjj.112.1607073068607; Fri, 04 Dec 2020 01:11:08 -0800 (PST) X-Received: by 2002:a17:90a:6809:: with SMTP id p9mr3167694pjj.112.1607073068374; Fri, 04 Dec 2020 01:11:08 -0800 (PST) Received: from xiangao.remote.csb ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id b24sm1582460pjq.10.2020.12.04.01.11.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2020 01:11:08 -0800 (PST) Date: Fri, 4 Dec 2020 17:10:57 +0800 From: Gao Xiang To: Chao Yu Cc: Eric Biggers , jaegeuk@kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH v6] f2fs: compress: support compress level Message-ID: <20201204091057.GB2025226@xiangao.remote.csb> References: <20201203061715.60447-1-yuchao0@huawei.com> <20201204003119.GA1957051@xiangao.remote.csb> <20201204074323.GA2025226@xiangao.remote.csb> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 04, 2020 at 04:50:14PM +0800, Chao Yu wrote: ... > > > > > About the speed, I think which is also limited to storage device and other > > conditions (I mean the CPU loading during the writeback might be different > > between lz4 and lz4hc-9 due to many other bounds, e.g. UFS 3.0 seq > > write is somewhat higher vs VM. lz4 may have higher bandwidth on high > > Yeah, I guess my VM have been limited on its storage bandwidth, and its back-end > could be low-end rotating disk... Yeah, anyway that's in IO writeback path (no matter the time was working on IO or CPU calcualation...) > > > level devices since it seems some IO bound here... I guess but not sure, > > since pure in-memory lz4 is fast according to lzbench / lz4 homepage.) > > > > Anyway, it's up to f2fs folks if it's useful :) (the CR number is what > > I expect though... I'm a bit of afraid the CPU runtime loading.) > > I just have a glance at CPU usage numbers (my VM has 16 cores): > lz4hc takes 11% in first half and downgrade to 6% at second half. > lz4 takes 6% in whole process. > > But that's not accruate... There is some userspace lzbench [1] to benchmark lz4/lz4hc completely in memory. So it's expected that lz4bench will consume all 100% CPU with maximum bandwidth (but in-kernel lz4 version is lower though): Intel Core i7-8700K Compression Decompression C/R memcpy 10362 MB/s 10790 MB/s 100.00 lz4 1.9.2 737 MB/s 4448 MB/s 47.60 lz4hc 1.9.2 -9 33 MB/s 4378 MB/s 36.75 So adding more IO time (due to storage device difference) could make CPU loading lower (also could make the whole process IO bound) but the overall write bandwidth will be lower as well. [1] https://github.com/inikep/lzbench Thanks, Gao Xiang > > Thanks,