Increasing number of java processes


Like in this old closed topic, the number of java processes is increasing everyday for no apparent reason.

Graylogs works very well, no latency, this is just a question because I would like to know the reason of this behaviour.

It’s a solo Graylog instance (2 vCPU + 8Go RAM). Multiple inputs but it’s not related to it because it’s like that since the begining when just one input was used.

When the instance is restarted due to updates, the number of processes drastically decrease and start increasing again day after day.

Here are some screens to illustrate.

is the above graph from the OS or the JVM?

It comes from the monitoring system (Zabbix).

That does not answer my question - but I guess that it shows the “Free” memory of the OS that is reported.

What HEAP did you have configured for Graylog?

My bad, it’s from the OS, the free memory.

I did not change the HEAP size for both graylog and elastic.

From graylog conf:
GRAYLOG_SERVER_JAVA_OPTS="-Xms1g -Xmx1g -XX:NewRatio=1 -server -XX:+ResizeTLAB -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled -XX:+CMSClassUnloadingEnabled -XX:+UseParNewGC -XX:-OmitStackTraceInFastThrow"

You have Graylog and Elasticsearch running in the same system? You wrote Graylog solo what makes me think that you have only Graylog running on this server.

What is the configured HEAP for Elasticsearch? What else is running on this System? Why is using memory for buffers bad in your environment? Did you have something that shows you what is using the memory?

My bad again, when I said solo I meant one instance for Graylog/MongoDB/Elasticsearch. Nothing else is running.

Elastic has the default parameter (#ES_JAVA_OPTS=).

This use of memory is completely fine for me, it’s just that I was wondering if it was a normal behaviour.

You might want to do this => for your Elastic.
I have dedicated machines for Elastic and they were eating memory like crazy… Never had such problems with Graylog so maybe make sure that Elastic is fine 100% first, it will take you 60 seconds to finish those 4 steps from stackoverflow.

If Graylog is using 1G I would recommend setting 3G for Elastic.

Elastic works fine I think, just in case I made this improuvement anyway. Thank you.

This use of memory is completely fine for me, it’s just that I was wondering if it was a normal behaviour.

Yes, it is not unusual.

With more details what is using the memory in details and with information about the JVM we would be able to look into more, but in general - this is a common behavior.

I assume that we can close the topic but here is a htop view:

This article will give you some more background information on Java JVM and how to get detailed information

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.