Skip to content

Commit

Permalink
initialize device manager stats interval
Browse files Browse the repository at this point in the history
Fixes a bug where we cpu is pigged at 100% due to collecting devices
statistics.  The passed stats interval was ignored, and the default zero
value causes a very tight loop of stats collection.

FWIW, in my testing, it took 2.5-3ms to collect nvidia GPU stats, on a
`g2.2xlarge` ec2 instance.

The stats interval defaults to 1 second and is user configurable.  I
believe this is too frequent as a default, and I may advocate for
reducing it to a value closer to 5s or 10s, but keeping it as is for
now.

Fixes #6057 .
  • Loading branch information
Mahmood Ali authored and preetapan committed Sep 18, 2019
1 parent 8fa77bd commit be2d882
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/devicemanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ func New(c *Config) *manager {
loader: c.Loader,
pluginConfig: c.PluginConfig,
updater: c.Updater,
statsInterval: c.StatsInterval,
instances: make(map[loader.PluginID]*instanceManager),
reattachConfigs: make(map[loader.PluginID]*pstructs.ReattachConfig),
fingerprintResCh: make(chan struct{}, 1),
Expand Down

0 comments on commit be2d882

Please sign in to comment.