Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch in RAM data store

Can it be possible to configure Elasticsearch in such a way, that it will keep all data in RAM (like Redis in-memory cache)? What I need is additional speed while querying data. If anybody has experience doing that or something similar, it will help a lot.

like image 653
Geka P Avatar asked Oct 24 '17 15:10

Geka P


People also ask

Does Elasticsearch store data in memory?

Elasticsearch indexes are just files and they effectively cached in RAM by system. Usually if you have enough RAM Elasticsearch should work as fast as possible, especially for GET queries.

Is Elasticsearch good for storing data?

Elasticsearch is a fantastic tool for storing, searching, and analyzing structured and unstructured data — including free text, system logs, database records, and more. With the right tweaking, you also get a great platform to store your time series metrics from tools like collectd or statsd.

Where are Elasticsearch data stored?

By default, Elasticsearch indexes all data in every field and each indexed field has a dedicated, optimized data structure. For example, text fields are stored in inverted indices, and numeric and geo fields are stored in BKD trees.

How much RAM do I need for Elasticsearch?

As a Java application, Elasticsearch requires some logical memory (heap) allocation from the system's physical memory. This should be up to half of the physical RAM, capping at 32GB.


1 Answers

  1. Elasticsearch indexes are just files and they effectively cached in RAM by system. Usually if you have enough RAM Elasticsearch should work as fast as possible, especially for GET queries.

  2. You can use /dev/shm/ shared memory folder as data folder

  3. You can put perindex settings

    PUT /my_index { "settings": { "index.store.type": "mmapfs" } }

like image 191
pkhlop Avatar answered Sep 28 '22 02:09

pkhlop