I'm seeing some interesting behaviour when doing benchmarks of query
and facet performance. Note that the query cache is disabled, and
the index is entirely in the OS disk cache. filterCache is fully
primed.
Often when repeatedly measuring the same query, I'll see pretty
consistent results (within a few ms), but occasionally a run which is
almost exactly half the time:
240ms vs. 120ms:
solr: DEBUG INFO: /select/
facet=true&debugQuery=true&indent=on&start=0&q=www&facet.field=t&qt=dism
ax&version=2.2&rows=1 0 239
solr: DEBUG INFO: /select/
facet=true&debugQuery=true&indent=on&start=0&q=www&facet.field=t&qt=dism
ax&version=2.2&rows=1 0 237
solr: DEBUG INFO: /select/
facet=true&debugQuery=true&indent=on&start=0&q=www&facet.field=t&qt=dism
ax&version=2.2&rows=1 0 120
solr: DEBUG INFO: /select/
facet=true&debugQuery=true&indent=on&start=0&q=www&facet.field=t&qt=dism
ax&version=2.2&rows=1 0 120
solr: DEBUG INFO: /select/
facet=true&debugQuery=true&indent=on&start=0&q=www&facet.field=t&qt=dism
ax&version=2.2&rows=1 0 237
solr: DEBUG INFO: /select/
facet=true&debugQuery=true&indent=on&start=0&q=www&facet.field=t&qt=dism
ax&version=2.2&rows=1 0 238
The strange thing is that the execution time is halved across _all_
parts of query processing:
101.0 total time
1.0 setup/query parsing
68.0 main query
30.0 faceting
0.0 pre fetch
2.0 debug
201.0 total time
1.0 setup/query parsing
138.0 main query
58.0 faceting
0.0 pre fetch
4.0 debug
I can't really think of a plausible explanation. Fortuitous
instruction pipelining? It is hard to imagine a cause that wouldn't
exhibit consistency.
-Mike