Solr – InMemory

Apache Solr is one of the most popular search engine nowadays, as known it’s a Java application. In this article, we will share with you the result of hosting solr data in the memory.

To achieve this experiment, we have created a tmpfs and copied Solr application ( with all data ) into the tmpfs folder. At, the same time had another instance (with same hardware and software specs) that running Solr on disk.

* Note : this is Solr 4.8 

The numbers about queries response time are shown in the following charts, and I’m leaving it to you to decide which is better.

Lastly, Is it worth to move your Solr into Memory ? 

This question depends on many factors, and the first one should be, can I use a volatile data store ?! and can I afford the cost of storing my data into RAM.

Also, with some configuration tuning for Solr you can hold your small data mount into memory using SolrCache.