From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Hervé Piedvache <herve(at)elma(dot)fr>, pgsql-performance(at)postgresql(dot)org |
Cc: | Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net>, Hervé Piedvache <footcow(at)noos(dot)fr> |
Subject: | Re: Insert are going slower ... |
Date: | 2004-07-18 17:23:21 |
Message-ID: | 200407181023.22004.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Herve'
> Hum ... it's only for speed aspect ... I was using postgresql with this
> option since 7.01 ... and for me fsync=on was so slow ...
> Is it really no time consuming for the system to bring it ON now with
> v7.4.3 ??
Well, I wouldn't do it until you've figured out the current performance
problem.
The issue with having fsync=off is that, if someone yanks the power cord on
your server, there is a significant chance that you will have to restore the
database from backup becuase it will be corrupted. But clearly you've been
living with that risk for some time.
It *is* true that there is significantly less performance difference between
7.4 with fsync off and on than there was between 7.1 with fsync off and on.
But there is still a difference. In 7.0 and 7.1 (I think), when you turned
fsync off it turned WAL off completely, resulting in a substantial difference
in disk activity. Now, it just stops checkpointing WAL but WAL is still
recording -- meaning that disk activity decreases some but not a lot. The
difference is more noticable the more vulnerable to contention your disk
system is.
The other reason not to think of fsync=off as a permanent performance tweak is
that we're likely to remove the option sometime in the next 2 versions, since
an increasing number of features depend on WAL behavior, and the option is
largely a legacy of the 7.0 days, when WAL was sometimes buggy and needed to
be turned off to get the database to start.
--
Josh Berkus
Aglio Database Solutions
San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | Andy Ballingall | 2004-07-19 09:12:12 | Re: Working on huge RAM based datasets |
Previous Message | Gaetano Mendola | 2004-07-18 09:42:36 | Re: High load average with PostgreSQL 7.4.2 on debian/ibm eserver. |