Received: by 10.223.185.116 with SMTP id b49csp4525250wrg; Tue, 6 Mar 2018 18:14:57 -0800 (PST) X-Google-Smtp-Source: AG47ELszeiAbJOEW5PhN7kdrKP23EmzmLDNnUx9MJ07vpnDmkA17NJS5l6vRH/dLPtA5Wts4EYXA X-Received: by 10.99.104.73 with SMTP id d70mr16631846pgc.107.1520388896970; Tue, 06 Mar 2018 18:14:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520388896; cv=none; d=google.com; s=arc-20160816; b=Wt7z6IQCBjmTQDtXsZdhXPoAs4Xn+ml8yLp2l0gq6Z3JtyNcXNAKPAdazG/sv1x5TK jdS8fGHh0a+H0hng1LavqmQxofrHYqosSQw3VcykgL/GO5gBKv+vUx12IWbRGu4O8Ddm C4Ca2smCis4ox6/fRbEceGk3uWqGWTneYjI/lGVyeZW/sForiX4XKoWwtUisp9Gy3akI 532uRROJf8Ivr0IX6F/80J+jOxFe18G6JEDlfkDPcK4EKg6Cg9Hizl5yM80DQQoFBp+H XafcX5T00AJzvKo4ismgd/j3t1Y9+v0VEFvTPYwc0dOs/56M/pgznh2QwXjaLWknGrPn tiRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=neYJo9RnL5xYsrPE/OERcEUq8ozDgfNMIgMx26mg8zQ=; b=Go+pWPwPt3HuEX31lYRBt8gmvfsOkuzoluYmtEOQRukhDhh/u83RsdQSop8Do+7hEh xNfA3dUFmqk0YHI6alzvJAuCEI/bsQ6EkJl7KH///3LkVqFnOxKa81l6x7DOwHr2PWLb 8LL0EmjUuHsuXfpt+QhEptGz27m+VzBdTsv6v02sNG9dqs11cGY/eIW8FXDketZ5SMya lX+Rh2wV29YCz1/Mex+ZkkEhxvQgF6+cSc1705fZQv39chQXC2BFwTKmSJj1VdzW60ye WJERHVudVUdHFuMauMMR1WrXLo9/+vz9RlJKfO8G+fhxN+rYMzIsq4DjipI31f2a0Nxf eorA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OvhZ1xvd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id z8-v6si12030219plk.305.2018.03.06.18.14.42; Tue, 06 Mar 2018 18:14:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@gmail.com header.s=20161025 header.b=OvhZ1xvd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1754070AbeCGCM7 (ORCPT + 99 others); Tue, 6 Mar 2018 21:12:59 -0500 Received: from mail-pg0-f52.google.com ([74.125.83.52]:41704 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753857AbeCGCM5 (ORCPT ); Tue, 6 Mar 2018 21:12:57 -0500 Received: by mail-pg0-f52.google.com with SMTP id q27so318804pgn.8; Tue, 06 Mar 2018 18:12:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=neYJo9RnL5xYsrPE/OERcEUq8ozDgfNMIgMx26mg8zQ=; b=OvhZ1xvdsWUyiACsdX9+fh72EV5zTvbLCI3OXqAAlK/w4PRDqtV6AwjhkxD20R0cKN Xl+pTkLHILOyH413cVd1TQoFuOQb4Gm4nrUzK6uueUG0PlAOd1jf0s+NIpOC4EIICTfG q5w9B1Q9yo676TG6W7rbSzA88gF6o93pODITp+TxLu88FaZLtfTbIT+3TpTgKrk118Lo phohkU7WnOG3qKdL4g6kSIouR0orXavPGrB+2XBhQCbs4MLYx5MsJuDfHbJONttO7LUT B9oXcmwlwJgc2j5Mj4Tn695E0DrcTaS15dSJ2H3s39v5Adi8YBfp4wNOTASrNqEJdKQZ CPhw== 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:content-transfer-encoding :in-reply-to:user-agent; bh=neYJo9RnL5xYsrPE/OERcEUq8ozDgfNMIgMx26mg8zQ=; b=iZsq0NLhr2RJ66X8yCz+ptyNBUNF8x3PEqr4WCBetMhW+fRwbNg8AbR7h4QqE7FYWg wF3gFeLa2lw9Na0j3BrcGCbyTzTv0cg1UGmuwvgmc+8SNz3w/ZWY/sNyChhrsPOq6KHS iGADE3Jib3Qs1+THJn3YiA3hg7PUjOaLhGg03pmBW8DGgxRtXGspZM9oKVJo0uFp/ngi JbTir6+hNFGjzDF1gry2KwJvUctPQWq4d7JloaeKGGtHUu8+LnEb5W31KK7jqlfTPWXe AbN9eFlhNGtHMHSfjs8mKVO2ruEOq8ttTgNQZs1jd6JJHBnHZmbrS6RBMl8iJNgOZe0l TAuQ== X-Gm-Message-State: APf1xPCYySJo+zxT3fFV7+V2U+4DDflo/757f/llz/yjTnkYAHKww63z y9vEr6V98Q7wYal7fvOakqE= X-Received: by 10.98.34.75 with SMTP id i72mr20683901pfi.165.1520388776796; Tue, 06 Mar 2018 18:12:56 -0800 (PST) Received: from localhost ([110.70.52.8]) by smtp.gmail.com with ESMTPSA id d75sm8968009pga.38.2018.03.06.18.12.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Mar 2018 18:12:55 -0800 (PST) Date: Wed, 7 Mar 2018 11:12:52 +0900 From: Sergey Senozhatsky To: Benjamin Warnke <4bwarnke@informatik.uni-hamburg.de> Cc: Linux Crypto Mailing List , linux-kernel@vger.kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com Subject: Re: [RESEND PATCH v3] crypto: add zBeWalgo compression for zram Message-ID: <20180307021252.GA802@jagdpanzerIV> References: <8CFBD60E-6A2B-4766-B6F9-09A98DEA26CB@informatik.uni-hamburg.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8CFBD60E-6A2B-4766-B6F9-09A98DEA26CB@informatik.uni-hamburg.de> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On (03/06/18 20:59), Benjamin Warnke wrote: > Currently ZRAM uses compression-algorithms from the crypto-api. ZRAM > compresses each page individually. As a result the compression algorithm > is > forced to use a very small sliding window. None of the available > compression > algorithms is designed to achieve high compression ratios with small > inputs. I think you first need to merge zBeWalgo (looks like a long way to go) And then add ZRAM support, as a separate patch. > - 'ecoham' (100 MiB) This dataset is one of the input files for the > scientific > application ECOHAM which runs an ocean simulation. This dataset contains a > lot of zeros. Where the data is not zero there are arrays of floating > point > values, adjacent float values are likely to be similar to each other, > allowing for high compression ratios. > > algorithm | ratio ??| compression ???| decompression > zbewalgo ?| ??12.94 | ?294.10 MBit/s | 1242.59 MBit/s > deflate ??| ??12.54 | ??75.51 MBit/s | ?736.39 MBit/s > 842 ??????| ??12.26 | ?182.59 MBit/s | ?683.61 MBit/s > lz4hc ????| ??12.00 | ??51.23 MBit/s | 1524.73 MBit/s > lz4 ??????| ??10.68 | 1334.37 MBit/s | 1603.54 MBit/s > lzo ??????| ???9.79 | 1333.76 MBit/s | 1534.63 MBit/s > > - 'source-code' (800 MiB) This dataset is a tarball of the source-code > from a > linux-kernel. > > algorithm | ratio ??| compression ???| decompression > deflate ??| ???3.27 | ??42.48 MBit/s | ?250.36 MBit/s > lz4hc ????| ???2.40 | ?104.14 MBit/s | 1150.53 MBit/s > lzo ??????| ???2.27 | ?444.77 MBit/s | ?886.97 MBit/s > lz4 ??????| ???2.18 | ?453.08 MBit/s | 1101.45 MBit/s > 842 ??????| ???1.65 | ??64.10 MBit/s | ?158.40 MBit/s > zbewalgo ?| ???1.19 | ??52.89 MBit/s | ?197.58 MBit/s > > - 'hpcg' (8 GiB) This dataset is a (partial) memory-snapshot of the > running hpcg-benchmark. At the time of the snapshot, that application > performed a sparse matrix - vector multiplication. > > algorithm | ratio ??| compression ???| decompression > zbewalgo ?| ??16.16 | ?179.97 MBit/s | ?468.36 MBit/s > deflate ??| ???9.52 | ??65.11 MBit/s | ?632.69 MBit/s > lz4hc ????| ???4.96 | ?193.33 MBit/s | 1607.12 MBit/s > 842 ??????| ???4.20 | ?150.99 MBit/s | ?316.22 MBit/s > lzo ??????| ???4.14 | ?922.74 MBit/s | ?865.32 MBit/s > lz4 ??????| ???3.79 | ?908.39 MBit/s | 1375.33 MBit/s > > - 'partdiff' (8 GiB) Array of double values. Adjacent doubles are similar, > but > not equal. This array is produced by a partial differential equation > solver > using a Jakobi-implementation. > > algorithm | ratio ??| compression ???| decompression > zbewalgo ?| ???1.30 | ?203.30 MBit/s | ?530.87 MBit/s > deflate ??| ???1.02 | ??37.06 MBit/s | 1131.88 MBit/s > lzo ??????| ???1.00 | 1741.46 MBit/s | 2012.78 MBit/s > lz4 ??????| ???1.00 | 1458.08 MBit/s | 2013.88 MBit/s > lz4hc ????| ???1.00 | ?173.19 MBit/s | 2012.37 MBit/s > 842 ??????| ???1.00 | ??64.10 MBit/s | 2013.64 MBit/s Hm, mixed feelings. -ss