From: | KONDO Mitsumasa <kondo(dot)mitsumasa(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: gaussian distribution pgbench |
Date: | 2014-02-17 09:22:07 |
Message-ID: | 5301D4BF.1020907@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
(2014/02/16 7:38), Fabien COELHO wrote:
> I have updated the patch (v7) based on Mitsumasa latest v6:
> - some code simplifications & formula changes.
> - I've added explicit looping probability computations in comments
> to show the (low) looping probability of the iterative search.
> - I've tried to clarify the sgml documentation.
> - I've removed the 5.0 default value as it was not used anymore.
> - I've renamed some variables to match the naming style around.
Thank you for yor detail review and fix some code! I checked your modification
version,
it seems better than previos version and very helpful for documents.
> * Mathematical soundness
>
> I've checked again the mathematical soundness for the methods involved.
>
> After further thoughts, I'm not that sure that there is not a bias induced
> by taking the second value based on "cos" when the first based on "sin"
> as failed the test. So I removed the cos computation for the gaussian version,
> and simplified the code accordingly. This mean that it may be a little
> less efficient, but I'm more confident that there is no bias.
I tried to confirm which method is better. However, at the end of the day, it is
not a problem because other part of implementations have bigger overhead in
pgbench client. We like simple implementaion so I agree with your modification
version. And I tested this version, there is no overhead in creating gaussian and
exponential random number with minimum threshold that is most overhead situation.
> * Conclusion
>
> If Mitsumasa-san is okay with the changes I have made, I would suggest
> to accept this patch.
Attached patch based on v7 is added output that is possibility of access record
when we use exponential option
in the end of pgbench result. It is caluculated by a definite integral method for
e^-x.
If you check it and think no problem, please mark it ready for commiter.
Ishii-san will review this patch:)
Regards,
--
Mitsumasa KONDO
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
gaussian_and_exponential_pgbench_v8.patch | text/x-diff | 23.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-02-17 09:28:22 | Re: CREATE FOREIGN TABLE ( ... LIKE ... ) |
Previous Message | Kyotaro HORIGUCHI | 2014-02-17 08:58:44 | Re: [BUG] Archive recovery failure on 9.3+. |