Increasing number of java processes


#1

Hello,

Like in this old closed topic https://github.com/Graylog2/graylog2-server/issues/2363, 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.


(Jan Doberstein) #2

is the above graph from the OS or the JVM?


#3

It comes from the monitoring system (Zabbix).


(Jan Doberstein) #4

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?


#5

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"


(Jan Doberstein) #6

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?


#7

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.


(Zero) #8

You might want to do this => https://stackoverflow.com/a/44005809 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.


#9

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


(Jan Doberstein) #10

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.


#11

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


(Jan Doberstein) #12

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


(system) #13

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