[ovs-dev] [PATCH 4/4] ovsdb: Compact databases online automatically and on-demand.

Jesse Gross jesse at nicira.com
Thu Mar 18 19:38:32 UTC 2010


On Thu, Mar 18, 2010 at 2:20 PM, Ben Pfaff <blp at nicira.com> wrote:
>
> The big reason that compacting a large database takes a long time is
> that there is a lot of data to read and hence a lot of data to write.
> But compacting an OVSDB database just writes the database's current
> contents to a new file and then renames the new file over the old one.
> It should be very fast because there is no data to read (the database is
> already completely in memory) and not much data to write (the database
> isn't very big).
>
>
OK, I buy that.


> What I am a little concerned about is the performance of the fsync()
> operations that we do during compacting.  From memory, there are three
> of them: the old version of the database, the new version of the
> database, and then the directory itself after the rename.  fsync()
> performance is terrible on ext3, which XenServer uses for Dom0.  If this
> is a problem in practice then maybe we will have to do the fsyncs
> asynchronously, e.g. by forking a new process or via aio_fsync(), and
> service other requests in the meantime.  But I decided to start out
> simply and worry about fsync() if it proves to be a real problem.
>

That sounds reasonable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20100318/a45c4116/attachment-0003.html>


More information about the dev mailing list