[Flask] uWSGI and Flask - Slow and varying response times

Tim van der Linden tim at shisaa.jp
Wed Jul 6 06:44:54 EDT 2016


On Wed, 06 Jul 2016 18:28:15 +0800
Unai Rodriguez <unai at sysbible.org> wrote:

> Hi Tim,

Hi Unai

> Great , it's now time of testing the different parts of the server. You
> could start testing the database, uwsgi/Python and maybe the network ?

Sounds like a plan.

> You could build two queries, a simple and one more complicated and run
> it multiple times on your dev and prod boxes and compare. Different
> times? Consistent ?     
> 
> For uwsgi/Python you could do the same, build a simple page and a more
> complicated one and compare (no database queries to isolate).

Yep, I think this is the next step I need to take, create isolated test cases.
Especially for the Python code as it seems that the database is not the problem.

Let me get to that tomorrow ... getting late over in this neck of the woods :)

> Lastly for the network, was this isolated already from your tests? I
> think so but if it wasnt you'll need to look at some tools
> (munin?cacti?)

Yep, all network overhead was mitigated as the response time came from the CProfiler running directly on the server.

> The server/os will have to be looked at some point as well. 
> 
> Also, are all other app currently running  on your production behaving
> better in terms of performance and consistency ?   

As far as web applications go this is the only application on the server.
This whole machine is only for this application ... which makes working on this application fun for me as a developer :)

In terms of applications like PostgreSQL, these behave very stable.
Querying directly in the CLI via SSH is lighting fast, even under load.
The web server and uWSGI also seem to be stable.
             
> -- unai

Cheers,
Tim


More information about the Flask mailing list