是否有可能以增加的IO静态价值运行Bazel构建?
我想在较高的IO-NICE级别上运行Bazel
及其所有子过程。
我该如何实现?
I would like to run bazel
and all of its subprocesses at a higher IO-nice-ness level.
How can I achieve that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于您最初的有关CPU的问题;我最终做的是写一个称为原始Bazel二进制的小包装纸。我将其存储在
〜/.local/bin/bazel
中,这是我$路径的早期。确保它在您的$路径中(
哪个-a bazel
将向您显示)并使其可执行(chmod +x Path/to/to/wrapper/scripter
)For your original question regarding CPU niceness; what I ended up doing was to write a tiny wrapper that calls the original bazel binary. I have it stored at
~/.local/bin/bazel
, which is early in my $PATH.Make sure it's in your $PATH (
which -a bazel
will show you if it is) and to make it executable (chmod +x path/to/wrapper/script
)您可以使用
bazel -io_nice_level =<您的好价值在这里>
选项小心它是一个启动选项,因此您需要在Bazel Action之前传递该标志:
You can use the
bazel --io_nice_level=<your nice value here>
optionCareful it's a startup option, so you need to pass that flag before the bazel action: