[Openstack] [swift] openstack swift PUT object question

Christian Schwede christian.schwede at enovance.com
Fri Oct 10 15:01:17 UTC 2014

> On Fri, Oct 10, 2014 at 7:44 AM, dboyzhong <dboyzhong at 163.com 
> <mailto:dboyzhong at 163.com>> wrote:
> Hi. when i put a object(1K) to swift cluster, the performance is so 
> bad, QPS only 16. and i found the function: "_finalize_put" in file 
> Diskfile.py cost too much time . mainly caused by the fsync() inside 
> _finalize_put operation, the fsync() will cost 30ms when write 1KB 
> data to disk . as a result the PUT performance is bad.

Using a single thread, multiple, threads, spinning disks, SSDs? This
highly depends on your configuration. And 30ms for a single fsync() is a
lot of time, is the disk used heavily? Or is this the actual time for
the whole HTTP request?

> how can tuning the performance ? and why call fsync() function?

The fsync() call ensures that all data is written to disk before the
clients gets a response, stating that everything is ok. Doing this (and
doing this on at least the quorum of the configured replicas) a client
can be sure that the data is actually stored multiple times on disk.
Otherwise there might be a failure before the data gets written to the
disk, and in a worst case scenario that data is lost.


More information about the Openstack mailing list