[issue11877] Change os.fsync() to support physical backing store syncs

Charles-François Natali report at bugs.python.org
Sun May 15 22:11:29 CEST 2011


Charles-François Natali <neologix at free.fr> added the comment:

(I'm not sure Rietveld sent the message so I post it here, sorry in case of duplicate).

Steffen, I've made a quick review of your patch, in case you're interested.
I think that this functionality can be really useful to some people, and it'd be
nice if your patch could stabilize somewhat so that committers can review it
properly and eventually merge it.

Concerning your benchmark:
I don't know exactly what you're measuring, but when performing I/O-related
benchmarks, it's always a good idea to run each test several times in a row, or
flush the page/buffer cache before each run: the reason is that the the second
run benefits from the page/buffer cache, which often speeds things up
dramatically.
Example:

# time find /lib -type f -exec cat {} \; > /dev/null 
real    0m20.455s
user    0m8.145s
sys     0m5.256s

# time find /lib -type f -exec cat {} \; > /dev/null 
real    0m6.827s
user    0m8.477s
sys     0m4.804s

# echo 3 > /proc/sys/vm/drop_caches 

# time find /lib -type f -exec cat {} \; > /dev/null 
real    0m19.954s
user    0m8.069s
sys     0m5.364s

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11877>
_______________________________________


More information about the Python-bugs-list mailing list