Re: [HACKERS] PATCH: pgbench - random sampling of transaction written into log

2012-09-02 Thread Tomas Vondra
Dne 31.08.2012 00:01, Tomas Vondra napsal: On 30 Srpen 2012, 23:44, Robert Haas wrote: On Thu, Aug 30, 2012 at 3:48 PM, Tomas Vondra wrote: That sounds like a pretty trivial patch. I've been thinking about yet another option - histograms (regular or with exponential bins). I thought about t

Re: [HACKERS] PATCH: pgbench - random sampling of transaction written into log

2012-08-30 Thread Robert Haas
On Thu, Aug 30, 2012 at 3:48 PM, Tomas Vondra wrote: > That sounds like a pretty trivial patch. I've been thinking about yet > another option - histograms (regular or with exponential bins). I thought about that, too, but I think high-outliers is a lot more useful. At least for the kinds of thin

Re: [HACKERS] PATCH: pgbench - random sampling of transaction written into log

2012-08-30 Thread Tomas Vondra
On 30 Srpen 2012, 23:44, Robert Haas wrote: > On Thu, Aug 30, 2012 at 3:48 PM, Tomas Vondra wrote: >> That sounds like a pretty trivial patch. I've been thinking about yet >> another option - histograms (regular or with exponential bins). > > I thought about that, too, but I think high-outliers is

Re: [HACKERS] PATCH: pgbench - random sampling of transaction written into log

2012-08-30 Thread Tomas Vondra
On 30 Srpen 2012, 17:46, Robert Haas wrote: > On Sun, Aug 26, 2012 at 1:04 PM, Tomas Vondra wrote: >> Attached is an improved patch, with a call to rand() replaced with >> getrand(). >> >> I was thinking about the counter but I'm not really sure how to handle >> cases like "39%" - I'm not sure a p

Re: [HACKERS] PATCH: pgbench - random sampling of transaction written into log

2012-08-30 Thread Robert Haas
On Sun, Aug 26, 2012 at 1:04 PM, Tomas Vondra wrote: > Attached is an improved patch, with a call to rand() replaced with > getrand(). > > I was thinking about the counter but I'm not really sure how to handle > cases like "39%" - I'm not sure a plain (counter % 100 < 37) is not a > good sampling,

Re: [HACKERS] PATCH: pgbench - random sampling of transaction written into log

2012-08-26 Thread Tomas Vondra
On 26.8.2012 02:48, Tomas Vondra wrote: > On 26.8.2012 00:19, Jeff Janes wrote: >> On Fri, Aug 24, 2012 at 2:16 PM, Tomas Vondra wrote: >>> Hi, >>> >>> attached is a patch that adds support for random sampling in pgbench, when >>> it's executed with "-l" flag. You can do for example this: >>> >>>

Re: [HACKERS] PATCH: pgbench - random sampling of transaction written into log

2012-08-25 Thread Tomas Vondra
On 26.8.2012 00:19, Jeff Janes wrote: > On Fri, Aug 24, 2012 at 2:16 PM, Tomas Vondra wrote: >> Hi, >> >> attached is a patch that adds support for random sampling in pgbench, when >> it's executed with "-l" flag. You can do for example this: >> >> $ pgbench -l -T 120 -R 1 db >> >> and then only

Re: [HACKERS] PATCH: pgbench - random sampling of transaction written into log

2012-08-25 Thread Jeff Janes
On Fri, Aug 24, 2012 at 2:16 PM, Tomas Vondra wrote: > Hi, > > attached is a patch that adds support for random sampling in pgbench, when > it's executed with "-l" flag. You can do for example this: > > $ pgbench -l -T 120 -R 1 db > > and then only 1% of transactions will be written into the log

[HACKERS] PATCH: pgbench - random sampling of transaction written into log

2012-08-24 Thread Tomas Vondra
Hi, attached is a patch that adds support for random sampling in pgbench, when it's executed with "-l" flag. You can do for example this: $ pgbench -l -T 120 -R 1 db and then only 1% of transactions will be written into the log file. If you omit the tag, all the transactions are written (i.e.