MediaHub
High Memory Usage on MediaHub Server
Problem
MediaHub Server may show high memory usage due to Elasticsearch consuming too much RAM.
Cause
Elasticsearch uses the Java Virtual Machine (JVM) heap. By default, the heap size is limited to 1 GB (-Xms1g and -Xmx1g). This may be too low for larger datasets or too high if you want to restrict memory usage.
Solution
You can adjust the JVM heap size according to the resources available on your server.
Steps
-
Open the file:
C:\Program Files\Erizos\Elasticsearch\config\jvm.options
Use a text editor such as Notepad++. -
Find the following lines:
Xms1g
Xmx1g
-
Replace them with your chosen heap size. For example:
Xms8g
Xmx8g
Here Xg
is the amount of memory in gigabytes you want to allocate to Elasticsearch.
Xms
sets the initial heap size.Xmx
sets the maximum heap size.
Recommendation
- Allocate 50% of available RAM, but do not exceed 32 GB (a common Elasticsearch best practice).
- Restart the MediaHub service after making changes for the new settings to take effect.