graylog-server unable to handle loads of 40K messages per second
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 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 graylog-server = graylog-server-1.0.0-12.noarch storage medium = 10G ramdisk
- Try using the latest 1.0.2 version of graylog-server.
- How much memory is assigned to graylog-server? I had to manually increase heap size from 1GB to 8GB.
- 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.
- I think that we might need to upgrade to that version.
- 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"
- 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
You may also want to investigate modifications to the following settings:
https://github.com/Graylog2/graylog2-server/blob/master/misc/graylog2.conf#L240-L266
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 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!
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.
Thanks for the update!
Any news on this?
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.
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 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!