From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1955990AbdDZGV1 (ORCPT ); Wed, 26 Apr 2017 02:21:27 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:34379 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1954574AbdDZGVS (ORCPT ); Wed, 26 Apr 2017 02:21:18 -0400 Date: Wed, 26 Apr 2017 15:21:04 +0900 From: Sergey Senozhatsky To: Joonsoo Kim Cc: Sergey Senozhatsky , Andrew Morton , Minchan Kim , Sergey Senozhatsky , linux-kernel@vger.kernel.org, kernel-team@lge.com Subject: Re: [PATCH v4 2/4] zram: implement deduplication in zram Message-ID: <20170426062104.GG673@jagdpanzerIV.localdomain> References: <1493167946-10936-1-git-send-email-iamjoonsoo.kim@lge.com> <1493167946-10936-3-git-send-email-iamjoonsoo.kim@lge.com> <20170426040243.GC673@jagdpanzerIV.localdomain> <20170426060425.GC29773@js1304-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170426060425.GC29773@js1304-desktop> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (04/26/17 15:04), Joonsoo Kim wrote: > On Wed, Apr 26, 2017 at 01:02:43PM +0900, Sergey Senozhatsky wrote: > > On (04/26/17 09:52), js1304@gmail.com wrote: > > [..] > > > > > > Elapsed time: out/host: 88 s > > > mm_stat: 8834420736 3658184579 3834208256 0 3834208256 32889 0 0 0 > > > > > > > > > Elapsed time: out/host: 100 s > > > mm_stat: 8832929792 3657329322 2832015360 0 2832015360 32609 0 952568877 80880336 > > > > > > It shows performance degradation roughly 13% and save 24% memory. Maybe, > > > it is due to overhead of calculating checksum and comparison. > > > > I like the patch set, and it makes sense. the benefit is, obviously, > > case-by-case. on my system I've managed to save just 60MB on a 2.7G > > data set, which is far less than I was hoping to save :) > > > > > > I usually do DIRECT IO fio performance test. JFYI, the results > > were as follows: > > Could you share your fio test setting? I will try to re-generate the > result and analyze it. sure. I think I used this one: https://github.com/sergey-senozhatsky/zram-perf-test // hm... may be slightly modified on my box. I'll run more tests. what I did: #0 ZRAM_SIZE=2G ZRAM_COMP_ALG=lzo LOG_SUFFIX=NO-DEDUP FIO_LOOPS=2 ./zram-fio-test.sh #1 add `echo 1 > /sys/block/zram0/use_dedup` to create_zram ZRAM_SIZE=2G ZRAM_COMP_ALG=lzo LOG_SUFFIX=DEDUP FIO_LOOPS=2 ./zram-fio-test.sh both in ./conf/fio-template-static-buffer fio config. and then #2 ./fio-perf-o-meter.sh /tmp/test-fio-zram-NO-DEDUP /tmp/test-fio-zram-DEDUP > /tmp/RES -ss