Re: [HACKERS] Full page writes improvement, code update

From: Hannu Krosing <hannu(at)skype(dot)net>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Koichi Suzuki <suzuki(dot)koichi(at)oss(dot)ntt(dot)co(dot)jp>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, josh(at)agliodbs(dot)com, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Full page writes improvement, code update
Date: 2007-04-11 05:33:32
Message-ID: 1176269612.3962.11.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Ühel kenal päeval, T, 2007-04-10 kell 18:17, kirjutas Joshua D. Drake:
> > In terms of idle time for gzip and other command to archive WAL offline,
> > no difference in the environment was given other than the command to
> > archive. My guess is because the user time is very large in gzip, it
> > has more chance for scheduler to give resource to other processes. In
> > the case of cp, idle time is more than 30times longer than user time.
> > Pg_compresslog uses seven times longer idle time than user time. On the
> > other hand, gzip uses less idle time than user time. Considering the
> > total amount of user time, I think it's reasonable measure.
> >
> > Again, in my proposal, it is not the issue to increase run time
> > performance. Issue is to decrease the size of archive log to save the
> > storage.
>
> Considering the relatively little amount of storage a transaction log
> takes, it would seem to me that the performance angle is more appropriate.

As I understand it it's not about transaction log but about write-ahead
log.

and the amount of data in WAL can become very important once you have to
keep standby servers in different physical locations (cities, countries
or continents) where channel throughput and cost comes into play.

With simple cp (scp/rsync) the amount of WAL data needing to be copied
is about 10x more than data collected by trigger based solutions
(Slony/pgQ). With pg_compresslog WAL-shipping seems to have roughly the
same amount and thus becomes a viable alternative again.

> Is it more efficient in other ways besides negligible tps? Possibly more
> efficient memory usage? Better restore times for a crashed system?

I think that TPS is more affected by number of writes than size of each
block written, so there is probably not that much to gain in TPS, except
perhaps from better disk cache usage.

For me pg_compresslog seems to be a winner even if it just does not
degrade performance.

--
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me: callto:hkrosing
Get Skype for free: http://www.skype.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message NikhilS 2007-04-11 05:39:12 Re: Idle idea for a feature
Previous Message Roman Neuhauser 2007-04-11 05:28:17 Re: [DOCS] uuid type not documented

Browse pgsql-patches by date

  From Date Subject
Next Message Pavan Deolasee 2007-04-11 06:29:20 Re: [HACKERS] CIC and deadlocks
Previous Message Joshua D. Drake 2007-04-11 01:17:38 Re: [HACKERS] Full page writes improvement, code update