All of lore.kernel.org
 help / color / mirror / Atom feed
* [yocto-autobuilder-helper][dunfell 0/3] Patch review
@ 2022-02-22 15:20 Steve Sakoman
  2022-02-22 15:20 ` [yocto-autobuilder-helper][dunfell 1/3] scripts/prepare-shared-repos: Use tmpfs for speed Steve Sakoman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Steve Sakoman @ 2022-02-22 15:20 UTC (permalink / raw)
  To: yocto

I'm seeing intermittent timeout errors when starting an a-full build:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/3267

This set of patches from master seems to fix the issue.

The following changes since commit fe26983bb39a6a51eea3c0fe87dbc6a016abd85d:

  config.json: Add other repo defaults to fix check-layer-nightly for meta-aws (2022-01-07 15:32:16 +0000)

are available in the Git repository at:

  git://git.yoctoproject.org/yocto-autobuilder-helper contrib/sakoman
  http://git.yoctoproject.org/cgit.cgi/yocto-autobuilder-helper/log/?h=contrib/sakoman

Richard Purdie (3):
  scripts/prepare-shared-repos: Use tmpfs for speed
  prepare-shared-repos: Make it clear when rsync starts in logs
  shared-repos: Use tar instead of rsync for speed

 scripts/prepare-shared-repos | 5 +++--
 scripts/send-qa-email        | 6 ++++--
 scripts/shared-repo-unpack   | 9 ++++++---
 3 files changed, 13 insertions(+), 7 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [yocto-autobuilder-helper][dunfell 1/3] scripts/prepare-shared-repos: Use tmpfs for speed
  2022-02-22 15:20 [yocto-autobuilder-helper][dunfell 0/3] Patch review Steve Sakoman
@ 2022-02-22 15:20 ` Steve Sakoman
  2022-02-22 15:20 ` [yocto-autobuilder-helper][dunfell 2/3] prepare-shared-repos: Make it clear when rsync starts in logs Steve Sakoman
  2022-02-22 15:20 ` [yocto-autobuilder-helper][dunfell 3/3] shared-repos: Use tar instead of rsync for speed Steve Sakoman
  2 siblings, 0 replies; 4+ messages in thread
From: Steve Sakoman @ 2022-02-22 15:20 UTC (permalink / raw)
  To: yocto

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 298a10575851d501204fe1ee0d1dcbcec37a66cd)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 scripts/prepare-shared-repos | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/prepare-shared-repos b/scripts/prepare-shared-repos
index 8400d09..1573f85 100755
--- a/scripts/prepare-shared-repos
+++ b/scripts/prepare-shared-repos
@@ -32,7 +32,7 @@ with open(args.repojson) as f:
 
 stashdir = utils.getconfig("REPO_STASH_DIR", ourconfig)
 
-with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/tmp") as tempdir:
+with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/home/pokybuild/tmp") as tempdir:
     for repo in sorted(repos.keys()):
         utils.printheader("Intially fetching repo %s" % repo)
         utils.fetchgitrepo(tempdir, repo, repos[repo], stashdir)
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [yocto-autobuilder-helper][dunfell 2/3] prepare-shared-repos: Make it clear when rsync starts in logs
  2022-02-22 15:20 [yocto-autobuilder-helper][dunfell 0/3] Patch review Steve Sakoman
  2022-02-22 15:20 ` [yocto-autobuilder-helper][dunfell 1/3] scripts/prepare-shared-repos: Use tmpfs for speed Steve Sakoman
@ 2022-02-22 15:20 ` Steve Sakoman
  2022-02-22 15:20 ` [yocto-autobuilder-helper][dunfell 3/3] shared-repos: Use tar instead of rsync for speed Steve Sakoman
  2 siblings, 0 replies; 4+ messages in thread
From: Steve Sakoman @ 2022-02-22 15:20 UTC (permalink / raw)
  To: yocto

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 8e996a95a8902b40380dd477ecb606cc969cdee9)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 scripts/prepare-shared-repos | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/prepare-shared-repos b/scripts/prepare-shared-repos
index 1573f85..c221e69 100755
--- a/scripts/prepare-shared-repos
+++ b/scripts/prepare-shared-repos
@@ -39,4 +39,5 @@ with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/home/pokybuil
         if args.publish_dir:
             utils.publishrepo(tempdir, repo, args.publish_dir)
 
+    utils.printheader("Running rsync")
     subprocess.check_call("rsync -a " + tempdir + "/* " + args.sharedsrcdir, shell=True)
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [yocto-autobuilder-helper][dunfell 3/3] shared-repos: Use tar instead of rsync for speed
  2022-02-22 15:20 [yocto-autobuilder-helper][dunfell 0/3] Patch review Steve Sakoman
  2022-02-22 15:20 ` [yocto-autobuilder-helper][dunfell 1/3] scripts/prepare-shared-repos: Use tmpfs for speed Steve Sakoman
  2022-02-22 15:20 ` [yocto-autobuilder-helper][dunfell 2/3] prepare-shared-repos: Make it clear when rsync starts in logs Steve Sakoman
@ 2022-02-22 15:20 ` Steve Sakoman
  2 siblings, 0 replies; 4+ messages in thread
