Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Low RPS with lots of response data + chunking #572

@rynowak

Description

@rynowak

I'm only able to get about 500-550 rps using the following middleware over the loopback interface. I can get 1200+ with a content length set.

private readonly byte[] bytes = Encoding.UTF8.GetBytes(new string('a', 1024));

...

app.Run(async (context) =>
{
    for (var i = 0; i < 300; i++)
    {
        await context.Response.Body.WriteAsync(bytes, 0, bytes.Length);
    }
});

Note that this is intentionally exceeding the write-behind buffer and going through the chunked path. This only gets the cpu to ~15%.

This is a synthetic version of a Razor benchmark I've been trying to improve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions