lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Lucene-java Wiki] Update of "ImproveSearchingSpeed" by DanielNaber
Date Fri, 07 Dec 2007 22:49:57 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lucene-java Wiki" for change notification.

The following page has been changed by DanielNaber:
http://wiki.apache.org/lucene-java/ImproveSearchingSpeed

The comment on the change is:
how to clean disk cache for performance tests

------------------------------------------------------------------------------
  
   * '''When measuring performance, disregard the first query.'''
  
-  The first query to a searcher pays the price of initializing caches (especially when sorting
by fields) and thus will skew your results (assuming you re-use the searcher for many queries).
+  The first query to a searcher pays the price of initializing caches (especially when sorting
by fields) and thus will skew your results (assuming you re-use the searcher for many queries).
On the other hand, if you re-run the same query again and again, results won't be realistic
either, because the operating system will use its cache to speed up IO operations. On Linux
(kernel 2.6.16 and later) you can clean the disk cache using {{{sync ; echo 3 > /proc/sys/vm/drop_caches}}}.
See http://linux-mm.org/Drop_Caches for details.
  
   * '''Re-open the [http://lucene.apache.org/java/docs/api/org/apache/lucene/search/IndexSearcher.html
IndexSearcher] only when necessary.'''
  

Mime
View raw message