syslogd shouldn't sync after each LOG_KERN line
currently syslogd fdsyncs after each LOG_KERN line. This slows down the output significantly. Instead if should not sync when more messages are pending.
Updated by Gary Mills almost 8 years ago
- Status changed from New to In Progress
- Assignee set to Gary Mills
- % Done changed from 0 to 80
My strategy is to detect bursts of kernel messages by calling poll() repeatedly with zero timeout until there are no more messages. Then the sys_poll thread issues a sync and sleeps in a poll() with infinite timeout.
Updated by Gary Mills over 7 years ago
- Status changed from In Progress to Feedback
I've abandoned this bug fix pending further information. Omitting the sync after every write of a system message to a log file may result in lost messages. Has anybody encountered a performance problem as a result of the frequent syncs? If not, it's better to leave the syslogd code unchanged.