Can we run elastic search on 100MB

Can we run elasticsearch on 100MB.

I have read the docs, the recommend is half of your RAM. I have 512 MB RAM but i have other processors are running on it.
How does elasticsearch works, does it consumes all the RAM.?

as far as i know you should be able to run ES with 100 MB. However the performance of your ES would depend on how much data you would be storing on your disk what type of operations(aggs etc) you would perform which would determine if your RAM is sufficient for your needs or not

Most RAM usage comes from two things:

  1. Disk block caching done by the OS
  2. JVM heap
  3. Other JVM overhead

The disk block caching is just caching and if you don't get any use out of it things will be slower but everything will still work.

JVM heap is controlled by the ES_HEAP_SIZE config variable. Set it to 100MB and the JVM heap will limit itself to that much ram.

The other JVM overhead isn't really something you can contain - metaspace mostly. When you use Elasticsearch with 2GB jvm heaps the metaspace is pretty small comparatively. With a 100MB heap metaspace is going to be large, maybe larger than the heap. You should have a look at it. jstat can show you the metaspace usage.

Given metaspace requirements you probably won't be able to get ES down to 100MB. 200MB is more believable but you won't have very much disk caching because other processes are using the RAM so it'll be slow.

1 Like