News for hackers. Stuff that matters.
Re:LevelDB Benchmarks by MichaelGG on Wednesday July 27, 2011 @05:55PM (#2814371)
Well look how SQLite does write ahead logging (assuming I understand it). Transactions can go into the log and commit, without modifying the original data. Now and then, it can "checkpoint" to move those logged transactions into the database. This way, transactions are mainly sequential writes, with a bit of maintenance now and then.

I've used a similar approach for a constant database. The transaction log goes to disk, but also stays in memory. Scanning it linearly isn't that slow. When it grows too large, the log is converted into a disk-optimized format, which is a rather quick process. This way, it can take tons of writes, service reads acceptably, while still being able to store much more data than RAM and offering fast access to on-disk data.

Re:LevelDB Benchmarks by ryanpetrich on Wednesday July 27, 2011 @06:16PM (#2814466)
I understand that to be the case when not using synchronous. The point of synchronous full is that sqlite should only consider a transaction committed when it is fully flushed to disk. Assuming a 7200rpm disk that isn't lying to you, at most 120 dependent transactions a second should be even possible.

(this should apply equally to other databases that have a similar option)

Re:LevelDB Benchmarks by MichaelGG on Thursday July 28, 2011 @12:47AM (#2815429)
Why does the disk need to re-seek to write to the next sector? With things like SQLite WAL, you're just performing sequential writes to disk.
Re:LevelDB Benchmarks by ryanpetrich on Thursday July 28, 2011 @07:59PM (#2819554)
I hadn't thought of that. If the disk can perform some localized remapping, it's possible to get sequential fsynced writes to exceed the rotation speed.