由wiki粘过来,稍微改了下格式。还是有点乱,将就看看,主要看数据
Base on the the SolrCloud Performance Test. and ElasticSearch Performance Test, we see that the search performance of solrcloud is not as good as we expected compareing with ES. so we did more job. we scan the solrcloud source code and configuration guide and hope finding what weaken its performance. our further progress is recorded below:
EVN
Only one server compose this test cluster. This only server with follow hardware: 8 core CPU with 2.66GHz, Mem: 16 G. OS:x86_64 GNU/Linux .
one instance of solrcloud with 1 shard .
start this cluster with the same index data and config as SolrCloud Performance Test. we show the standalone search result below as the baseline:
jmeter search request look like:http://X.X.X.72/solr/collection1/select?q=name:????&fl=name,id
???? is a random string, example: "abde". Any search reques almost have more than 1 doc result(hited document).
search result:
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 46 | 1020 |
change the configuration file: solrconfig.xml
1. add queryResultCache size to 102400 :
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 49 | 1092 |
2. add documentCache size to 102400 :
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 46 | 1067 |
3. change the queryResultCache size and documentCache size to 102400 respectively at the same time
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 47 | 1048 |
4. change the queryResultCache size and documentCache size to 51200 respectively at the same time
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 47 | 1056 |
5. set the queryResultCache size as 512(default value) and documentCache size as 51200
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 47 | 1052 |
at this case the YGC: once per second, FGC:150ms per time.
change the search request
1. the search request name set as a fixed name "abcd", the request have 9 returned Docs
request: http://X.X.X.72/solr/collection1/select?q=name:abcd&fl=name,id
search result:
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT | |
---|---|---|---|
50 | 43 | 1120 |
2. the search request name set as a fixed name "abcde", the request have 0 returned Docs
request: http://X.X.X.72/solr/collection1/select?q=name:abcde&fl=name,id
search result:
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 8 | 4080 |
Base on above result, we decide to construct some special search request to ensure the return docs num is different.
we just want to know whether the return doc num effect the performance of search
notice: the hit documents num is unlimited. But the default max retrun documents num is 10. That means there will be no more than 10 documents return to requester even though the hit documents num is bigger than 10 |
request: /solr/collection1/select?q=name:bgbf&fl=ts,id
hit & return documents num: 1
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 13 | 3309 |
request: /solr/collection1/select?q=name:nlww&fl=ts,id
hit & return documents num: 4
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 24 | 2027 |
request: /solr/collection1/select?q=name:zoje&fl=ts,id
hit & return documents num: 7
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 36 | 1348 |
request: /solr/collection1/select?q=name:ahnd&fl=ts,id
hit & return documents num: 10
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 48 | 1024 |
request: /solr/collection1/select?q=name:waiq&fl=ts,id
hit documents num: 13
return documents num: 10
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 48 | 1025 |
request: /solr/collection1/select?q=name:rwur&fl=ts,id
hit documents num: 16
return documents num: 10
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 48 | 1028 |
request: /solr/collection1/select?q=name:ysxp&fl=ts,id
hit documents num: 19
return documents num: 10
REQUEST THREAD NUMS | AVG RESPONSE TIME | THROUGHPUT |
---|---|---|
50 | 48 | 1025 |
summary
We draw a simple conclusion that the return docs num effect the throughput strongly from above tests. we still don't konw how this happened. We will dig more info to find what happened inside the solrcloud.