Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp738470ybt; Wed, 1 Jul 2020 08:53:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgLyzGNDidg6wivCoHZwvAiEfYF7JUdfNXijaAjopEEyM984hzOeN9HPLPB5wCA7tg1lEA X-Received: by 2002:a17:906:5595:: with SMTP id y21mr24084164ejp.61.1593618795327; Wed, 01 Jul 2020 08:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593618795; cv=none; d=google.com; s=arc-20160816; b=CIWI0DyoNZ80cLTZlvwYqgNWe8vEIE20oSgOdQy/kd/lp1fJLVG8L1fronI0aIE+2Z jBQt1Zcf5sUPSsl0fsuBTEGm4Z61OLMYOzyzRFmvwmsQnnhRUMau/UN14Yyjy5SwUcj/ BLCwfsVfeF8yCIgUmr6V5WyUex7hTrVC5UhcL67opKVm/me1CLCndYK0fCNeEH3tNAgE XQ5QWPSerhb0YvF3IM68FMUQoEs+m6ugoOX+oQAozFD353xGF96YoyNHD0fOmrVj1SvV PrC0j5ECjKrJ+CWbyqMgH3vsmun95sWeL42rND28b2+uAHOu8UyYSI7luFUPoFpE0Oyf /D0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:user-agent:in-reply-to :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=R5EdgnehZaIlYM8EBPA/vlDhBKIThSGmN4i2/1YN62k=; b=1Dhfpk40TmR40AOK49Ktg5vIudza30zFwjDQ7ldSTFyqaxNzsTGf1cHxbXtAwa/9Z6 7EWtwUuZr8emJPXCvFyKQ121nC+dVYi9/b1t76qaHXLh+93NUs+46wiB4HVipsYKRAfA 9EXfn5iDSWmVAFY9eD9dqpDFAVyfE8ggc+huY2DrZDCF+4d6JqF9xJqnxuOIP4PlHBob VvvKs3czQk5A3Bvi1ZgE/mPO9gKX+6lmf8jfbJxC1PHEwaegRhnxB1+Q4M+AkAd0QCIK dUuJ1xm5Rx8X7QDKu3lZYR2bz243xid8dm5RtnNio56EKAyriUHQJkpyu+9+4ctplh3v xz/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aol.com header.s=a2048 header.b=FvVOnHAN; 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=REJECT sp=REJECT dis=NONE) header.from=aol.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si4138041ejp.213.2020.07.01.08.52.51; Wed, 01 Jul 2020 08:53:15 -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=@aol.com header.s=a2048 header.b=FvVOnHAN; 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=REJECT sp=REJECT dis=NONE) header.from=aol.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732045AbgGAPue (ORCPT + 99 others); Wed, 1 Jul 2020 11:50:34 -0400 Received: from sonic314-19.consmr.mail.gq1.yahoo.com ([98.137.69.82]:35914 "EHLO sonic314-19.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726621AbgGAPue (ORCPT ); Wed, 1 Jul 2020 11:50:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1593618633; bh=R5EdgnehZaIlYM8EBPA/vlDhBKIThSGmN4i2/1YN62k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From:Subject; b=FvVOnHAN8bAvsJPvtXWz6Js8+X5IvcxO2HCuhgKGFI2sVqb5VJSlF+eg5uTfC0teesogeSYYNxHDTmIb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PvxKaehHMV275CSI8SRC wpLFxIUiMm60vNDOwbHElb149LGjR4CTYEVJ4fd55SNa460J8XilquJ2GuP6AzsIDvxNkMAkz7cp ELXsCdK4CRtL2OSO3vO_Mx3MpdsBTG07UoUpWS4UA9ktdIk5_OKLmt68hEwsvkx9vC7JxEDq.dxg TaLWuaT2JWnVXxkqsN9YGCfdgT3fr3nTIg2AgMWAVzI1SnlZ2l83cUR1mXqE61QppMviB7Hae6ya pb8GjjE8bjH04Rb5zgpmRUrtAzaOjDQxc0V2hcPZfw4iAYbCwR4Rk2uBLZHm0BR9VL8oVglK2EzC ld0Htls_OeNRrjQUtAF9AMr4ZzPum4O317sESQ_O1eYZngPx6GRXf3aIcF2IekxUF2_oK4wC6wsf lmLmFf17d_pX9qBuDrVAFIjAAfIw2Z0KZQx0xaSgu4_KARKy.5c949hHj3RrdxYCypW2nMWNFoWy T4g9.o.2FX5ZFu3GNROAF9Lb_FFHxUhx7hOBA_sExvHFf1WHjUvX5p7PMJFjIldrcevBQQvWLUMR 9xyEd_oiq2AHbVzAjWb89h7OL8OnBm7GfL8iH_AJsDT1lT.uwsum48NYSPZ0.CbD4J8d.GaNSCsq OZF_wzILo9.sO9MUhbVLP6HaPdwCeYMZkag-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.gq1.yahoo.com with HTTP; Wed, 1 Jul 2020 15:50:33 +0000 Received: by smtp415.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 9236ef3beededec92ee024faf27b2091; Wed, 01 Jul 2020 15:50:27 +0000 (UTC) Date: Wed, 1 Jul 2020 23:50:05 +0800 From: Gao Xiang To: "Alex Xu (Hello71)" Cc: linux-kernel@vger.kernel.org, Nick Terrell , Nick Terrell , Norbert Lange , Chris Mason , linux-kbuild@vger.kernel.org, x86@kernel.org, gregkh@linuxfoundation.org, Petr Malat , Kees Cook , Kernel Team , Adam Borowski , Patrick Williams , rmikey@fb.com, mingo@kernel.org, Patrick Williams , Sedat Dilek Subject: Re: Kernel compression benchmarks Message-ID: <20200701153028.GA30962@hsiangkao-HP-ZHAN-66-Pro-G1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1588791882.08g1378g67.none@localhost> User-Agent: Mutt/1.10.1 (2018-07-13) References: <20200701153028.GA30962.ref@hsiangkao-HP-ZHAN-66-Pro-G1> X-Mailer: WebService/1.1.16197 hermes_aol Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) Content-Length: 2235 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alex, (sorry... maybe my @gmx.com email is broken again...) On Wed, Jul 01, 2020 at 10:35:48AM -0400, Alex Xu (Hello71) wrote: > > My conclusions: > > - zstd is an improvement on almost all metrics. > - bzip2 and lzma should be removed post-haste. I'm some familar with LZ4 and LZMA (xz) internals. I'd like to add some notes from the principle perspective, but I'm not sure if I would join some further topic about this... XZ is another form of LZMA2, which is based on LZMA. It uses range coder technology. In principle, it has better compession ratio with slowest speed (due to multiplication by bits rather than lookup table). Instead, Zstd uses huffman (which is much like deflate, aka. gzip) and FSE (If I'm not wrong about Zstd)... So in general (apart from the specific implementation), the decompression speed vs compression ratio ralationship are LZ4 - Zstd - LZMA Some arguments such as compression level have impact on LZ matchfinder (yeah, except for bzip2, all algorithms are LZ-based) and dictionary size. And some specific compressors aren't well-optimized (e.g. zlib). Anyway, I think LZMA (xz) is still useful and which is more friendly to fixed-sized output compression than Zstd yet (But yeah, I'm not familar with all ZSTD internals. I will dig into that if I've more extra time). > - lzo should be removed once zstd is merged. > - compression level is important to consider for compression speed: the > default lz4 -1 compresses very fast but has a very poor compression > ratio. zstd -19 compresses barely better than zstd -18, but takes > significantly longer to compress. > - compression level should be configurable: lz4 -1 is useful, but so is > lz4 -9. zstd -1 is useful, but so is zstd -19. zstd -1 is useful for > developers who want kernel builds as fast as possible, zstd -19 for > everybody else. > - gzip is by far not the fastest compressor (even excluding cat) > - modern compressors (xz, lz4, zstd) decompress about as fast for each > compression level, only requiring more memory lz4 has fixed sliding window (dictionary, 64k), so it won't require more memory among different compression level when decompressing. Thanks, Gao Xiang