问题
I have an AWS Elasticsearch domain with the following config:
Elasticsearch version: 7.4
Availability zones: 2
Instance type (data): t2.small.elasticsearch
Number of nodes: 2
size: 7GB
the number of documents: 4000
Memory utilization often reaches 95%
When the load is high or when we make a lot of calls to this ES, we noticed it becomes unreachable. What changes I should make so that it can take more load?
回答1:
You need to really upgrade the instance type, currently, you are using small t2 instance which has just 2GB of RAM and only 1 VCPU, please refer hardware specification of t2 instances.
As you can see memory is clearly becoming a bottleneck and is reaching 95%, I would suggest increasing the instance type to t2.medium
which has 4 GB and see how much performance gain you get.
Please note that Elasticsearch is a memory-intensive application and heavily relies on the file system cache(used by Lucene which ES uses internally) and Elasticsearch JVM heap size(As you are using AWS managed ES, I guess you don't have to fine-tune it).
As you have not provided other important information like how many search and index requests, what types of searches, how many indices, shards and replicas, etc , Please refer to some good blog like this and this and this to improve the search and indexing performance.
Edit:- As @Val suggested in comments you can use top/down approach to quickly figure out the right size of your cluster, you might have to spend little more money while doing this but you will save time to get to the right size.
来源:https://stackoverflow.com/questions/62215163/aws-elasticsearch-performance-issue-on-more-load