Fitblip/wsstat

Hitting a limit

Closed this issue · 4 comments

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?

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.

@Fitblip is there a plan to make wsstat multithread?

@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?

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