Skip to content

Hub broadcast loop runs at a fixed 0.5s, ignoring node update rate #68

Description

@jjsmackay

In hub mode, hub_loop re-broadcasts to dashboard clients on a hardcoded 0.5s (core/hub_handlers.py):

# Match node update rate for real-time responsiveness
await asyncio.sleep(0.5)

The hub is push-based. It already receives each node's data over a WebSocket in Hub._connect_node as the node emits it, so the 0.5s timer is independent of the node rate. When nodes update slower than 0.5s (a higher UPDATE_INTERVAL, or the 2s nvidia-smi path), the hub re-sends the same cached data several times per real update. Across multiple nodes that wastes CPU and traffic, and it doesn't match the node rate the comment intends.

Raised two PRs:

#69 supersedes #70 on the same line, so could skip. Though the interval knob could be used as an optional cap on broadcast rate, for when nodes push faster than you want to fan out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions