Skip to content

SlimeWeb: websocket fix#638

Closed
ATOMMAX-2001 wants to merge 3 commits intoMDA2AV:mainfrom
ATOMMAX-2001:slimeweb-python
Closed

SlimeWeb: websocket fix#638
ATOMMAX-2001 wants to merge 3 commits intoMDA2AV:mainfrom
ATOMMAX-2001:slimeweb-python

Conversation

@ATOMMAX-2001
Copy link
Copy Markdown
Contributor

  • bad request response for non-upgradable request

@ATOMMAX-2001
Copy link
Copy Markdown
Contributor Author

/benchmark -f slimeweb -t echo-ws

@github-actions
Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: slimeweb | Test: echo-ws

Test Conn RPS CPU Mem Δ RPS Δ Mem
echo-ws 512 38,294 684.0% 237MiB NEW NEW
echo-ws 4096 39,059 726.4% 931MiB NEW NEW
echo-ws 16384 38,933 754.1% 1.1GiB NEW NEW
Full log
    Latency   12.53ms   11.20ms   22.90ms   36.10ms   47.90ms

  190314 frames sent in 5.00s, 190132 frames received
  Throughput: 38.01K req/s
  Bandwidth:  265.75KB/s
  WS upgrades: 512
  WS frames:   190132
  Latency samples: 190131 / 190132 responses (100.0%)
[info] CPU 697.6% | Mem 304MiB

