Skip to content

Limit number of concurrent writes while syncing #6541

@calmh

Description

@calmh

Currently we spawn a goroutine to pull a block, and that goroutine does the file write when it's done. The number of goroutines is limited by the puller max pending kib setting, but this can still be hundreds of goroutines if the requested blocks are small. This can result in hundreds of concurrent disk writes, in turn spawning hundreds of I/O bound threads.

We should have a couple of goroutines responsible for the writes to handle this separately from the pullers.

(https://forum.syncthing.net/t/insane-load-average/14829)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions