UBIFS performance measurements

Leo Barnes barnes.leo at gmail.com
Thu Jun 17 04:42:29 EDT 2010


Hello!

I have a few questions regarding sequential write speeds in UBIFS and
how to measure them.

1. If I want to measure sequential (and later on, random) write speed
in UBIFS, should I do the writes using the O_SYNC flag or just do a
fsync after writing? I worry that using the O_SYNC flag will reduce
the write performance since the file system is meant to be used
asynchronously and I want my measurements to be as close as possible
to how the file system is meant to be used.

2. If I do not use O_SYNC, will using fflush and fsync guarantee that
all written data has been written to flash when they return?

3. If I do not use fflush before fsync, I assume, after reading the
FAQ, that I am not guaranteed that all data has been written. Is this
correct?

4. Does the commandline sync command do the same thing as fflush/fsync?

5. Does sync/fsync force garbage collection? In other words, if I have
deleted lots of files from an UBIFS volume, will I be ensured that
their corresponding eraseblocks will actually be freed if I do a sync?

Any other tips regarding how to perform valid write performance
measurements on UBIFS would be welcome.

Best regards,
//Leo



More information about the linux-mtd mailing list