Solve the problem ‘Elasticsearch taking too much memory in Ubuntu.’
Well, I am an intern at Harris Web works. I have been working on Ubuntu OS since I joined here. I dual-booted my PC so that I could use both OS at my preference.
For the last few days I faced major performance problem with my PC. It crashed very often. In fact during a scrum meeting, my PC crashed. It made me very pissed off.
I decided to troubleshoot the problem. I was huge RAM usage at system monitor. My PC has 12 GB RAM, 90% of that was occupied at that moment. I was hardly using any heavy tool. (Chrome winks)
At first I thought there might be some problem with the dual boot setup. But that wasn’t the cause. After some surfing in the web, I found this..
$ top -b -o +%MEM |head -17
So I found the problem. It was elasticsearch eating 54% of my memory. It took me a while to solve the problem. Here is the easy way to it.
Go to etc/elasticsearch
Open jvm.options.
Make necessary changes in -Xms and -Xms. Don’t forget to remove the ##.
Restart elasticsearch. $ service elasticsearch restart.
So it came down from 50% to 5% in my case.