Skip to content

A Dask comm benchmark #3145

@mrocklin

Description

@mrocklin

@jcrist was asking in side channels about distributed's comm latencies. I thought I'd put up a small benchmark here for future conversation.

from dask.utils import format_time
from distributed.core import Server, rpc
import asyncio, time

def pingpong(comm, msg):
    return msg

async def f():
    s = Server({"ping": pingpong})
    s.listen(12345)
    with rpc(s.address) as c:
        start = time.time()
        for i in range(1000):
            await c.ping(msg=b"123")
        end = time.time()
        print(format_time((end-start) / 1000))
    await s.close()

asyncio.get_event_loop().run_until_complete(f())
600.93 us

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions