Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 78020 invoked from network); 14 Dec 2005 19:21:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Dec 2005 19:21:41 -0000 Received: (qmail 14782 invoked by uid 500); 14 Dec 2005 19:21:37 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 14513 invoked by uid 500); 14 Dec 2005 19:21:36 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 14324 invoked by uid 99); 14 Dec 2005 19:21:35 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2005 11:21:34 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 3A8461AD for ; Wed, 14 Dec 2005 20:20:47 +0100 (CET) Message-ID: <266057609.1134588047237.JavaMail.jira@ajax.apache.org> Date: Wed, 14 Dec 2005 20:20:47 +0100 (CET) From: "Daniel John Debrunner (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-733) Starvation in RAFContainer.readPage() In-Reply-To: <1924988682.1133366610352.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-733?page=comments#action_12360447 ] Daniel John Debrunner commented on DERBY-733: --------------------------------------------- I wonder if we can use the existing lock manager, which provides predictable queueing behaviour on granting locks, rather than add a new mechansm. > Starvation in RAFContainer.readPage() > ------------------------------------- > > Key: DERBY-733 > URL: http://issues.apache.org/jira/browse/DERBY-733 > Project: Derby > Type: Improvement > Components: Performance, Store > Versions: 10.2.0.0, 10.1.2.1, 10.1.3.0, 10.1.2.2 > Environment: Solaris x86 and Linux with Sun JVM 1.5.0. Derby embedded and client/server. > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Attachments: DERBY-733.diff > > When Derby is completely disk bound, threads might be starved in > RAFContainer.readPage(). This is a real problem when multiple clients > are repeatedly accessing one or a small number of large tables. In > cases like this, I have observed very high maximum response times > (several minutes in the worst cases) on simple transactions. The > average response time is not affected by this. > The starvation is caused by a synchronized block in > RAFContainer.readPage(): > synchronized (this) { > fileData.seek(pageOffset); > fileData.readFully(pageData, 0, pageSize); > } > If many threads want to read pages from the same file, there will be a > long queue of threads waiting for this monitor. Since the Java > specification does not guarantee that threads waiting for monitors are > treated fairly, some threads might have to wait for a long time before > they get the monitor. (Usually, a couple of threads get full throughput > while the others have to wait.) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira