Re: Cost of XLogInsert CRC calculations

From: Hannu Krosing <hannu(at)skype(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: 'Simon Riggs' <simon(at)2ndquadrant(dot)com>, 'Christopher Kings-Lynne' <chriskl(at)familyhealth(dot)com(dot)au>, 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 'Bruce Momjian' <pgman(at)candle(dot)pha(dot)pa(dot)us>, Mark Cave-Ayland <m(dot)cave-ayland(at)webbased(dot)co(dot)uk>
Subject: Re: Cost of XLogInsert CRC calculations
Date: 2005-05-16 13:07:51
Message-ID: 1116248871.4806.33.camel@fuji.krosing.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On E, 2005-05-16 at 12:12 +0100, Mark Cave-Ayland wrote:
> > -----Original Message-----
> > From: Mark Cave-Ayland [mailto:m(dot)cave-ayland(at)webbased(dot)co(dot)uk]
> > Sent: 16 May 2005 09:04
> > To: 'Simon Riggs'
> > Cc: 'Christopher Kings-Lynne'; 'Tom Lane'; 'Bruce Momjian';
> > 'pgsql-hackers(at)postgresql(dot)org'
> > Subject: RE: [HACKERS] Cost of XLogInsert CRC calculations
>

>
> Win32 UINT64: 0x782104059a01660 (crc0) ~158us
> Win32 UINT32: 0x78210405 (crc1), 0x59a01660 (crc0) ~58us
> FC1 UINT64: 0x782104059a01660 (crc0) ~76us
> FC1 UINT32: 0x78210405 (crc1), 0x59a01660 (crc0) ~29us

It would interesting to see how much of the time taken is actual algorithm
and how much is getting at the data (i.e the fact that the page has to go
through CPU at all, instead DMA'ing it to disk).

In your test setup you probably have the whole thing in CPU cache already,
but still it would be interesting to time the same thing with some simple
algorithm, like XOR over the whole 8k page, for comparison.

--
Hannu Krosing <hannu(at)skype(dot)net>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2005-05-16 13:14:57 Re: Best way to scan on-disk bitmaps
Previous Message Gaetano Mendola 2005-05-16 12:34:14 keepalive