liuis / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

minor correction to project home page (re sync time) #56

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The page states,

"Each "fillsync" operation costs much less (0.3 millisecond) than a disk seek 
(typically 10 milliseconds). We suspect that this is because the hard disk 
itself is buffering the update in its memory and responding before the data has 
been written to the platter. This may or may not be safe based on whether or 
not the hard disk has enough power to save its memory in the event of a power 
failure."

Assuming that the operating system is in fact synchronously asking the disk to 
flush its buffers (this is platform dependent), then the minimum limit is not a 
disk *seek*; it is the time of one platter rotation. For example, at 7200rpm, 
every sync operation must take at least 8.33ms. 

If you're observing only 0.3ms then your hypothesis is good: Either the disk 
isn't being asked to synchronously flush, or it is ignoring the request. 
(Needless to say, such a disk is broken for journaled or transactional uses.)

Original issue reported on code.google.com by t...@telegraphics.com.au on 19 Nov 2011 at 7:21