All Apps and Add-ons

What is the recommended Heap Size value for JVM when Thruput is increased?

ahmedn_splunk
Splunk Employee
Splunk Employee

Thruput has increased to around 385 kbps due to the increase in number of inputs to be more than 150. Need to know what is the recommended Heap Size to set? and How to set it?

0 Karma
1 Solution

ahmedn_splunk
Splunk Employee
Splunk Employee

Hi
As per Splunk Engineering, the recommended Heap Size for such Thruput is 2048.

To set the heap size Go to:

1)$SPLUNK_HOME$/etc/apps/Splunk_TA_jmx/bin/java_const.py

2) On line number 43 change the code
from :

JAVA_COMMON_ARGS = [JAVA_EXECUTABLE ,"-classpath", CLASSPATH, "-Dconfighome=" + CONFIG_HOME,
"-Dsplunkhome="+ SPLUNK_HOME]

to

JAVA_COMMON_ARGS = [JAVA_EXECUTABLE, "-Xmx2048m" ,"-classpath", CLASSPATH, "-Dconfighome=" + CONFIG_HOME,
"-Dsplunkhome="+ SPLUNK_HOME]

3) Navigate to $SPLUNK_HOME$/bin and fire command : ./splunk restart

You can also use the below SPL query to get the current Average Thruput:

index=_internal source="*/splunk/var/log/splunk/metrics.log" group=per_sourcetype_thruput series=jmx | stats avg(kbps)

Proper time range needs to be specified while executing the query

View solution in original post

ahmedn_splunk
Splunk Employee
Splunk Employee

Hi
As per Splunk Engineering, the recommended Heap Size for such Thruput is 2048.

To set the heap size Go to:

1)$SPLUNK_HOME$/etc/apps/Splunk_TA_jmx/bin/java_const.py

2) On line number 43 change the code
from :

JAVA_COMMON_ARGS = [JAVA_EXECUTABLE ,"-classpath", CLASSPATH, "-Dconfighome=" + CONFIG_HOME,
"-Dsplunkhome="+ SPLUNK_HOME]

to

JAVA_COMMON_ARGS = [JAVA_EXECUTABLE, "-Xmx2048m" ,"-classpath", CLASSPATH, "-Dconfighome=" + CONFIG_HOME,
"-Dsplunkhome="+ SPLUNK_HOME]

3) Navigate to $SPLUNK_HOME$/bin and fire command : ./splunk restart

You can also use the below SPL query to get the current Average Thruput:

index=_internal source="*/splunk/var/log/splunk/metrics.log" group=per_sourcetype_thruput series=jmx | stats avg(kbps)

Proper time range needs to be specified while executing the query

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...