Re: Stress testing tools

From: Arndt Brenschede (a..iamos.de)
Date: Sat Apr 26 2003 - 04:43:17 EDT

  • Next message: Arndt Brenschede: "Re: Stress testing tools"

    Andrus Adamchik wrote:

    > ... my point is that if a queue overflow exceptions
    > happen, this is an indication that more connections
    > are needed in the pool. And it makes sense to learn
    > about this rather sooner than later. The worst
    > thing I have to deal with in one of my current
    > applications is debugging objects waiting forever
    > to get hold of a connection.

    I disagree on that.

    You should consider the connection-pool size limit
    as a parameter that is choosen in order to get the
    maximum throughput in the database.

    Something like 4 connections per harddrive, or per
    processor, or whatever (I'm not an expert on that).

    But in no way this parameter is related to the number
    of user-sessions you run on that system.

    In your strategy (increase pool-size limit in case
    it becomes an actual limit), you build a "domino-system":

    Suppose you have 2000 users, and in normal operation, the
    connection pool stays at 50 connections. Then the
    database becomes a bottleneck - and the pool will start
    growing up the the number of users. At 2000 connections
    the database is out of virtual memory and completely
    breaks down.

    In my stategy (connection pool size limit is really
    meant to be a limit), the 2000 users will queue up
    on the connection pool and the database will continue
    to work stable at it's maximum throughput.

    > The worst thing I have to deal with in one of my
    > current applications is debugging objects waiting
    > forever to get hold of a connection.

    So you are worried about deadlocks, and yes, I also
    saw a deadlock related to the connection-pool-size
    limit:

    If you set the limit to 1, run an iterated query,
    and while looping on it's result, run another query,
    then you get a deadlock.

    To understand that, go back to our discussion some
    weeks ago:

    http://objectstyle.org/cayenne/lists/cayenne-user/2003/02/0099.html

    Seems that the deeper reason while your connection-poolisize
    limit provokes deadlocks is that you use 2 connections from
    one thread.

    So I'm afraid we are at bugcount=2 for the connection poolsize
    limit :-)

    regards,

    Arndt



    This archive was generated by hypermail 2.0.0 : Sat Apr 26 2003 - 04:43:44 EDT