Hello,

I am seeing very slow response from json faceting against a single core
(though core is shard leader in a collection). 

Fields processId and resultId are non-multivalued, indexed and docvalues
string (not text).

Soft Commit = 5sec (opensearcher=true) and Hard Commit = 10sec because new
docs are constantly being indexed with 95% new and 5% overwritten
(overwrite=true; no atomic update). Caches are not considered useful due to
commit frequency.

Solr is v8.7.0 on openjdk11.

Is there any way to improve json facet QTime?

## query only
curl
'http://localhost:8983/solr/TestCollection_shard1_replica_t3/query?q=processId:xxxx-xxx-xxx-xxx-xxxxx&rows=0'
-d '
{
  "responseHeader":{
    "zkConnected":true,
    "status":0,
    "QTime":552,
    "params":{
      "q":"processId:xxxx-xxx-xxx-xxx-xxxxx",
      "cache":"false",
      "rows":"0"}},
  "response":{"numFound":231311,"start":0,"numFoundExact":true,"docs":[]
  }}

## json facet takes 46secs
curl
'http://localhost:8983/solr/TestCollection_shard1_replica_t3/query?q=processId:xxxx-xxx-xxx-xxx-xxxxx&rows=0'
-d '
json.facet={
    categories:{
      "type": "terms",
      "field" : "resultId",
      "limit" : 1
    }
}'
{
  "responseHeader":{
    "zkConnected":true,
    "status":0,
    "QTime":46972,
    "params":{
      "q":"processId:xxxx-xxx-xxx-xxx-xxxxx",
      "json.facet":"{    categories:{      \"type\": \"terms\",     
\"field\" : \"resultId\",      \"limit\" : 1    }}",
      "rows":"0"}},
  "response":{"numFound":231311,"start":0,"numFoundExact":true,"docs":[]
  },
  "facets":{
    "count":231311,
    "categories":{
      "buckets":[{
          "val":"xxxxxxxxx",
          "count":943}]}}}


## visualvm CPU sampling almost all time spent in lucene:

org.apache.lucene.util.PriorityQueue.downHeap() 23,009 ms
org.apache.lucene.codecs.lucene80.Lucene80DocValuesProducer$TermsDict.next()
13,268 ms



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to