Here are my examples for mysql and postgres using commons-dbcp. They
are exactly the same except for the connection info. Might want to
play around with the initial,min,max size properties.

[MySQL]
http://gist.github.com/470901

[PostgreSQL]
http://gist.github.com/470904

Just download and include the following jars in the classpath:

http://commons.apache.org/dbcp/downloads.html
http://commons.apache.org/pool/downloads.html

Allen

On Sat, Jul 10, 2010 at 12:55 PM, Allen Johnson <akjohnso...@gmail.com> wrote:
> To test with pooled DB connections I thought I'd mention Apache Commons
> dbcp. Its a generic connection pool library that could be used for any jdbc
> connection.
>
> I'd post a example clojure usage but I'm afk atm. The lib's BasicDataSource
> is probably all you'd need.
>
> Depends on Commons pool. Just place both jars on the classpath.
>
> http://commons.apache.org/dbcp/
>
> Allen
>
> On Jul 10, 2010 12:47 PM, "Toni Batchelli" <tbatche...@gmail.com> wrote:
> I think what you're doing is great. I understand you're using ab for
> these tests, right? What are the actual settings that you are using?
>
> Also, I'd like to mention that what these tests are showing is the
> behavior of the server under constant load (constant frequency in the
> arrival times of the requests, and constant load attached to each
> request). This is not what happens in reality though, and servers that
> do well under a constant distribution of requests might not do that
> well (at all) under a Pareto distribution of both arrival times and
> load (a real load that a server gets is very similar to a Pareto
> http://en.wikipedia.org/wiki/Pareto_distribution). Under a Pareto load
> a well crafted event-based server that has bounds on the number of
> threads used (and maybe other resources) might significantly
> outperform a 1-thread-per-request server. Unfortunately, I don't think
> ab can test these scenarios.
>
> I built a tool sometime ago while working at UCSB that would do
> exactly this. I will look into whether I can dig it out and opensource
> it.
>
> Toni.
>
>
> On Sat, Jul 10, 2010 at 8:59 AM, David Nolen <dnolen.li...@gmail.com> wrote:
>> On Fri, Jul 9, 2010...
>
> --
> Antoni Batchelli
> - twitter: @tbatchelli , @disclojure
> --- email: tbatche...@gmail.com
> ----- web: tbatchelli.org , disclojure.org
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To p...

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to