Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sandboxfs performance impact on an iOS project #76

Open
keith opened this issue Mar 2, 2019 · 4 comments
Open

sandboxfs performance impact on an iOS project #76

keith opened this issue Mar 2, 2019 · 4 comments

Comments

@keith
Copy link
Member

keith commented Mar 2, 2019

I just wanted to provide some numbers for our iOS project when using sandboxfs. If this isn't useful for you, feel free to close it.

Note: I ran clean --expunge between each build:

Default sandboxing:

% USE_BAZEL_VERSION=last_green bazelisk build --config=debug Modules/PassengerApp:Lyft
2019/03/02 12:22:49 Using unreleased version at commit 1bc7d14739e1c2359f4b91d7aff422f550a53c27
Starting local Bazel server and connecting to it...
INFO: Analysed target //Modules/PassengerApp:Lyft (320 packages loaded, 11106 targets configured).
INFO: Found 1 target...
Target //Modules/PassengerApp:Lyft up-to-date:
  bazel-bin/Modules/PassengerApp/Lyft.ipa
INFO: Elapsed time: 478.154s, Critical Path: 368.44s
INFO: 1658 processes: 1146 darwin-sandbox, 512 local.
INFO: Build completed successfully, 2172 total actions

Sandboxfs:

% USE_BAZEL_VERSION=last_green bazelisk build --config=debug Modules/PassengerApp:Lyft --experimental_use_sandboxfs --experimental_sandboxfs_path=`which sandboxfs`
22019/03/02 12:31:23 Us019/03/02 12:31:23 Using unreleased version at commit 1bc7d14739e1c2359f4b91d7aff422f550a53c27
Starting local Bazel server and connecting to it...
INFO: Analysed target //Modules/PassengerApp:Lyft (320 packages loaded, 11106 targets configured).
INFO: Found 1 target...
Target //Modules/PassengerApp:Lyft up-to-date:
  bazel-bin/Modules/PassengerApp/Lyft.ipa
INFO: Elapsed time: 662.932s, Critical Path: 592.93s
INFO: 1658 processes: 1146 darwin-sandbox, 512 local.
INFO: Build completed successfully, 2172 total actions

Local:

% USE_BAZEL_VERSION=last_green bazelisk build --config=debug Modules/PassengerApp:Lyft --config=nosandbox
2019/03/02 12:43:33 Using unreleased version at commit 1bc7d14739e1c2359f4b91d7aff422f550a53c27
Starting local Bazel server and connecting to it...
INFO: Analysed target //Modules/PassengerApp:Lyft (320 packages loaded, 11106 targets configured).
INFO: Found 1 target...
Target //Modules/PassengerApp:Lyft up-to-date:
  bazel-bin/Modules/PassengerApp/Lyft.ipa
INFO: Elapsed time: 265.130s, Critical Path: 207.45s
INFO: 1658 processes: 1658 local.
INFO: Build completed successfully, 2172 total actions

I can't provide the full project to reproduce this, but if there's any other specific questions I can answer I can try to provide other useful info

@jmmv
Copy link
Contributor

jmmv commented Mar 2, 2019

Interesting. Is this with the release binary of sandboxfs 0.1.0 in the repository or with a custom build? If the latter, just double-checking if you built it in --release mode?

@keith
Copy link
Member Author

keith commented Mar 2, 2019

I had gone through the cargo install path from crates.io (although --version did report 0.1.0). I've reinstalled with the 0.1.0 pkg and here was run with that:

% USE_BAZEL_VERSION=last_green bazelisk build --config=debug Modules/PassengerApp:Lyft --experimental_use_sandboxfs --experimental_sandboxfs_path=`which sandboxfs`
2019/03/02 14:24:07 Using unreleased version at commit 1bc7d14739e1c2359f4b91d7aff422f550a53c27
Starting local Bazel server and connecting to it...
INFO: Analysed target //Modules/PassengerApp:Lyft (320 packages loaded, 11106 targets configured).
INFO: Found 1 target...
Target //Modules/PassengerApp:Lyft up-to-date:
  bazel-bin/Modules/PassengerApp/Lyft.ipa
INFO: Elapsed time: 637.240s, Critical Path: 545.63s
INFO: 1658 processes: 1146 darwin-sandbox, 512 local.
INFO: Build completed successfully, 2172 total actions

@jmmv
Copy link
Contributor

jmmv commented Mar 3, 2019

I just wanted to ensure that the binary was built with --release as otherwise it can be quite slow. So, to summarize:

No sandbox: Elapsed time: 265.130s, Critical Path: 207.45s
symlinked sandbox: Elapsed time: 478.154s, Critical Path: 368.44s
sandboxfs sandbox: Elapsed time: 637.240s, Critical Path: 545.63s

Correct? Not great! Unfortunately this doesn't match what I have observed so far, so I'll need more information to understand what's going on. Can you provide some? Like machine type, maybe the "type" of your build, if you noticed sandboxfs using significant CPU during the build... I don't know, anything you can share that's not confidential :P

@keith
Copy link
Member Author

keith commented Mar 8, 2019

This is the hardware I'm testing on image

What details would you like for the "type" of build? In general this is an iOS app with ~10K files for this build and ~1k rules.

I didn't notice significant CPU use but I can run it again and pay more attention to that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants