in reply to Re: Which is quicker - writing to a file or inserting into a db?
in thread Which is quicker - writing to a file or inserting into a db?

True, but (and this is partially a response to the post right above): once you've opened the file in a mod_perl or equivalent persistent process, there's no need to close and re-open it between requests, which may or may not shift a lot of IO into RAM anyway. And on an OS designed for high performance open/close may not even make much difference (except for the extra 2 calls).

Which is to say, a RAM disk will probably not gain you much (if anything) once you much once you've got the basic IO strategy optimized. Provided your system isn't completely overloaded. And you really don't want to use a RAM disk or any serious write-caching in a situation where you're pushing the whole system to the limit. Assuming you would actually want to store the data somewhere where it's safe.

  • Comment on Re^2: Which is quicker - writing to a file or inserting into a db?