You can tune these options to increase the size of memory available for Elastic in the file: /etc/elasticsearch/jvm.option . There, add the number of Gigabytes of RAM you want to allocate to Elasticsearch's heap. It is recommendable to set it to half of the available RAM with a maximum of 32GB. So for example, if you have 8GB of memory, you would allocate 4 as follows:
# Xms represents the initial size of total heap space