[revServer] process timeout issue
Richard Gaskin
ambassador at fourthworld.com
Fri Aug 6 13:49:22 EDT 2010
Jim Ault wrote:
> Most log file logic is to add new transactions to the end of an
> existing file, thus 2 Mb requires more time than 100K. Some servers
> start new log files every calendar day, but others may have a much
> lower frequency.
Limiting unnecessary frequency is useful for many reasons, but with
regard to logs I was just running some experiments last night using
"open file <filename> for append" and it seems that with the append
option the time to write is independent of the original file size; it
seems to operate like the seek command in that regard.
In my tests I was running 10,000 iterations, in which each one created a
string 1k long and wrote it to the file after the file had been opened
for append. Along the way, every 1000 times through the loop it gets
the elapsed time since the last 1000 was done, with these results:
385
383
383
384
384
385
386
382
803
383
The second-to-last item spiking is probably just some background
process; the rest are consistent enough that I've gotten very confident
about using append for logging.
In fact, I repeated the same test a few times, so each time the data
file is growing by 10 MBs, and each time the results are roughly the same.
For example, the results above were done when the file was only about 30
MBs - here are the results when the file is well over 120 MBs:
387
383
383
383
382
383
654
383
383
382
--
Richard Gaskin
Fourth World
Rev training and consulting: http://www.fourthworld.com
Webzine for Rev developers: http://www.revjournal.com
revJournal blog: http://revjournal.com/blog.irv
More information about the use-livecode
mailing list