[HACKERS] 答复:[HACKERS] 答复:[HACKERS] 答复:[HACKERS] about fsync in CLOG buffer write

2015-09-09 Thread 周正中(德歌)
 the selected page is clean, we're set.    */   if (!shared->page_dirty[bestvalidslot])    return bestvalidslot; --发件人:Andres Freund 发送时间:2015年9月9日(星期三) 02:28收件人:周正中(德歌) 抄 送:Amit Kapila ,张广舟(明虚) ,pgsql-hackers ,范孝剑(康贤) ,曾文旌(义从) ,窦贤明(执白) ,萧少聪(铁庵) ,陈新坚(惧留孙) 主 题:Re:

Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] 答复:[HACKERS] 答复:[HACKERS] about fsync in CLOG buffer write

2015-09-09 Thread Andres Freund
On 2015-09-09 10:46:47 -0400, Robert Haas wrote: > Well, if you're filling ~1 clog page per second, you're doing ~1 fsync > per second too. Or if you are not, then you are thrashing the > progressively smaller and smaller number of clean slots ever-harder > until no clean pages remain and you're f

[HACKERS] Re: [HACKERS] Re: [HACKERS] 答复:[HACKERS] 答复:[HACKERS] about fsync in CLOG buffer write

2015-09-09 Thread Robert Haas
On Wed, Sep 9, 2015 at 10:35 AM, Tom Lane wrote: > Robert Haas writes: >> ... How often such a workload actually has to replace a *dirty* clog >> buffer obviously depends on how often you checkpoint, but if you're >> getting ~28k TPS you can completely fill 32 clog buffers (1 million >> transacti

Re: [HACKERS] Re: [HACKERS] 答复:[HACKERS] 答复:[HACKERS] about fsync in CLOG buffer write

2015-09-09 Thread Tom Lane
Robert Haas writes: > ... How often such a workload actually has to replace a *dirty* clog > buffer obviously depends on how often you checkpoint, but if you're > getting ~28k TPS you can completely fill 32 clog buffers (1 million > transactions) in less than 40 seconds, and you're probably not >

[HACKERS] Re: [HACKERS] 答复:[HACKERS] 答复:[HACKERS] about fsync in CLOG buffer write

2015-09-09 Thread Robert Haas
On Tue, Sep 8, 2015 at 2:28 PM, Andres Freund wrote: > On 2015-09-08 15:58:26 +0800, 周正中(德歌) wrote: >> postgres@digoal-> cat 7.sql >> select txid_current(); >> >> postgres@digoal-> pgbench -M prepared -n -r -P 1 -f ./7.sql -c 1 -j 1 -T >> 10 >> About 32K tps. >> progress: 240.0 s, 31164.4 tps

Re: [HACKERS] 答复:[HACKERS] 答复:[HACKERS] about fsync in CLOG buffer write

2015-09-08 Thread Andres Freund
Hi, On 2015-09-08 15:58:26 +0800, 周正中(德歌) wrote: > postgres@digoal-> cat 7.sql > select txid_current(); > > postgres@digoal-> pgbench -M prepared -n -r -P 1 -f ./7.sql -c 1 -j 1 -T  > 10 > About 32K tps. > progress: 240.0 s, 31164.4 tps, lat 0.031 ms stddev 0.183 > progress: 241.0 s, 33243.3 

[HACKERS] 答复:[HACKERS] 答复:[HACKERS] about fsync in CLOG buffer write

2015-09-08 Thread 周正中(德歌)
HI,  this is the test case:Use stap track pg_clog/* fsync call. [root@digoal ~]# cat trc.stp  global f_start[99] probe  process("/opt/pgsql/bin/postgres").function("SlruPhysicalWritePage@/opt/soft_bak/postgresql-9.4.4/src/backend/access/transam/slru.c").call  {     f_start[execname(), pid(),