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 t...@fuzzy.cz wrote: That sounds like a pretty trivial patch. I've been thinking about yet another option - histograms (regular or with exponential bins). I

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 t...@fuzzy.cz 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

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 t...@fuzzy.cz 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

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 t...@fuzzy.cz 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

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 t...@fuzzy.cz 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

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 t...@fuzzy.cz 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 Jeff Janes
On Fri, Aug 24, 2012 at 2:16 PM, Tomas Vondra t...@fuzzy.cz 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

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 t...@fuzzy.cz 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%