Hi
We have a cluster running Elasticsearch 6.5.3 and we are using the same version for the java client library. Since we replaced the transport client in favor of the high level rest client, we are experiencing a major decrease in performance, the response times from the cluster have increased by a factor of 2. We see no increased search/index times on the elastic nodes.
Any idea of why we're experiencing this performance hit with the rest client?
Hi
I don’t know if it may be related. I doubt string interning would be an issue in our case because we execute rather simple queries without almost any parameters @dadoonet
edited my post with a VisualVM screenshot
What if you run the same query using curl or the Kibana dev console?
What is the took value when you use the Rest client vs using curl vs using the Transport Client?
The numbers presented here is not statistically significant but merely individual test results but hopefully they will give some insight.
Rest client: Took value was 1ms and time to invoke RestHighLevelClient::search was 195ms
Transport client: Took value was 1ms and time to invoke TransportClient::search was 43ms
Kibana dev console: Took value was 1ms
{"took":22,"timed_out":false,"_shards":{"total":20,"successful":20,"skipped":0,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}
real 0m0.046s
user 0m0.007s
sys 0m0.006s
This code that I was testing was a test reproducing production settings:
We noticed the problem when we compared the different clients in our production vs stage environment. Chart number 1 is a recording from our stage environment with the rest client and chart number 2 is a recording of our production environment that is still running the transport client. Btw, we are running multiple clusters and this behaviour manifest itself on all of them)
I wonder if it could be better if you replace in your query should by filter. Just to see if you have consistent results.
Also are you indexing and querying at the same time?
In which case I wonder if this pattern occurs when new segments are created on disk or when merge is happening...
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.