> I have asked about it some time ago, Roberto replied that this is how linux > kernel works
Well... that’d explain why I can’t find that in the uWSGI source. :D I thought the master process acted as an arbiter, but hey, this is even cooler. TIL :) > but my site is almost done at this time. uwsgi servers cpu load only 3-4 on 8 > core machines. A bit of a shot in the dark, I know, but you could maybe try setting the cpu-affinity option if you haven’t already. http://uwsgi-docs.readthedocs.org/en/latest/Options.html#cpu-affinity From: [email protected] [mailto:[email protected]] On Behalf Of Samuel Sent: Tuesday, November 13, 2012 5:11 PM To: uWSGI developers and users list Subject: Re: [uWSGI] why some workers are much more busy than the others Got it. I just wanna confirm it's working normally. However, my server seems very slow, though I have a lot of idle workers. I'm investigating what's happening! I thought since uwsgi workers are idle, they should be able to do a lot of work ... but my site is almost done at this time. uwsgi servers cpu load only 3-4 on 8 core machines. I don't know why they just keep themselves idle if they are supposed working On Tue, Nov 13, 2012 at 11:05 PM, Łukasz Mierzwa <[email protected]<mailto:[email protected]>> wrote: I have asked about it some time ago, Roberto replied that this is how linux kernel works, I guess that uWSGI spawns multiple processes that are subscribed to single socket and it's linux kernel that picks which process will get next request, kernel on the other hand always picks first available process. Anyway Roberto said that is out of uWSGI control, so there is nothing we can do about it. I don't consider this an issue and I never had any issues because of that. It might work differently when uWSGI runs on different OS. 2012/11/13 Aarni Koskela <[email protected]<mailto:[email protected]>> If I had to guess, I’d say the uWSGI master always chooses the first free worker process (can’t find the relevant bit in the source right now). This seems to be a fairly sane idea to me in terms of memory/cache usage. So as long as your server isn’t very contented concurrency-wise, you’d be bound to see this sort of behavior a lot, where the higher worker numbers get less requests, except when all the lower-number workers are busy. Graphing the request#/worker seems to agree with this hypothesis: http://bit.ly/X3imBw (Shortlink leads to Wolfram Alpha) HTH, Aarni From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Samuel Sent: Tuesday, November 13, 2012 4:47 PM To: uWSGI developers and users list Subject: [uWSGI] why some workers are much more busy than the others uwsgitop showed the following data: [...] while the first progress processed 7 times more request than the last one? why can this happen? uwsgi master don't send the task to every one ? _______________________________________________ uWSGI mailing list [email protected]<mailto:[email protected]> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi -- Łukasz Mierzwa _______________________________________________ uWSGI mailing list [email protected]<mailto:[email protected]> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi -- 吴焱红(Samuel) 博客: blog.shanbay.com<http://blog.shanbay.com>
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
