Skip to content

GridSync drives Tahoe at 100% CPU usage if Tahoe can't connect to enough storage servers #414

@exarkun

Description

@exarkun

GridSync waits for Tahoe to connect to enough storage servers so that storage operations could potentially succeed before actually trying those storage operations. To determine how many servers Tahoe is connected to it polls the welcome page.

It tries to do this at about 5 requests / second (which I suppose is intended to provide a reasonable balance between alacrity and minimal resource usage). However, if multiple storage operations are attempted then each of these operations gets its own polling loop. If there are N storage operations attempted, the actual polling rate approaches 5 * N / second. This quickly drives Tahoe to saturate a CPU generating the welcome page over and over again.

A simple, significant improvement would be to only poll at 5 requests / second no matter how many storage operations are waiting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions