Recently, one of our most senior engineers asked me about context switching with respect to using syslog-ng vs. writing logs out from our application to disk.
Context: I want to use syslog-ng to log & ship output from our application written in C++ to logstash on a remote logserver host, then shove it all into elasticsearch & use Kibana as a front-end for log viewing, analysis, and derivation of useful metrics. ELK stack
We currently utilize an FSYNC buffer of either 4K or 8K that spits logs out in intervals to the logfile on disk; that is to say, we're not forcing a write to disk for each log entry.
Like any good performance-seeking engineer, he wants to understand whether we'll see greater context switching or if we can make any performance gains by leveraging syslog-ng.
So the question is: Will using syslog-ng reduce or increase context switches on that application's host.
My expertise leads me here, to ask the question - given that I don't have sufficient knowledge to come up with the answer on my own.
Long-time lurker, still new to posting. Thanks!