All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] siggen: Remove fsync that is causing performance issues
@ 2014-01-18 23:30 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2014-01-18 23:30 UTC (permalink / raw)
  To: bitbake-devel

This fsync was added for belt and braces protection for things like sstate
on NFS. To be honest, it probably doesn't buy much, if the rename isn't
atomic, all bets are off anyway and there are bigger issues to worry about.

The issue is that at the end of every task, the dump_sig() code is triggered
to save out information about the task and this was triggering an fsync(fd).

Whilst it may select the file descriptor, on file systems like ext4, it will
require large parts of the journal to be written out so it can have
significant impact. latencytop showed an average fsync() call overhead of about
2s and if that happens for 5000 tasks, the time mounts up. This blocks the next
task execution by that time.

We therefore drop the fsync since in reality its causing problems and is unlikely
to buy much.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index bc96fd3..bb8203d 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -238,7 +238,6 @@ class SignatureGeneratorBasic(SignatureGenerator):
             with os.fdopen(fd, "wb") as stream:
                 p = pickle.dump(data, stream, -1)
                 stream.flush()
-                os.fsync(fd)
             os.chmod(tmpfile, 0664)
             os.rename(tmpfile, sigfile)
         except (OSError, IOError) as err:




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-18 23:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-18 23:30 [PATCH] siggen: Remove fsync that is causing performance issues Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.