Re: what checksum algo?

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: what checksum algo?
Дата
Msg-id CAEYLb_VonTCf=j24RFpPPkpw_SnqvhpbvRJzgHJAvyyExG=WZg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: what checksum algo?  (Tatsuo Ishii <ishii@postgresql.org>)
Ответы Re: what checksum algo?
Список pgsql-general
On Wed, Nov 13, 2013 at 5:53 PM, Tatsuo Ishii <ishii@postgresql.org> wrote:
> It was good to see you in Japan.

Likewise.

> PostgreSQL Enterprise Consortium (non profit PostgreSQL related
> organization in Japan. http://www.pgecons.org) is about to inspect the
> performance impact of the checksum using High-end PC server (real 80
> cores with 2TB memory). What in my mind is using pgbench with custom
> query (purely SELECT). Is there any recommendations/suggestions in
> doing that?
>
> (The result will be in public of course).

Well, off the top of my head I would of course be sure to build
Postgres to take advantage of this:

 * Vectorization of the algorithm requires 32bit x 32bit -> 32bit integer
 * multiplication instruction. As of 2013 the corresponding instruction is
 * available on x86 SSE4.1 extensions (pmulld) and ARM NEON (vmul.i32).
 * Vectorization requires a compiler to do the vectorization for us. For recent
 * GCC versions the flags -msse4.1 -funroll-loops -ftree-vectorize are enough
 * to achieve vectorization.

Unfortunately I have no idea what packagers are currently doing about
this. Could you please enlighten me, Devrim?

It also occurs to me that pgbench will be pretty unsympathetic to
checksums as compared to a non-checksummed baseline here, because of
course as always it uses a uniform distribution, and that's going to
literally maximize the amount of verification that must occur. Maybe
that's something you're interested in, because you want to
characterize the worst case. If the average case is more interesting,
you could try applying this patch:

https://commitfest.postgresql.org/action/patch_view?id=1240

I don't know if the patch is any good, having not looked at the code,
but surely as the original author of pgbench you are eminently
qualified to judge this. I think that in general I prefer a uniform
distribution, because most often I look to pgbench to satisfy myself
that certain types of regressions have not occurred. That's quite a
different thing to a representative workload, obviously.

--
Regards,
Peter Geoghegan


В списке pgsql-general по дате отправления:

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: what checksum algo?
Следующее
От: Jayadevan
Дата:
Сообщение: Re: Theory question