No such thing as a small change | |
PerlMonks |
Re^3: open for appendby cmeyer (Pilgrim) |
on Aug 26, 2005 at 21:38 UTC ( [id://487043]=note: print w/replies, xml ) | Need Help?? |
Yes, increasing the line size to just over 4.1k causes errors in the line length discrepancies test, indicating data interleave problems between different processes. I didn't get interleaving problems with the line sizes any smaller than that. I'm running on reiserfs, which I understand has some sort of variable block size. I never see discrepancies with the total byte count, which seems to match the open(2) documentation on my system. Anyway, the take home is that you may as well be safe and perform exclusive locking, when you have many processes writing to the same file (which is opened for append). I haven't done any benchmarking to see if there is significant savings from not doing lock. It is conceivable that someone might wish to consider this possibility, if they could be assured that each "record" written to the file were smaller than their block size. -Colin. WHITEPAGES.COM | INC
In Section
Meditations
|
|