[asterisk-dev] How to improve astdb? Any ideas?
Stefan Schmidt
sst at sil.at
Mon Sep 6 10:05:20 CDT 2010
Am 06.09.2010 16:05, schrieb Ron Arts:
> fsync writes all buffers to disk, it blocks until this is done. This means that C library
> will push out all its buffers to the OS, and the OS will push out everything to disk.
> This will result in hard disk head movements. If you call fsync in a tight loop,
> and there are modified buffers each iteration, then the other processes in the system
> will have a hard time getting the head to move in their direction.
>
> Ron
hello ron,
fsync takes a filedescriptor as a parameter and only wait until the
buffer of this filedescriptor is written to disk, not all buffers.
what you mean is sync. this function will write all buffers.
see http://linux.die.net/man/2/sync how it differs to
http://linux.die.net/man/2/fsync
btw i have tried fdatasync instead of fsync but there isnt much time
safing in using fdatasync instead of fsync.
best regards
steve
More information about the asterisk-dev
mailing list