Logstash FlushSize correlation to Heap Size

I trying to figure out if there is a way to calculate (via specific formula) the corresponding Logstash Heap Size should be based on the set Flush_Size. Currently we are trying to set the flush_size to 5000 and the heap_size is set to 2GB. Also are they any additional settings that need to be set in ElasticSearch (for instance index refresh interval 15s and the heap size to 20GB for one instance).

LS doesn't need much heap unless you have large buffers like your flush_size there.

I'd really look at reducing that to something around the 2K mark myself.

1 Like