summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-18 23:23:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-18 23:29:07 +0000
commit19c75e92a1b8eac8cb24ae8f1d5f99cf9df913ff (patch)
tree9a58c980142bb88c756b5ff41d0f868d8db1db01 /bitbake
parentcfd1520b4b492ab27b2900ba3510abe6f288097e (diff)
downloadpoky-19c75e92a1b8eac8cb24ae8f1d5f99cf9df913ff.tar.gz
bitbake: siggen: Remove fsync that is causing performance issues
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. (Bitbake rev: 46fd841319479f6079d850b3813e64bd8c2680a3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/siggen.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index bc96fd3b7a..bb8203df05 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -238,7 +238,6 @@ class SignatureGeneratorBasic(SignatureGenerator):
238 with os.fdopen(fd, "wb") as stream: 238 with os.fdopen(fd, "wb") as stream:
239 p = pickle.dump(data, stream, -1) 239 p = pickle.dump(data, stream, -1)
240 stream.flush() 240 stream.flush()
241 os.fsync(fd)
242 os.chmod(tmpfile, 0664) 241 os.chmod(tmpfile, 0664)
243 os.rename(tmpfile, sigfile) 242 os.rename(tmpfile, sigfile)
244 except (OSError, IOError) as err: 243 except (OSError, IOError) as err: