Skip to content

High idle CPU usage with fsWatcherDelayS below 1 second in v2.1.3 (incomplete fix for \#9927) #10899

Closed

Description

@gaoyanwei

What happened?

I ran into this on v2.1.3. CPU usage on Linux stayed around 130% even when the folder was idle and nothing was being transferred. The watcher delay was set to 0.5 seconds.

The CPU profile pointed to the file watcher. Line 439 in aggregator.go(https://github.com/syncthing/syncthing/blob/v2.1.3/lib/watchaggregator/aggregator.go#L439) still uses time.Duration(folderCfg.FSWatcherDelayS) * time.Second, which turns 0.5 into zero and causes the timer to keep spinning. It looks like #10179 (#10179) missed this line.

Setting the delay to 1 second brought CPU usage back to normal on both Linux and Windows. After fixing that line locally on Linux, I could use 0.5 seconds again, with idle CPU around 0–0.2%.

Syncthing version

v2.1.3

Platform & operating system

Linux x86_64

Browser version

No response

Relevant log output

Activity

  1. added
    bug
    on Sep 30, 2026
  2. added theissue type on Sep 30, 2026
  3. added
    needs-triage
    on Sep 30, 2026
  4. removed
    needs-triage
    on Sep 30, 2026
  5. added a commit that references this issue on Sep 30, 2026
    9bb4747
  6. added a commit that references this issue on Oct 18, 2026
    30aa9c3
  7. added a commit that references this issue on Oct 19, 2026
    7888d0e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions