Can syslog Performance Be Improved?

后端 未结 7 677
猫巷女王i
猫巷女王i 2021-01-31 00:42

We have an application on Linux that used the syslog mechanism. After a week spent trying to figure out why this application was running slower than expected, we discovered tha

7条回答
  •  日久生厌
    2021-01-31 01:14

    Write your own syslog implementation. :-P

    This can be accomplished in two ways.

    1. Write your own LD_PRELOAD hook to override the syslog functions, and make them output to stderr instead. I actually wrote a post about this many years ago: http://marc.info/?m=97175526803720 :-P
    2. Write your own syslog daemon. It's just a simple matter of grabbing datagrams out of /dev/log! :-P

    Okay, okay, so these are both facetious answers. Have you profiled syslogd to see where it's choking up most?

提交回复
热议问题