Daphne does tend to idle hot, but this is so it performs better under high load. It's not clear from your description which of the processes is using more CPU as connections come through and then disconnect - is it Daphne or is it runworker?
Andrew On Mon, May 8, 2017 at 5:46 AM, qnub <qnub...@gmail.com> wrote: > We have executed cluster of 3 docker containers (on separated machines) > with daphne and workers --threads=4 in each container. And this container > consube about 15% machine's CPU after start. Then it start consume > addtional 4-5% of CPU per new connection and seems like not free this > resources when user is disconnected (we've removing channels from groups on > WS disconnection)… > > I've decreased amount of worker threads to 1 and now container get 3-5% of > CPU after start and 1-2% per new user. Looks like now it started to free > CPU after user disconnection when get about 10% of CPU. > > Also we use asgi_redis.RedisLocalChannelLayer with 3 redis instnaces (one > per machine). > > I not sure if it's correct behaviour ot it's my fault somwhere? > > -- > 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 django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > 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/964cb488-a5d9-4f6c-890f-3c4dec4d2ec4%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/964cb488-a5d9-4f6c-890f-3c4dec4d2ec4%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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. 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/CAFwN1uqne3W9NLxXh2En0XbhHeUFzvHOt7N7O%2BnBzzF7gN01ig%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.