facebook / watchman

Watches files and records, or triggers actions, when they change.
https://facebook.github.io/watchman/
MIT License
12.42k stars 989 forks source link

Watchman is running at a lower than normal priority. #1176

Closed sauloefo closed 4 months ago

sauloefo commented 7 months ago

Operating System: Pop!OS_22.04 Watchman Version: 2023.11.27.00 Installed using: homebrew

When Sorbet tries to start, watchman refuses to start and shows the following message:

[cli] Watchman is running at a lower than normal priority.
(nice_value=6, min_acceptable_nice_value=0).
Since that results in poor performance that is otherwise very difficult to trace,
diagnose and debug, Watchman is refusing to start.

Does anybody know what I can try?

MichaelCuevas commented 4 months ago

I don't know what Sorbet is, but it is likely spawning Watchman when it starts up. Watchman has a minimum accepted nice value (min_acceptable_nice_value, which can be configured with Watchman's configs https://facebook.github.io/watchman/docs/config). It has this minimum nice value because Watchman's performance will deteriorate if the running Watchman process isn't given enough priority by the OS. The priority that Watchman gets started with is likely inherited from Sorbet.

You can either:

1) change the config value as mentioned above (not recommended, since higher nice values mean Watchman may not be able to keep up with changes to the watch point). 2) Start Sorbet with a higher priority (and therefore lower nice value) so that Watchman inherits that priority from Sorbet.