Python threads are not that great at sharing I/O - I'd recommend you run at most one or two per physical CPU core in your machine. 500 is just going to suffocate Python in context switching.
We have loadtests that definitely got above 10 messages a second - what ASGI backend are you using? What size messages are you sending? Have you tried running workers in separate processes? Andrew On Sun, Mar 5, 2017 at 5:26 AM, Avraham Serour <[email protected]> wrote: > I don't think you need 500 workers, the number of workers depends on how > long will message will take to be processed not the number of concurrent > connections. > > The worker job is to get a message and send to a bunch of clients, the > ASGI server, meaning the process actually holding the websocket, in your > case daphne, will actually upload the data. > > Is the client and server running on the same computer? > > Don't stress test your server manually, you should write a script to do it. > > On Sun, Mar 5, 2017 at 1:28 PM, Lada B <[email protected]> wrote: > >> HW performance with 1 user sending message every 100ms: >> https://i.imgur.com/5F4mKAI.png >> >> >> Yesterday i tried to use it in production and when there were 15 clients >> connected (each one pinging server every 2 seconds) nobody else could >> connect. >> >> I have default settings and I followed Getting started tutorial. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/django-users/d86b1eb9-3492-48bc-9460-365571585db5%40googlegroups.com >> <https://groups.google.com/d/msgid/django-users/d86b1eb9-3492-48bc-9460-365571585db5%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/CAFWa6tJV-dX26xobzahdy1H3WA054WhSfc3Nyb5 > HvRenmMbbbw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAFWa6tJV-dX26xobzahdy1H3WA054WhSfc3Nyb5HvRenmMbbbw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFwN1uqOQ_Mu%3D5GqNedpRW2bJ6udjBH5BCUb2QJx2Kh3yNA%3DKQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

