Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1631906

Re: [PATCH v4 2/4] zram: implement deduplication in zram

From Joonsoo Kim <js1304@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 2/4] zram: implement deduplication in zram
Date 2017-04-27 09:00 +0200
Message-ID <tALzb-5ht-3@gated-at.bofh.it> (permalink)
References <tAjtf-3t4-3@gated-at.bofh.it> <tAjtg-3t4-19@gated-at.bofh.it> <tAmr7-5Bg-5@gated-at.bofh.it> <tAojf-6NY-11@gated-at.bofh.it> <tAoCC-6Wg-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Apr 26, 2017 at 03:21:04PM +0900, Sergey Senozhatsky wrote:
> 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:
> > > [..]
> > > > <no-dedup>
> > > > Elapsed time: out/host: 88 s
> > > > mm_stat: 8834420736 3658184579 3834208256 0 3834208256 32889 0 0 0
> > > > 
> > > > <dedup>
> > > > 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.
> 
> 

Hello,

I tested with your benchmark and found that contention happens
since the data page is perfectly the same. All the written data (2GB)
is de-duplicated.

I tried to optimize it with read-write lock but I failed since
there is another contention, which cannot be fixed simply. That is
zsmalloc. We need to map the object and compare the content of the
compressed page to check de-duplication. Zsmalloc pins the object
by using bit spinlock when mapping. So, parallel readers to the same
object contend here.

I think that this case is so artificial and, in practice, there
would be no case that the same data page is repeatedly and parallel
written as like this. So, I'd like to keep current code. How do you
think about it, Sergey?

Just note, if we do parallel read (direct-io) to the same offset,
zsmalloc contention would happen regardless deduplication feature.
It seems that it's fundamental issue in zsmalloc.

Thanks.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/4] zram: implement deduplication in zram js1304@gmail.com - 2017-04-26 03:00 +0200
  [PATCH v4 2/4] zram: implement deduplication in zram js1304@gmail.com - 2017-04-26 03:00 +0200
    Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 04:20 +0200
      Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-04-26 08:00 +0200
        Re: [PATCH v4 2/4] zram: implement deduplication in zram Minchan Kim <minchan@kernel.org> - 2017-04-26 08:30 +0200
          Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-04-26 09:10 +0200
            Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 09:30 +0200
              Re: [PATCH v4 2/4] zram: implement deduplication in zram Minchan Kim <minchan@kernel.org> - 2017-04-26 09:50 +0200
          Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 09:20 +0200
    Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 04:40 +0200
      Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 08:10 +0200
      Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-04-26 08:10 +0200
    Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 06:10 +0200
      Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-04-26 08:10 +0200
        Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 08:30 +0200
          Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-04-27 09:00 +0200
            Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-27 09:50 +0200
              Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-05-02 07:40 +0200
    Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 06:30 +0200
      Re: [PATCH v4 2/4] zram: implement deduplication in zram Joonsoo Kim <js1304@gmail.com> - 2017-04-26 08:10 +0200
        Re: [PATCH v4 2/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-26 08:20 +0200
  Re: [PATCH v4 0/4] zram: implement deduplication in zram Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-04-27 10:00 +0200

csiph-web