Fitblip / wsstat

Websocket stress testing made beautiful
MIT License
173 stars 24 forks source link

Hitting a limit #4

Closed fwsGonzo closed 6 years ago

fwsGonzo commented 7 years ago

It seems like wsstat hits an artificial 90k messages/sec on 500 connections. If i have wsstat running 4 times (in 4 terminals) at the same time, the total is something like 280k messages/sec.

Any idea why it plateus?

Fitblip commented 7 years ago

Hrm, that's definitely odd.

Can you give me more information about your setup? This could be because of the fact that WSStat doesn't (yet) do multiple processes, and the asyncio loop is choking.

ficofer commented 6 years ago

@Fitblip is there a plan to make wsstat multithread?

Fitblip commented 6 years ago

@ficofer - No sir, wsstat relies on python3's asyncio and concurrency primitives, which, due to the GIL is essentially the same thing as using python's threading module.

The difference is that the threading module is preemptive concurrency (i.e. no control over when context switches happen) and asyncio is cooperative concurrency (i.e. once you're done computing and waiting on a blocking event (network, file access, sleep, etc), you bow back to the main IO loop).

Does that help clarify?

Fitblip commented 6 years ago

Hey folks, I'm going to close this as I don't have enough details to really do anything about it.