On Fri, 24 Mar 2006 16:43:23 +0700, Shark Fin S. wrote:
So is it true that appending text to a larger file takes longer than
to a smaller file? The reason I am asking is, I am wondering whether
the slowness really comes from my large log files.
That depends on what file system you’re using. In general, any
in a [sequential, random, keyed] [read, write, update, create, delete]
operation will result in a slowdown in one of the other operation types.
Different file systems optimize for different use cases.
And it’s not always linear. I remember a file system that would work
up to a certain file length, and then hit a dramatic slowdown as it
reorganized its two-level tree into a three-level tree. HPFS used to
great difficulty with directories that contained more than a thousand or
files, to the point where sendmail became a write-only application,
it could never work through the queue.
I’m no expert on current file systems like ext3, xfs, or Reiser, but if
would prefer not to rotate logs, you should check into these, and see
is optimal for your use.