Database heavy applications unlikely load your web server CPU 100%, since they cause significant IO delays between processes, unless you are caching. ORM, routing, template rendering can + your application logic.
I would advise profile code. Thanks. Andriy ---------------------------------------- > From: [email protected] > Date: Tue, 16 Oct 2012 18:15:13 +0200 > To: [email protected] > Subject: Re: [uWSGI] uwsgi is heavily cpu expensive? > > Il giorno 16/ott/2012, alle ore 17.48, Samuel ha scritto: > > > static requests have been filtered. All uwsgi/django process dynamic > > requests only. > > > > So did you mean the heavy cpu is not related with uwsgi configuration but > > the framework itself? > > > > This can be really bad news to me. There are no way for us small team to > > change a framework currently. > > The heavy cpu use is most likely related not to the framework itself, but to > the use you make of it. > Don't throw away your time and money trying to switch, Django is good enough. > You should really indulge in some form of profiling: if you haven't yet, do > install django_debug_toolbar and explore what and how many database queries > are you making for each view. > You're speaking of "high cpu use" but, unless your web application is cpu > bound -- very very strange --, most of the work is probably done at the DB > level. Can you verify that? > > What database are you using? If using Postgres, try to log long queries > (log_min_duration_statement option) and try to optimize that. > Caching, as Roberto said, is another obvious target. > > regards > Guido > > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
