buffering history text file writes

Ilya Etingof ilya at glas.net
Tue Dec 26 15:31:00 UTC 2000


While trying to improve the performance of innd running on my slow
newsfeed machine, I've accidentally noticed that innd fflush()'es
history text file every time it appends new line to it. So, I've
hacked up innd to:

* fflush() history text file only when either HISsync() is invoked
  or innd's going to read from history text file
* use large stdio buffer (with setbuf()) for history text file
  write stream
These hacks reduced inn timer's "history write" profile by about 10%
(did I mention my slow disks? ;-).

Although I have not yet noticed any problems while running hacked innd,
I've not digged into innd code deeply enough to be certain that my hacks
do not break anything to innd.

I'd appreciate any comments on the concept of this hack.


More information about the inn-workers mailing list