From: Steve Sakoman @ 2022-02-22 15:20 UTC (permalink / raw)
  To: yocto

From: Richard Purdie <richard.purdie@linuxfoundation.org>

The rysnc of 20,000 files (650MB) onto the nas is slow taking ~3 minutes
at idle and worse at load. This is due to the number of files which
is a pain point for NFS. This piece of the build is also a bottleneck
since the rest of a build depends on it happening.

If we switch to zstd compressed tar, it takes 2.49s. Other compression
methods were much slower but zstd seems 'accptable' and speeds things
up too.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit aff49e938ee34e1fc5a2954e3e22a4ca1ae9ac7b)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 scripts/prepare-shared-repos | 4 ++--
 scripts/send-qa-email        | 6 ++++--
 scripts/shared-repo-unpack   | 9 ++++++---
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/scripts/prepare-shared-repos b/scripts/prepare-shared-repos
index c221e69..a5bc0da 100755
--- a/scripts/prepare-shared-repos
+++ b/scripts/prepare-shared-repos
@@ -39,5 +39,5 @@ with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/home/pokybuil
         if args.publish_dir:
             utils.publishrepo(tempdir, repo, args.publish_dir)
 
-    utils.printheader("Running rsync")
-    subprocess.check_call("rsync -a " + tempdir + "/* " + args.sharedsrcdir, shell=True)
+    utils.printheader("Creating shared src tarball")
+    subprocess.check_call("tar -I zstd -cf " + args.sharedsrcdir.rstrip("/") + ".tar.zst ./*", shell=True, cwd=tempdir)
diff --git a/scripts/send-qa-email b/scripts/send-qa-email
index 1b69307..bc594df 100755
--- a/scripts/send-qa-email
+++ b/scripts/send-qa-email
@@ -45,9 +45,11 @@ buildtoolsdir = os.path.dirname(args.repojson) + "/build/buildtools"
 if os.path.exists(buildtoolsdir):
     utils.enable_buildtools_tarball(buildtoolsdir)
 
+repodir = os.path.dirname(args.repojson) + "/build/repos"
+
 if 'poky' in repos and os.path.exists(resulttool) and args.results_dir:
     # Need the finalised revisions (not 'HEAD')
-    targetrepodir = "%s/poky" % (args.sharedrepodir)
+    targetrepodir = "%s/poky" % (repodir)
     revision = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=targetrepodir).decode('utf-8').strip()
     branch = repos['poky']['branch']
     repo = repos['poky']['url']
@@ -116,7 +118,7 @@ if args.send.lower() != 'true' or not args.publish_dir or not args.release:
 buildhashes = ""
 for repo in sorted(repos.keys()):
     # Need the finalised revisions (not 'HEAD')
-    targetrepodir = "%s/%s" % (args.sharedrepodir, repo)
+    targetrepodir = "%s/%s" % (repodir, repo)
     revision = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=targetrepodir).decode('utf-8').strip()
     buildhashes += "%s: %s\n" % (repo, revision)
 
diff --git a/scripts/shared-repo-unpack b/scripts/shared-repo-unpack
index f08efa8..f7f87af 100755
--- a/scripts/shared-repo-unpack
+++ b/scripts/shared-repo-unpack
@@ -50,11 +50,14 @@ needrepos_baseddirs = [r.split('/')[0] for r in needrepos]
 for repo in sorted(repos.keys()):
     if repo not in needrepos_baseddirs:
         continue
-    targetrepodir = "%s/%s" % (targetsubdir, repo)
     if args.cache_dir:
         utils.printheader("Copying in repo %s" % repo)
-        utils.mkdir(targetrepodir)
-        subprocess.check_call(["rsync", "-a", "%s/%s" % (args.cache_dir, repo), targetsubdir])
+        utils.mkdir(targetsubdir)
+        if args.target in ["a-full", "a-quick"]:
+            # full/quick need all repo data due to send-qa-email
+            subprocess.check_call(["tar", "-I", "zstd", "-C", targetsubdir, "-xf", "%s.tar.zst" % args.cache_dir])
+        else:
+            subprocess.check_call(["tar", "-I", "zstd", "-C", targetsubdir, "-xf", "%s.tar.zst" % args.cache_dir, "./" + repo])
     else:
         utils.printheader("Fetching repo %s" % repo)
         utils.fetchgitrepo(targetsubdir, repo, repos[repo], stashdir)
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-22 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-22 15:20 [yocto-autobuilder-helper][dunfell 0/3] Patch review Steve Sakoman
2022-02-22 15:20 ` [yocto-autobuilder-helper][dunfell 1/3] scripts/prepare-shared-repos: Use tmpfs for speed Steve Sakoman
2022-02-22 15:20 ` [yocto-autobuilder-helper][dunfell 2/3] prepare-shared-repos: Make it clear when rsync starts in logs Steve Sakoman
2022-02-22 15:20 ` [yocto-autobuilder-helper][dunfell 3/3] shared-repos: Use tar instead of rsync for speed Steve Sakoman

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.