Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp451380ybg; Sun, 26 Jul 2020 09:45:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/zQf3m2XyC117PkC+s0xPILnPv9PFbr9ghXYIezU2Nk/a+Nl72wYIpWPDN+5p1ksKkNlQ X-Received: by 2002:a17:906:a3d9:: with SMTP id ca25mr13421227ejb.164.1595781912623; Sun, 26 Jul 2020 09:45:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595781912; cv=none; d=google.com; s=arc-20160816; b=q5xQlfc6DP1uLF+I1z8+DT0WEormzGuxH3HfQsKLaC6RrXt0oKHeWrxfo3MqXvzth7 URY/zWyrQcJR6qUPOFSoTH+r3OaEgxH56lQ+OEYkY8vWTV4g3sFpvZccgOAX+KQrlr6c XVg6uMmSor2GxxmqHgoAoIXJWYdK0FrJ4bQkt/jtIno4Cve4+z5tsWskbty+IetfqqzO egdV80hQmSyoOa0VN4Ke5jZeSUXx/NBiN2ccDxPcUZ12DbuIx2ggfkYV4w2pHKFxj6Fz 1Bn3JxYKRtoJA5Bj7H6AmkivT+v15rjRBF800nH4+f5g2grFST5XnbKXVTjuZNMis4FG Rivw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:dkim-signature; bh=WG+IiSADj4bC8adDl2auSWlEfulYkcaFltfgstRWQ5Y=; b=TRAmrWNOZD+n/Xjg3eT6d5rRdfAaZsUdbTrdIih3P/5TRz3//3lhtn2GEbYGiLP4ro 6cLArK3vjxWqoi9y7UzlkJynh9Xb0ZTBU+bgnuHiCn4OlKh82Bv9yvUMdLIUf8sXtuBh /3QpojVt7DAih3az1b8SjW3xfbM6hXyiah17MxdarSApp0sB6yrjtc62EFACAxHxjYPb 8TwcyLTdEQaAvmOSXBQtMV6EOOro4SA+7bKGNPBUAVArBnsyDloOLV8TVtj7rh5C0Eoj Qgpv5EWz45usMD3OPttmVFvFIavaIOKA8j2WtB225PoIp7TncnrvksLwLZbTj7gVAOWb rHIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FKU5MvfQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e23si4202304eja.122.2020.07.26.09.44.51; Sun, 26 Jul 2020 09:45:12 -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=@gmail.com header.s=20161025 header.b=FKU5MvfQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726739AbgGZQoL (ORCPT + 99 others); Sun, 26 Jul 2020 12:44:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726117AbgGZQoL (ORCPT ); Sun, 26 Jul 2020 12:44:11 -0400 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EB1BC0619D2; Sun, 26 Jul 2020 09:44:11 -0700 (PDT) Received: by mail-ot1-x344.google.com with SMTP id h1so10574490otq.12; Sun, 26 Jul 2020 09:44:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=WG+IiSADj4bC8adDl2auSWlEfulYkcaFltfgstRWQ5Y=; b=FKU5MvfQ5K1ZlsKoTdFXi482971xJ8n8FjvZVjcIhM6gB+/8mytUpIch25b/fAE+oJ udwQB3URwVq3O+46c9le9KD3NUXxKDLTit/DxfbO5DCussKq3Rp2ulxLZMLMZ7MM9w1W J2G6OucCGO9Z5Mz5i8sHF4KGg/5Zg7/H336MHN9zbf026cUwuHv/aeOUgdwowd6+EC2F L+oOFGqYePeG3mJKcV2TDTTeatw03f+XqepZ8erGEtsmP4Hi1zIhWCuakDx16NJ8l4Bb 0wMpBePLihDxP76vQHVuqtsdn48MVegp/CzteTtME9N0LSYx1Dm5NTr3iAFIhtok+CCJ g7Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=WG+IiSADj4bC8adDl2auSWlEfulYkcaFltfgstRWQ5Y=; b=lgpxYpj8f2qRbqio/xpNZ/vhwFAGb+k3MuKzU2C3QgX7ArJQxehyOWNthv4XnD+6ML N3KcazJXPvLdUGgYjta9FS+9d2HCqr4YmM3cS/TwqF2PbIKlLfpDDMg1VCqvuQapTaCU KM3JraiAdUpYgmFFL/qcKD8n6d1psozD9FVB5GbA9fVRQ7Nqvb5y/gSu35CHEDxLOef+ YrmZfasJhX5xsab4jwpDis5+J96eVa7GGBjSn60DRn9wM+F+y3q2BxsCsBSDxMhxp8IO dFGPBzyvidEorGKohmhEVLq8Fu+PxzY74BF5M2e1+35+orY8O6bjtw4NKalrJ5kqxdad aH6Q== X-Gm-Message-State: AOAM533naQe+22lOKgVkjN9lCCqc0sP3okB3fSZxxUWHCxXiBSHqgI0q 9iYZAKBpGea01JrK/SF24fcURYX+6smk3dWtl0vZwZOLycM= X-Received: by 2002:a9d:2c29:: with SMTP id f38mr5654679otb.234.1595781850542; Sun, 26 Jul 2020 09:44:10 -0700 (PDT) MIME-Version: 1.0 From: Jan Ziak <0xe2.0x9a.0x9b@gmail.com> Date: Sun, 26 Jul 2020 18:43:34 +0200 Message-ID: Subject: Re: Kernel compression benchmarks To: alex_y_xu@yahoo.ca Cc: Kernel-team@fb.com, clm@fb.com, gregkh@linuxfoundation.org, keescook@chromium.org, kilobyte@angband.pl, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, nickrterrell@gmail.com, nolange79@gmail.com, oss@malat.biz, patrick@stwcx.xyz, patrickw3@fb.com, rmikey@fb.com, sedat.dilek@gmail.com, terrelln@fb.com, x86@kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello I looked at the SVG graphs and it appears that the formula used wasn't T_load+T_decompress, but was just T_decompress. Without considering the time it takes to load the compressed data from a storage device, the SVG graphs are only half-done and might be deceiving. There are 3 kinds of typical device speeds nowadays, the sequential read speed of a large non-fragmented compressed file is one of the following: 100 MB/s: rotational disks and USB flash drives 500 MB/s: SATA SSD 2 GB/s: NVMe SSD The read speeds of USB flash devices vary a lot, but in case of recent high-speed USB flash drives it falls into the 100 MB/s category of rotational disks. Taking USB flash read speed into consideration is important for deciding which compression to use when creating the ISO image of a Linux distribution. In summary: Instead of the 1 kernel-decomp.svg file, there should be 3 kernel-read-decomp.svg files. Similarly in the case of the initramfs-decomp.svg file. As a rule of thumb, if the kernel and initramfs are stored on a NVMe SSD then simply select the fastest decompressor without considering the compression ratio - or avoid using any compression at all in which case T_decompress will be zero. The formula T_load+T_decompress assumes that loading and decompression aren't executing in parallel. If they are, the formula should be max(T_load, T_decompress). Sincerely Jan