ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Pavlov <dpavlov....@gmail.com>
Subject Re: ignite PureJavaCrc32 vs java.util.zip.CRC32 bench.
Date Tue, 14 Aug 2018 13:16:32 GMT
It depends.

CRC is a CPU-intensive operation, while WAL logging and page store write
are mostly about IO speed.

In the same time, it can make the huge impact on machines with fast IO and
slow CPU. So if we can apply change proposed by Evgeniy and Alexey it could
benefit performance because we save CPU. Later we can use it's power in a
more efficient manner (e.g. with compression).

вт, 14 авг. 2018 г. в 14:03, Yakov Zhdanov <yzhdanov@apache.org>:

> Guys, what time in % does crc calculation take in WAL logging process?
>
> --Yakov
>
> 2018-08-14 13:37 GMT+03:00 Dmitriy Pavlov <dpavlov.spb@gmail.com>:
>
> > Hi Alex, thank you for this idea.
> >
> > Evgeniy, Alex, would you like to submit the patch with bypassing
> > implementation differences to keep compatibility?
> >
> > Sincerely,
> > Dmitriy Pavlov
> >
> > вт, 14 авг. 2018 г. в 12:06, Alex Plehanov <plehanov.alex@gmail.com>:
> >
> > > Hello, Igniters!
> > >
> > > In java8 java.lang.zip.CRC32 methods become intrinsic, moreover new
> > > "update" method, which use ByteBuffer was introduced. Since we moved to
> > > java8, perhaps we really can get performance boost by using standard
> > > java.lang.zip.CRC32 instead of PureJavaCrc32.
> > >
> > > About compatibility: looks like PureJavaCrc32 implements the same
> > algorithm
> > > as java.lang.zip.CRC32. These two implementations uses the same
> > polynomial
> > > and the same initial value. The only difference is final xor mask
> > > (0xFFFFFFFF for java.lang.zip.CRC32). So, we can easily convert from
> > > PureJavaCrc32
> > > to standard CRC32 and vice versa, using this expression: crc32 ^=
> > > 0xFFFFFFFF
> > >
> > >
> > > 2018-08-14 0:19 GMT+03:00 Eduard Shangareev <
> eduard.shangareev@gmail.com
> > >:
> > >
> > > > Evgeniy,
> > > >
> > > > Could you share benchmark code? And please share what version of JVM
> > > > you have used.
> > > >
> > > > On Mon, Aug 13, 2018 at 10:44 PM Zhenya <arzamas123@mail.ru.invalid>
> > > > wrote:
> > > >
> > > > > I think it would break backward compatibility, as Nikolay mentioned
> > > above
> > > > > we would take exception here:
> > > > >
> > > > > [1]
> > > > >
> > > > > https://github.com/apache/ignite/blob/master/modules/
> > > > core/src/main/java/org/apache/ignite/internal/processors/
> > > > cache/persistence/file/FilePageStore.java#L372
> > > > >
> > > > > thats why i question for community thoughts here.
> > > > >
> > > > > > Hi Evgeniy,
> > > > > >
> > > > > > would you like to submit a patch with CRC32 implementation
> change?
> > > > > >
> > > > > > Sincerely,
> > > > > > Dmitriy Pavlov
> > > > > >
> > > > > > пн, 13 авг. 2018 г. в 22:08, Евгений Станиловский
> > > > > > <arzamas123@mail.ru.invalid>:
> > > > > >
> > > > > >> Hi, igniters, i wrote a simple bench, looks like PureJavaCrc32
> has
> > > > > >> performance problems in compatible with zip.CRC32.
> > > > > >>
> > > > > >> Benchmark Mode Cnt Score Error Units
> > > > > >> BenchmarkCRC.Crc32 avgt 5 1088914.540 ± 368851.822 ns/op
> > > > > >> BenchmarkCRC.pureJavaCrc32 avgt 5 6619408.049 ± 3746712.210
> ns/op
> > > > > >>
> > > > > >> thoughts?
> > > > >
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message