[run 3/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     512 (8/thread)
  Pipeline:  1
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   12.47ms   11.10ms   22.90ms   35.30ms   45.40ms

  191632 frames sent in 5.00s, 191455 frames received
  Throughput: 38.28K req/s
  Bandwidth:  267.40KB/s
  WS upgrades: 512
  WS frames:   191455
  Latency samples: 191455 / 191455 responses (100.0%)
[info] CPU 703.1% | Mem 373MiB

=== Best: 38294 req/s (CPU: 684.0%, Mem: 237MiB) ===
[info] saved results/echo-ws/512/slimeweb.json
httparena-bench-slimeweb
httparena-bench-slimeweb

==============================================
=== slimeweb / echo-ws / 4096c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  1
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   58.68ms   34.90ms   142.30ms   191.60ms   217.20ms

  192617 frames sent in 5.00s, 189695 frames received
  Throughput: 37.92K req/s
  Bandwidth:  353.96KB/s
  WS upgrades: 3381
  WS frames:   189695
  Latency samples: 189694 / 189695 responses (100.0%)
[info] CPU 699.7% | Mem 568MiB

[run 2/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  1
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   32.21ms   26.40ms   67.80ms   105.80ms   127.90ms

  194414 frames sent in 5.00s, 193089 frames received
  Throughput: 38.60K req/s
  Bandwidth:  306.84KB/s
  WS upgrades: 1660
  WS frames:   193089
  Latency samples: 193089 / 193089 responses (100.0%)
[info] CPU 717.9% | Mem 757MiB

[run 3/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  1
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   30.29ms   26.90ms   58.50ms   89.50ms   112.90ms

  196115 frames sent in 5.00s, 195299 frames received
  Throughput: 39.05K req/s
  Bandwidth:  293.36KB/s
  WS upgrades: 1288
  WS frames:   195299
  Latency samples: 195297 / 195299 responses (100.0%)
[info] CPU 726.4% | Mem 931MiB

=== Best: 39059 req/s (CPU: 726.4%, Mem: 931MiB) ===
[info] saved results/echo-ws/4096/slimeweb.json
httparena-bench-slimeweb
httparena-bench-slimeweb

==============================================
=== slimeweb / echo-ws / 16384c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     16384 (256/thread)
  Pipeline:  1
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   46.14ms   32.70ms   110.20ms   155.90ms   182.10ms

  195298 frames sent in 5.00s, 192635 frames received
  Throughput: 38.51K req/s
  Bandwidth:  349.58KB/s
  WS upgrades: 2663
  WS frames:   192635
  Latency samples: 192635 / 192635 responses (100.0%)
[info] CPU 704.5% | Mem 472MiB

[run 2/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     16384 (256/thread)
  Pipeline:  1
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   105.68ms   113.40ms   160.00ms   200.70ms   228.80ms

  199906 frames sent in 5.00s, 194669 frames received
  Throughput: 38.92K req/s
  Bandwidth:  435.78KB/s
  WS upgrades: 5237
  WS frames:   194669
  Latency samples: 194669 / 194669 responses (100.0%)
[info] CPU 754.1% | Mem 1.1GiB

[run 3/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     16384 (256/thread)
  Pipeline:  1
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   91.88ms   97.40ms   151.80ms   197.30ms   230.60ms

  198493 frames sent in 5.00s, 193772 frames received
  Throughput: 38.74K req/s
  Bandwidth:  417.85KB/s
  WS upgrades: 4721
  WS frames:   193772
  Latency samples: 193772 / 193772 responses (100.0%)
[info] CPU 713.8% | Mem 1.7GiB

=== Best: 38933 req/s (CPU: 754.1%, Mem: 1.1GiB) ===
[info] saved results/echo-ws/16384/slimeweb.json
httparena-bench-slimeweb
httparena-bench-slimeweb
[info] rebuilding site/data/*.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/frameworks.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
httparena-postgres
[info] restoring loopback MTU to 65536
[info] restoring CPU governor → powersave

@ATOMMAX-2001
Copy link
Copy Markdown
Contributor Author

😭😭😭

@ATOMMAX-2001
Copy link
Copy Markdown
Contributor Author

/benchmark -f slimeweb -t async-db

@github-actions
Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: slimeweb | Test: async-db

Test Conn RPS CPU Mem Δ RPS Δ Mem
async-db 1024 5,642 197.9% 275MiB +15.9% -11.9%
Full log
[info] available CPUs: 128
[info] framework: slimeweb (SlimeWeb, Python)
[info] subscribed tests: baseline,pipelined,limited-conn,json,json-comp,upload,echo-ws,api-4,api-16,static,async-db
[info] building image: httparena-slimeweb
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 260B done
#1 DONE 0.0s

#2 [internal] load metadata for docker.io/library/python:3.13-slim
#2 DONE 0.7s

#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [internal] load build context
#4 transferring context: 3.85kB done
#4 DONE 0.1s

#5 [1/7] FROM docker.io/library/python:3.13-slim@sha256:a0779d7c12fc20be6ec6b4ddc901a4fd7657b8a6bc9def9d3fde89ed5efe0a3d
#5 resolve docker.io/library/python:3.13-slim@sha256:a0779d7c12fc20be6ec6b4ddc901a4fd7657b8a6bc9def9d3fde89ed5efe0a3d
#5 resolve docker.io/library/python:3.13-slim@sha256:a0779d7c12fc20be6ec6b4ddc901a4fd7657b8a6bc9def9d3fde89ed5efe0a3d 0.1s done
#5 DONE 0.1s

#6 [2/7] WORKDIR /app
#6 CACHED

#7 [3/7] RUN pip install --no-cache-dir uv slimeweb
#7 CACHED

#8 [4/7] RUN slime new arena
#8 CACHED

#9 [6/7] RUN slime add asyncpg
#9 CACHED

#10 [5/7] WORKDIR /app/arena
#10 CACHED

#11 [7/7] COPY main.py /app/arena/main.py
#11 CACHED

#12 exporting to image
#12 exporting layers done
#12 exporting manifest sha256:618f0dbc758b36b579d707e4153fc838c7afc857eb59a90b0fbbe617b9e1a179 0.0s done
#12 exporting config sha256:1a4979f53d9bb3dd770f8e8cd8385b487d1f8dabe56ea29e11dc483bb4d2244d 0.0s done
#12 exporting attestation manifest sha256:4154e5253b16bab727c9d878443332b392a9a2122131f6c31362f4e6d048a7bd
#12 exporting attestation manifest sha256:4154e5253b16bab727c9d878443332b392a9a2122131f6c31362f4e6d048a7bd 0.1s done
#12 exporting manifest list sha256:e48ffe65b0f23f6acdd6dad695abe411d77849f625a6a07ac06eba0b0c767f56
#12 exporting manifest list sha256:e48ffe65b0f23f6acdd6dad695abe411d77849f625a6a07ac06eba0b0c767f56 0.1s done
#12 naming to docker.io/library/httparena-slimeweb:latest 0.0s done
#12 unpacking to docker.io/library/httparena-slimeweb:latest
#12 unpacking to docker.io/library/httparena-slimeweb:latest 2.9s done
#12 DONE 3.3s
[info] tuning host for benchmark runs
[info] CPU governor → performance
[info] setting kernel socket limits
[info] setting UDP buffer sizes for QUIC
[info] setting loopback MTU to 1500 (realistic Ethernet)
[info] restarting docker daemon
[info] dropping kernel caches
[info] starting postgres sidecar
[info] postgres ready (seeded)

==============================================
=== slimeweb / async-db / 1024c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   160.87ms   51.00ms   476.30ms    1.24s    1.99s

  56972 requests in 10.00s, 56427 responses
  Throughput: 5.64K req/s
  Bandwidth:  21.69MB/s
  Status codes: 2xx=56427, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 56427 / 56427 responses (100.0%)
  Reconnects: 1769
  Per-template: 11191,11243,11323,11386,11284
  Per-template-ok: 11191,11243,11323,11386,11284
[info] CPU 197.9% | Mem 275MiB

[run 2/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   190.64ms   184.20ms   354.80ms    1.17s    2.32s

  51265 requests in 10.00s, 50839 responses
  Throughput: 5.08K req/s
  Bandwidth:  19.54MB/s
  Status codes: 2xx=50839, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 50839 / 50839 responses (100.0%)
  Reconnects: 1561
  Per-template: 9912,10187,10404,10230,10106
  Per-template-ok: 9912,10187,10404,10230,10106
[info] CPU 199.2% | Mem 313MiB

[run 3/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   194.32ms   188.30ms   358.30ms   793.70ms    1.57s

  50275 requests in 10.00s, 49875 responses
  Throughput: 4.99K req/s
  Bandwidth:  19.07MB/s
  Status codes: 2xx=49875, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 49875 / 49875 responses (100.0%)
  Reconnects: 1516
  Per-template: 9827,10121,10073,10044,9810
  Per-template-ok: 9827,10121,10073,10044,9810
[info] CPU 202.4% | Mem 443MiB

=== Best: 5642 req/s (CPU: 197.9%, Mem: 275MiB) ===
[info] input BW: 385.68KB/s (avg template: 70 bytes)
[info] saved results/async-db/1024/slimeweb.json
httparena-bench-slimeweb
httparena-bench-slimeweb
[info] rebuilding site/data/*.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/frameworks.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/async-db-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
httparena-postgres
[info] restoring loopback MTU to 65536
[info] restoring CPU governor → powersave

@ATOMMAX-2001
Copy link
Copy Markdown
Contributor Author

All of my branch is messed up im closing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant