PatWie / cluster-smi

nvidia-smi but for an entire GPU cluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use syncMap

PatWie opened this issue · comments

Golang 1.9 supports sync maps with baked in mutex locks. Currently, the cluster smi server only updates the node information when receiving a new message. This is ok. But these updates are broadcasted immediately to all subscribers, which causes a lot of messages flooding around (having more nodes) as this loop does not pause or depends on ticks.

I wonder if the receiving part can be a go routine and the broadcasting part another go routines depending on ticks to limit the number of messages sent to clients.