[Flask] uWSGI and Flask - Slow and varying response times
Ziirish
ziirish at ziirish.info
Thu Jul 7 11:19:25 EDT 2016
What is your uWSGI configuration/starting parameters?
Are they the same on both your development machine and your server?
Could you send a summary of your benchmark so far like:
| local | server |
test1 | 100ms | 700ms |
test2 | 50ms | 500ms |
...
Because there are now a lot of informations in a lot of emails.
Thanks
* On Thursday, July 07, 2016 at 11:33 PM +0900, Tim van der Linden <tim at shisaa.jp> wrote:
> On Thu, 07 Jul 2016 17:35:12 +0800
> Unai Rodriguez <unai at sysbible.org> wrote:
>
> Hi Unai (and everyone else!)
>
> > Fantastic collaborative effort!!! :)
>
> Indeed. Thanks to all for giving a fresh set of eyes into this issue.
> A big factor, as Ziirish pointed out, seems to be the difference in clock speed indeed.
>
> As Unai pointed out it still does not explain the difference in response.
> Maybe there is a lot of context switching going on ... ?
>
> Another thing I noticed as well is the fact that on the server the profiler tells me a request is finished in ~700 ms (for example) but the browser has to wait a total of ~ 1100 ms before receiving back the data.
>
> There seems to be something happening between Python being finished within those ~700 ms and uWSGI/Nginx generating a response back to the client (~ 400ms lost somewhere).
>
> Maybe this is the cause for the difference in response rates. Python performance (yet slower slower than local) is stable, the response overhead varies.
>
> I wonder what might be happening in uWSGI/Nginx after Python is finished with its work...
>
> > -- unai
>
> Cheers,
> Tim
More information about the Flask
mailing list