graylog2-server icon indicating copy to clipboard operation
graylog2-server copied to clipboard

graylog-server unable to handle loads of 40K messages per second

Open eorochena opened this issue 11 years ago • 13 comments

We have been using this application to process log files from several servers, and so far has been working great; but during a sudden spike in traffic (40K messages per second) we noticed that the master server became unresponsive and the Process buffer, the Output buffer and the disk journal got saturated.

Is there any limit on the number of messages that the graylog master node can process at any given time? We noticed that under loads of 20K there is some contention on the server but it is able to keep up.

eorochena avatar Apr 16 '15 11:04 eorochena

@eorochena What version of graylog-server are you running? What type of storage medium do you have backing the journal file (spinning disk, SSD, ramdisk)?

brandongalbraith avatar May 14 '15 23:05 brandongalbraith

@brandongalbraith graylog-server = graylog-server-1.0.0-12.noarch storage medium = 10G ramdisk

eorochena avatar May 14 '15 23:05 eorochena

  1. Try using the latest 1.0.2 version of graylog-server.
  2. How much memory is assigned to graylog-server? I had to manually increase heap size from 1GB to 8GB.
  3. Its entirely possible you may be bursting above what a single server with your hardware configuration can provide for (someone from Graylog would need to chime in). You might need to distribute inbound logging data across additional Graylog servers.

brandongalbraith avatar May 14 '15 23:05 brandongalbraith

  1. I think that we might need to upgrade to that version.
  2. Our current heap size settings are GRAYLOG_SERVER_JAVA_OPTS="-Xms20g -Xmx20g -XX:NewRatio=1 -XX:PermSize=128m -XX:MaxPermSize=1g -server -XX:+ResizeTLAB -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled -XX:+CMSClassUnloadingEnabled -XX:+UseParNewGC -XX:-OmitStackTraceInFastThrow"
  3. That's is another option that we are exploring but the current server is fairly ok: 48GB DDR3 RAM (Error Correction Type: Multi-bit ECC), Proccessor Intel(R) Xeon(R) CPU E5645 @ 2.40GHz

eorochena avatar May 14 '15 23:05 eorochena

You may also want to investigate modifications to the following settings:

https://github.com/Graylog2/graylog2-server/blob/master/misc/graylog2.conf#L240-L266

brandongalbraith avatar May 14 '15 23:05 brandongalbraith

We already try a few changes in the server.conf file but since we haven't experience another spike in messages we don't have a way to properly test them out.

@rwagner42

eorochena avatar May 15 '15 00:05 eorochena

@eorochena It is also possible that your Elasticsearch cluster cannot handle the load spike. If the process buffer and the output buffer are full, it is a good indication that this is the case.

Please check the health of your Elasticsearch nodes during the next load spike. I am closing this, please re-open if you have further questions. Thank you!

bernd avatar May 23 '15 13:05 bernd

Unfortunately, that is not the case, the elasticsearch servers (3 of them) were pretty much idle during the spike event, the cpu load was way under 1.00 and there was very little I/O contention according to iostat.

eorochena avatar May 23 '15 20:05 eorochena

Thanks for the update!

bernd avatar May 24 '15 10:05 bernd

Any news on this?

jamescarr avatar May 27 '15 15:05 jamescarr

For what it's worth, we were able to log up to 60,000 messages per second. This did make have use of the journal though and seemed to be mostly cpu bound. If we added more than 2cpus to vm I think it would perform better. We also have a 2 node elaaticsearch setup. Mileage may vary.

drewmmiranda avatar Aug 26 '15 02:08 drewmmiranda

After review, I increased the heap size on the offending graylog node from 1GB (default) to 2GB and this resolved the issue. Last night the node was able to handle a spike of 264,000 messages within 1 hour. These were also very large messages (multiline) and previously a couple of minutes of these messages in a spike would crash it. All looks good!

drewmmiranda avatar Oct 30 '15 13:10 drewmmiranda

@drewmmiranda Thank you for the update!

I am closing this issue now, please re-open if you still have problems with the latest Graylog version (currently 1.2.2) and once you increased the heap size. Thank you!

bernd avatar Oct 30 '15 14:10 bernd