Re: [HACKERS] sync rep fsync=off

2011-03-24 Thread Fujii Masao
On Sun, Mar 20, 2011 at 5:31 AM, Robert Haas robertmh...@gmail.com wrote:
 On Sat, Mar 19, 2011 at 11:34 AM, Grzegorz Jaskiewicz
 g...@pointblue.com.pl wrote:

 On 18 Mar 2011, at 21:12, Robert Haas wrote:

 While investigating Simon's complaint about my patch of a few days
 ago, I discovered that synchronous replication appears to slow to a
 crawl if fsync is turned off on the standby.

 I'm not sure why this is happening or what the right behavior is in
 this case, but I think some kind of adjustment is needed because the
 current behavior is quite surprising.
 We have few servers here running 8.3. And few weeks ago I had to populate 
 one database with quite a number of entries.
 I have script that does that, but it takes a while. I decided to turn fsck 
 to off. Oddly enough, the server started to crawl quite badly, load was very 
 high.
 That was 8.3 on rhel 5.4.

 My point is, it is sometimes bad combination of disks and controllers that 
 does that. Not necessarily software. fsync off doesn't always mean that 
 things are going to fly, it can cause it to expose hardware bottlenecks much 
 quicker.

 Well, it's possible.  But I think it'd be worth a look at the code to
 see if there's some bad interaction there between the no-fsync code
 and the sync-rep code - like, if we don't actually fsync, does the
 flush pointer ever get updated?

No, as far as I read the code. Disabling fsync increases the time taken
to close the WAL file?

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] sync rep fsync=off

2011-03-19 Thread Grzegorz Jaskiewicz

On 18 Mar 2011, at 21:12, Robert Haas wrote:

 While investigating Simon's complaint about my patch of a few days
 ago, I discovered that synchronous replication appears to slow to a
 crawl if fsync is turned off on the standby.
 
 I'm not sure why this is happening or what the right behavior is in
 this case, but I think some kind of adjustment is needed because the
 current behavior is quite surprising.
We have few servers here running 8.3. And few weeks ago I had to populate one 
database with quite a number of entries. 
I have script that does that, but it takes a while. I decided to turn fsck to 
off. Oddly enough, the server started to crawl quite badly, load was very high. 
That was 8.3 on rhel 5.4. 

My point is, it is sometimes bad combination of disks and controllers that does 
that. Not necessarily software. fsync off doesn't always mean that things are 
going to fly, it can cause it to expose hardware bottlenecks much quicker. 


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] sync rep fsync=off

2011-03-19 Thread Robert Haas
On Sat, Mar 19, 2011 at 11:34 AM, Grzegorz Jaskiewicz
g...@pointblue.com.pl wrote:

 On 18 Mar 2011, at 21:12, Robert Haas wrote:

 While investigating Simon's complaint about my patch of a few days
 ago, I discovered that synchronous replication appears to slow to a
 crawl if fsync is turned off on the standby.

 I'm not sure why this is happening or what the right behavior is in
 this case, but I think some kind of adjustment is needed because the
 current behavior is quite surprising.
 We have few servers here running 8.3. And few weeks ago I had to populate one 
 database with quite a number of entries.
 I have script that does that, but it takes a while. I decided to turn fsck to 
 off. Oddly enough, the server started to crawl quite badly, load was very 
 high.
 That was 8.3 on rhel 5.4.

 My point is, it is sometimes bad combination of disks and controllers that 
 does that. Not necessarily software. fsync off doesn't always mean that 
 things are going to fly, it can cause it to expose hardware bottlenecks much 
 quicker.

Well, it's possible.  But I think it'd be worth a look at the code to
see if there's some bad interaction there between the no-fsync code
and the sync-rep code - like, if we don't actually fsync, does the
flush pointer ever get updated?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] sync rep fsync=off

2011-03-18 Thread Robert Haas
While investigating Simon's complaint about my patch of a few days
ago, I discovered that synchronous replication appears to slow to a
crawl if fsync is turned off on the standby.

I'm not sure why this is happening or what the right behavior is in
this case, but I think some kind of adjustment is needed because the
current behavior is quite surprising.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers