0

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?

srinin
  • 81
  • 1
  • 6

1 Answers1

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.

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.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Amit
  • 30,756
  • 6
  • 57
  • 88
  • Ideally, one should go [top/down](https://www.elastic.co/blog/found-sizing-elasticsearch#start-big-scale-down) instead of bottom/up while figuring out the proper sizing. – Val Jun 05 '20 at 12:28
  • @Val, it depends if he wants to throw that much money, AWS ES provided small instance in free tier and using the big instance can cost him good amount and I want to save him from that pain :)... top/down approach is good for experts and when you have money to throw and production use case, his use case by looking at numbers doesn't relate to that.. Having said that I am not denying your point and will add that as suggestion. – Amit Jun 05 '20 at 12:31
  • 1
    Fair enough, though testing capacity doesn't take months but hours and it's definitely worth a few pennies IMHO – Val Jun 05 '20 at 12:32
  • 1
    @Val see my udpated comment and edit in answer and just for FYI I've worked on some tight budget in past and had a really difficult time to get instances for capacity planning in AWS :D – Amit Jun 05 '20 at 12:37
  • 1
    Can you also explain what you mean by "it's on JVM heap." ? – Val Jun 05 '20 at 12:39
  • @Val I mean JVM of ES process, let me update that as well, giving too less heap size or beyond 31 GB also gives the issue so we need to fine tune that as well, increasing memory will not be sufficient but as its AWS managed ES, I am sure they will allocate it according to instance memory. – Amit Jun 05 '20 at 12:42
  • @Val hope its all clear from your review (just kidding) :D, waiting for your comment LGTM – Amit Jun 05 '20 at 12:51