On 3 Mar 2014, at 2:14am, romtek <[email protected]> wrote: > On one of my hosting servers (this one is a VPS), a bunch of write > operations take practically the same amount of time when they are performed > individually as when they are performed as one explicit transaction. I've > varied the number of ops up to 200 -- with the similar results. Why is that? > What could be about the file system or disk drive that could cause this?
I'm betting it's a running on newer hardware more suited to virtual machines. One of the problems with virtual computers is that their disk storage is often virtualised to a very high degree. For instance, what appears to the computer to be disk storage may be entirely held on SSD, or on a fast internal disk, and flushed to a huge but slower disk just once a minute. Or once every five minutes. Or once an hour. This is an efficient way to simulate 20 to 200 virtual machines on what is one lump of hardware. A result of this is that disk operations are very fast. However, any 'sync()' operations do nothing at all because nobody cares what happens if an imaginary computer crashes. Since most of the time involved in ending a transaction is waiting for synchronisation, this produces the results you note: syncing once takes the same time as syncing 200 times, because neither of them is doing much. And a result of that is that if the computer crashes, you lose the last minute/minutes/hour of processing and the sync() state of database operations is suspect. Go read their terms and find out what they guarantee to do if a virtual machine crashes. You'll probably find that they'll get a virtual computer running again very quickly but don't make promises about how recent the image they restore will be. Simon. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

