distributed 2021.10.0

.. attribute:: address: str
    This worker's unique key.  This can be its connected address
    (such as ``'tcp://127.0.0.1:8891'``) or an alias (such as ``'alice'``).
.. attribute:: processing: {TaskState: cost}
    A dictionary of tasks that have been submitted to this worker.
    Each task state is associated with the expected cost in seconds
    of running that task, summing both the task's expected computation
    time and the expected communication time of its result.

    If a task is already executing on the worker and the excecution time is
    twice the learned average TaskGroup duration, this will be set to twice
    the current executing time. If the task is unknown, the default task
    duration is used instead of the TaskGroup average.

    Multiple tasks may be submitted to a worker in advance and the worker
    will run them eventually, depending on its execution resources
    (but see :doc:`work-stealing`).

    All the tasks here are in the "processing" state.

    This attribute is kept in sync with :attr:`TaskState.processing_on`.
.. attribute:: executing: {TaskState: duration}
    A dictionary of tasks that are currently being run on this worker.
    Each task state is asssociated with the duration in seconds which
    the task has been running.
.. attribute:: has_what: {TaskState}
    An insertion-sorted set-like of tasks which currently reside on this worker.
    All the tasks here are in the "memory" state.

    This is the reverse mapping of :class:`TaskState.who_has`.
.. attribute:: nbytes: int
    The total memory size, in bytes, used by the tasks this worker
    holds in memory (i.e. the tasks in this worker's :attr:`has_what`).
.. attribute:: nthreads: int
    The number of CPU threads made available on this worker.
.. attribute:: resources: {str: Number}
    The available resources on this worker like ``{'gpu': 2}``.
    These are abstract quantities that constrain certain tasks from
    running at the same time on this worker.
.. attribute:: used_resources: {str: Number}
    The sum of each resource used by all tasks allocated to this worker.
    The numbers in this dictionary can only be less or equal than
    those in this worker's :attr:`resources`.
.. attribute:: occupancy: double
    The total expected runtime, in seconds, of all tasks currently
    processing on this worker.  This is the sum of all the costs in
    this worker's :attr:`processing` dictionary.
.. attribute:: status: Status
    Read-only worker status, synced one way from the remote Worker object
.. attribute:: nanny: str
    Address of the associated Nanny, if present
.. attribute:: last_seen: Py_ssize_t
    The last time we received a heartbeat from this worker, in local
    scheduler time.
.. attribute:: actors: {TaskState}
    A set of all TaskStates on this worker that are actors.  This only
    includes those actors whose state actually lives on this worker, not
    actors to which this worker has a reference.

A simple object holding information about a worker.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /distributed/scheduler.py#388
type: <class 'type'>
Commit: