Thanks for your suggestions. I know uwsgi is great. I tried a lot of other
servers, and uwsgi is the best.

Good news is that I don't need to switch from django.

I used memcached and redis as the cache backend, and database mysql.

A lot of profiling and caching work could be do to save cpu time, but
before that, I want to ensure there are no config problems in my conf.  I
mean 25 workers on 5 sockets each listening 4000 requests, and gracefully
suiciding after processing 3000 requests.

If this configurations have no claws, I would start to debug my app now.



On Wed, Oct 17, 2012 at 12:15 AM, Guido Notari <[email protected]> wrote:

> 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
>



-- 
*吴焱红(Samuel)*

博客: blog.shanbay.com
微博: 扇贝网 <http://www.weibo.com/shanbay>
人人网: 一起背单词公共主页 <http://page.renren.com/699128841?ref=lnkprofile>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to