High CPU utilization while idle
Thank you for this amazing project!
I noticed high CPU usage while being idle. Is this a known issue?
I've suspected that this could be an issue, although it isn't for me personally. Can you send a sample of /opt/homebrew/var/log/dura.log.json and /opt/homebrew/var/log/dura.stderr.log?
Sure dura.tar.gz
Hey, I'm just checking if anything else is needed from my side to proceed with the investigation.
Hi, sorry for being slow. I need more info. I was hoping to put together instructions for you to install flamegraph, but I couldn't get them to work myself. The problem is that flamegraph needs to run as sudo, but if dura runs as sudo i'm concerned it will write files into the .git dir as sudo, which might corrupt the index (fix: adjust the permissions).
This is what I had written
Hey, if you don't mind, can you please follow some steps to capture some debug info for me? It'll help a lot.
Install flamegraph (you may need to install rustup first)
cargo install flamegraph
Edit /opt/homebrew/opt/dura/homebrew.dura.service and change the array after ProgramArguments to look like this:
<array>
<string>/Users/tim/.cargo/bin/flamegraph</string>
<string>--output</string>
<string>/opt/homebrew/var/log/dura.perf.svg</string>
<string>--</string>
<string>/opt/homebrew/opt/dura/bin/dura</string>
<string>serve</string>
</array>
(obvs fix the home dir)
Restart dura:
brew services restart dura
You might see a notification if it worked:
While following the instructions provided on MacOS 14.4 the process looks a little bit different from described:
brew install rustup-init- execute
rustup-init - edit
/opt/homebrew/opt/dura/homebrew.mxcl.dura.plist - resulted in
❯ brew services start dura
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/user/Library/LaunchAgents/homebrew.mxcl.dura.plist` exited with 5.
~/
❯ sudo brew services start dura
Password:
Warning: Taking root:admin ownership of some dura paths:
/Users/user/.cargo/bin
/Users/user/.cargo/bin/flamegraph
/opt/homebrew/opt/dura
/opt/homebrew/opt/dura/bin
/opt/homebrew/var/homebrew/linked/dura
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
Warning: dura must be run as non-root to start at user login!
==> Successfully started `dura` (label: homebrew.mxcl.dura)
~/
❯ brew services info dura
dura (homebrew.mxcl.dura)
Running: ✘
Loaded: ✔
Schedulable: ✘
~/
❯ brew services start dura
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/user/Library/LaunchAgents/homebrew.mxcl.dura.plist` exited with 5.