apache / apache/lucene

Explore performance of multi-PQ vs single-PQ sorting API [LUCENE-1997]

Open
#3,072 102 comments 0 reactions 1 assignee Claimed by @mikemccand View on GitHub
affects-version:2.9 legacy-jira-priority:Major module:core/search type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Spinoff from recent "lucene 2.9 sorting algorithm" thread on java-dev,
where a simpler (non-segment-based) comparator API is proposed that
gathers results into multiple PQs (one per segment) and then merges
them in the end.

I started from John's multi-PQ code and worked it into
contrib/benchmark so that we could run perf tests. Then I generified
the Python script I use for running search benchmarks (in
contrib/benchmark/sortBench.py).

The script first creates indexes with 1M docs (based on
SortableSingleDocSource, and based on wikipedia, if available). Then
it runs various combinations:

- Index with 20 balanced segments vs index with the "normal" log
segment size

- Queries with different numbers of hits (only for wikipedia index)

- Different top N

- Different sorts (by title, for wikipedia, and by random string,
random int, and country for the random index)

For each test, 7 search rounds are run and the best QPS is kept. The
script runs singlePQ then multiPQ, and records the resulting best QPS
for each and produces table (in Jira format) as output.

---
Migrated from [LUCENE-1997](https://issues.apache.org/jira/browse/LUCENE-1997) by Michael McCandless (@mikemccand), updated Nov 30 2013
Attachments: [LUCENE-1997.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-1997/LUCENE-1997.patch) (versions: 9)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.