From users-return-3663-apmail-jackrabbit-users-archive=jackrabbit.apache.org@jackrabbit.apache.org Mon Jun 11 14:28:48 2007 Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 90931 invoked from network); 11 Jun 2007 14:28:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jun 2007 14:28:47 -0000 Received: (qmail 1777 invoked by uid 500); 11 Jun 2007 14:28:49 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 1708 invoked by uid 500); 11 Jun 2007 14:28:48 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 1680 invoked by uid 99); 11 Jun 2007 14:28:48 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2007 07:28:48 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [66.46.21.156] (HELO smtp.tirawireless.com) (66.46.21.156) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2007 07:28:41 -0700 Received: from localhost (unknown [127.0.0.1]) by smtp.tirawireless.com (Postfix) with ESMTP id AD315D000D for ; Mon, 11 Jun 2007 10:28:20 -0400 (EDT) Received: from smtp.tirawireless.com ([127.0.0.1]) by localhost (smtp.tirawireless.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kIa6GlpLLRpg for ; Mon, 11 Jun 2007 10:28:19 -0400 (EDT) Received: from scooby2k3.corp.bspark.com (gateway.tirawireless.com [66.46.41.93]) by smtp.tirawireless.com (Postfix) with ESMTP id 37B0AD0009 for ; Mon, 11 Jun 2007 10:28:19 -0400 (EDT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Jackrabbit performance issue Date: Mon, 11 Jun 2007 10:28:52 -0400 Message-ID: <916A2A65AB16854B99689B6EC2C60A541B4ACB@scooby2k3.corp.bspark.com> In-Reply-To: <510143ac0706090122r6652b5eq61db9a93cdf28b52@mail.gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Jackrabbit performance issue Thread-Index: Aceqb5GvEsqMv7dxTouygiekgs9jPwBwOMcg References: <916A2A65AB16854B99689B6EC2C60A541B4AC7@scooby2k3.corp.bspark.com> <510143ac0706090122r6652b5eq61db9a93cdf28b52@mail.gmail.com> From: "Bruce Li" To: X-Virus-Checked: Checked by ClamAV on apache.org Hi Jukka, Thank you very much for your feedback. 1) The DB latency is set for all application including repository. There is no any performance issue with other application which has a lot of transactions. 2) The performance test is using local repository server. The "repository" and "session" is constructed by Spring Framework. The real repository server is running at Tomcat container and all the access for repository is going through web service.=20 3) This "search" is not by query but by visiting all "Company" note using " getNode". I would like to share some "Company" code for further performance digging: public class Company { =09 private String repositoryId; private int usage; private int totalVotes; private double ranking; private int type; ... =09 private CompanyProfile[] applications; private WebReference[] webReferences; private CompanyProperty[] companyProperties; ... } All fileds with build-in type of "Company" instance is persisted to repository by a recursive method using "java.lang.reflect". { ... String nodePath =3D itemNode.getCorrespondingNodePath(session.getWorkspace().getName()); // Get the class name by naming convention // String modelName =3D getNodeName(getSuffixName(nodePath,":")); String itemClassName =3D getClassName(modelName); Class itemClass =3D Class.forName(itemClassName); itemObj =3D itemClass.newInstance(); PropertyIterator pi =3D itemNode.getProperties(); while (pi.hasNext())=20 { Property property =3D pi.nextProperty(); // recursive method to populate data from repository // property populateItemField(itemNode.getUUID(), itemObj, property); } } When execute the "Property property =3D pi.nextProperty()", it always makes the CacheManager resizing, which costs time. I am using JDK 1.5. Thanks again for your help. Bruce Li -----Original Message----- From: Jukka Zitting [mailto:jukka.zitting@gmail.com]=20 Sent: Saturday, June 09, 2007 4:23 AM To: users@jackrabbit.apache.org Subject: Re: Jackrabbit performance issue Hi, On 6/6/07, Bruce Li wrote: > I am using Jackrabbit v1.3 and I got the performance issue. > > The problem is when I visit object notes (for example, "Company"), it > costs more than 25 second to visit all "Company" notes. Could you share an example of the code you are using to access the company nodes? Some common performance pitfalls that could affect your setup are: 1) Database latency. Check that the network latency between the Jackrabbit and the backend database is small. Jackrabbit typically makes a number of database calls, and the latencies of individual calls can easily add up since at the moment Jackrabbit doesn't perform those calls in parallel. 2) RMI access. Are you using the RMI layer to access the repository? RMI access performance is also highly sensitive to network latency and there are some inherent design choises that make the RMI layer perfom not that well. 3) Large search result sets. Are you using a query to access all the company nodes? When you are simply iterating all nodes in a subtree you get noticeably better performance if you simply traverse the tree with Node.getNodes() instead of using a query. Query performance is best when you are targetting a small subset of a large subtree or an entire workspace. BR, Jukka Zitting