4 ms·
syslog is also a syscall, and has limited buffering. A named pipe can actually potentially amortize overhead more effectively. (And just because an inode is inv
by cbsmith 13y ago
syslog is also a syscall, and has limited buffering. A named pipe can actually potentially amortize overhead more effectively. (And just because an inode is involved does not mean that a call to stat() involves a trip to disk.)
If you are really worried about buffering, you can always have a consumer of the named pipe with its own buffering before writing to syslog (yes, that can get ugly).
In a perfect world, I'd actually prefer to write to a ring buffer in shared memory (one per worker to avoid too much contention) and then have another process that empties it as fast as it can.
Either way, it's actually not that hard to hack in to nginx. If someone were to contribute a patch that did logging the "right" way and host it on say... github, I think you'd find the nginx commercial folks would have a response that works out pretty well for everyone. The catch is, it requires someone to do something.