lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Wang <john.w...@gmail.com>
Subject new sorting api and some perf numbers
Date Mon, 12 Oct 2009 05:19:33 GMT
Hi guys:
    The new FieldComparator api looks really scary :)

    But after some perf testing with numbers I'd like to share, I guess it
is worth it:

HW: Mac Pro with 16G memory
jvm: 1.6.0_13"
jvm arg: -Xms1g -Xmx1g -server

setup

index:
1M docs even split into 8 segments (to make sure the test is fair across
segment boundaries)
each doc has 3 fields:
1) id - stored
2) val - random number, indexed, not analyzed, no norms, omit tf
3) string - "even" or "odd" of the corresponding id, not analyzed, no norms,
omit tf

built with lucene 2.4.1 to keep the same index across lucene 2.4.1 and
lucene 2.9.0 search tests

Search:
query on the term: "even" (TermQuery, minimizes the overhead of the text
search), matches 500k docs, and across segment boundary, sort by val, sort
type: string. Numhits, e.g. number of slots = 100.

ran 20 iterations of the same query for each test.

First query, includes loading

lucene 2.4.1: 4858ms, lucene 2.9.0: 816ms, gain of 595%

avg of the rest 19 queries:

lucene 2.4.1: 32ms, lucene 2.9.0: 17ms , gain of 188%

I ran this test about 5 times, the findings are similar.

The performance gain is significant!

Great job!

-John

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message