Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 6183 invoked from network); 22 Sep 2004 06:35:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Sep 2004 06:35:36 -0000 Received: (qmail 22728 invoked by uid 500); 22 Sep 2004 06:35:32 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 22579 invoked by uid 500); 22 Sep 2004 06:35:30 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 22564 invoked by uid 99); 22 Sep 2004 06:35:30 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [162.42.131.72] (HELO wej.serverconfig.com) (162.42.131.72) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 21 Sep 2004 23:35:29 -0700 Received: from 85.red-80-24-52.pooles.rima-tde.net ([80.24.52.85] helo=[192.168.0.9]) by wej.serverconfig.com with esmtp (Exim 4.34) id 1CA0it-00071E-9Y for commons-dev@jakarta.apache.org; Wed, 22 Sep 2004 02:35:27 -0400 Message-ID: <41511D2D.1090002@indriyas.net> Date: Wed, 22 Sep 2004 08:35:25 +0200 From: Stephan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.1) Gecko/20040707 X-Accept-Language: en-us, en, fr, es MIME-Version: 1.0 To: commons-dev@jakarta.apache.org Subject: (Pool) Pools should be self tuning X-Enigmail-Version: 0.84.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - wej.serverconfig.com X-AntiAbuse: Original Domain - jakarta.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - indriyas.net X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I've recently discovered the package "Commons Pool" and I've played with GenericObjectPool. I'm attracted by all the options you can set to customize the behavior of the pool but after a while I started to ask myself. "Am I choosing sensible settings? Should I do this or should I do that?" Of course the answer depends of the usage pattern of the pool, and this is something that might change over time. Conclusion: I will probably never know what's the useage patern of a pool and I don't want to guess it. To solve this problem, in my opinion, the pool should be self tunning. Just like the Evictor thread (which is just a trigger), another thread would wakeup at regular intervals and gather statistical data and analyse it. As a result action would be taken (like changing the values of the pool settings) to adapt the pool to the usage pattern. How you you go about monitoring the usage pattern of a pool? The only ideas I have right now is using a moving average of the active connections and may be remembering this average throught the day so that the pool that anticipate usage. Imagine an automatic process that uses the pool once a day at 1:00 and borrows 1000 objects from the pool in a few seconds: The pool could anticipate this regular usage and create more objects in the pool. I'm not very good at statistics and I hope that some of you are and could explain how statistics could help in this task. This self tuning thing could be a more general problem and find other applications in other pagakges. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org