On Wed, May 06, 2009 at 10:36:50PM -0400, D. Richard Hipp wrote: > > A new optional extension is included that implements an asynchronous I/ > O backend for SQLite on either windows or unix. The asynchronous I/O > backend processes all writes using a background thread. This gives > the appearance of faster response time at the cost of durability and > additional memory usage. See http://www.sqlite.org/asyncvfs.html for > additional information.
What are the benefits of using async I/O over "PRAGMA synchronous = OFF"? If AIO is used for the rollback journal as well, you've lost your ACID properties already, so you may as well just use "PRAGMA synchronous = OFF" anyway and keep the code simpler. Where I might be able to see the benefit of this background thread is if the background thread grouped all pending write requests into a single writev (or win32 equiv), which would reduce the system call count, but this may be offset by all the extra memory buffer copying that is occurring when copying a write request to the write queue. We now have 2 buffer copies when writing a buffer (once to the AIO queue, plus the copy to the OS.) Are there any benchmarks numbers that indicate AIO is better than the async PRAGMA? Cheers, Christian _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users