Skip to content

Commit

Permalink
Make system monitor interval configurable (#4447)
Browse files Browse the repository at this point in the history
Sometimes we want to reduce this to improve performance
  • Loading branch information
mrocklin committed Jan 22, 2021
1 parent 9b48688 commit 6be2013
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
8 changes: 7 additions & 1 deletion distributed/core.py
Expand Up @@ -199,7 +199,13 @@ def stop():

self.periodic_callbacks = dict()

pc = PeriodicCallback(self.monitor.update, 500)
pc = PeriodicCallback(
self.monitor.update,
parse_timedelta(
dask.config.get("distributed.admin.system-monitor.interval")
)
* 1000,
)
self.periodic_callbacks["monitor"] = pc

self._last_tick = time()
Expand Down
9 changes: 9 additions & 0 deletions distributed/distributed-schema.yaml
Expand Up @@ -771,6 +771,15 @@ properties:
type: boolean
description: Enter Python Debugger on scheduling error

system-monitor:
type: object
description: |
Options for the periodic system monitor
properties:
interval:
type: string
description: Polling time to query cpu/memory statistics default 500ms

rmm:
type: object
description: |
Expand Down
2 changes: 2 additions & 0 deletions distributed/distributed.yaml
Expand Up @@ -174,6 +174,8 @@ distributed:
log-length: 10000 # default length of logs to keep in memory
log-format: '%(name)s - %(levelname)s - %(message)s'
pdb-on-err: False # enter debug mode on scheduling error
system-monitor:
interval: 500ms
event-loop: tornado
rmm:
pool-size: null
Expand Down

0 comments on commit 6be2013

Please sign in to comment.