-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: dramatic performance differences in memory and filesystem
PostPosted: Tue Feb 17, 2009 5:51 am 
Beginner
Beginner

Joined: Thu Jun 07, 2007 2:38 am
Posts: 28
Location: Italy, Rome
We have quite a complex object graph. One business object is Annotation. Look at the numbers:

Filesystem:
saveAnnotation: 6990 ms
saveAnnotation: 14.049 s
search: 14.103 s
search: 14.133 s
deleteAnnotation: 19.759 s
deleteAnnotation: 25.349 s

In memory:
saveAnnotation: 762 ms
saveAnnotation: 1380 ms
search: 1434 ms
search: 1461 ms
deleteAnnotation: 1819 ms
deleteAnnotation: 2274 ms

We use Hibernate search 3.1.0.GA and Hibernate 3.4.0.GA.

When using Luke, Lucene finds the document within 100 ms on the filesystem. This suggests that somehow Hibernate Search is screwing up.

My question is, how is it possible that using the filesystem causes such a dramatic performance drop?


Top
 Profile  
 
 Post subject: Re: dramatic performance differences in memory and filesyste
PostPosted: Tue Feb 17, 2009 9:01 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Quote:
We have quite a complex object graph. One business object is Annotation. Look at the numbers:

Filesystem:
saveAnnotation: 6990 ms
saveAnnotation: 14.049 s
search: 14.103 s
search: 14.133 s
deleteAnnotation: 19.759 s
deleteAnnotation: 25.349 s

In memory:
saveAnnotation: 762 ms
saveAnnotation: 1380 ms
search: 1434 ms
search: 1461 ms
deleteAnnotation: 1819 ms
deleteAnnotation: 2274 ms

What are you comparing here? RAMDirectoryProvider vs FSDirectoryProvider? Do you get these differences just by changing the value for hibernate.search.default.directory_provider? If so I would love to see your actual entities with their mapping information as well as the code you are actually using to do the searches. Is this some sort od special file system, eg a NAS or something?
Quote:
When using Luke, Lucene finds the document within 100 ms on the filesystem. This suggests that somehow Hibernate Search is screwing up.

You cannot really compare these numbers. Using Luke you are just timing how long it takes to find the Lucene document. However, with Hibernate Search you have to take into consideration that after searching the Lucene index, Hibernate will load the matching entities from the db.

Maybe you can provide some more details about your setup and usecase.

--Hardy


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 19, 2009 4:49 am 
Beginner
Beginner

Joined: Thu Jun 07, 2007 2:38 am
Posts: 28
Location: Italy, Rome
Thanks for your response. Yes indeed I was comparing RAMDirectoryProvider vs FSDirectoryProvider. In the mean time I have continued with my investigation and have new figures:

RAMDirectoryProvider:
saveAnnotation1: 1469 ms saveAnnotation2: 937 ms
search: 234 ms search: 0 ms

FSDirectoryProvider:
saveAnnotation1: 19.578 s saveAnnotation2: 17.75 s
search: 344 ms search: 15 ms


The tests are in a public SVN https://geonetwork.svn.sourceforge.net/ ... dbox/3.0.x
in these maven/eclipse projects: geonetwork-domain-ebrim and geonetwork-persistence-ebrim. Build first the domain project.
/geonetwork-persistence-ebrim/src/test/java/org/geonetwork/search/ebrim/HSInvestigationSearchTest.java
/geonetwork-persistence-ebrim/src/test/java/org/geonetwork/search/ebrim/HSInvestigationSaveTest.java
/geonetwork-persistence-ebrim/src/test/resources/jdbc.properties


I have tried running in the async mode, there are no significant differences.

The tests have run also on about 4 differenct computers, figures are more or less the same. At least they have the same pattern.

We are still in the dark. What could be the reason for the huge performance differences?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 19, 2009 8:57 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

I checked out the project, but was not able to complile geonetwork-domain-ebrim due to missing depedencies, for example org.opengis:geoapi:jar:2.2-SNAPSHOT or org.geotools:gt-main:jar:2.5.1 (and more)

Maybe you could post the entities in question here. Or do I need an additional repository for these projects?

BTW, which database are you using? Is the problem independend from the database. If you turn off automatic indexing and forget about the search part, is persisting still so slow? Have you enabled Hibernate debug and SQL trace?

--Hardy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.