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. On Tue, Oct 16, 2012 at 11:35 PM, Andriy Kornatskyy < [email protected]> wrote: > > Samuel, > > Consider serve static resources out from uwsgi, nginx or CDN. If that is > not a problem, most likely it is django. Take a look at few benchmarks: > > http://mindref.blogspot.com/search/label/benchmark > > Thanks. > > Andriy Kornatskyy > > > ________________________________ > > Date: Tue, 16 Oct 2012 23:23:30 +0800 > > From: [email protected] > > To: [email protected] > > Subject: [uWSGI] uwsgi is heavily cpu expensive? > > > > I have django apps running on uwsgi, and I found uwsgin can be very > > CPU expensive, that's, it usually cost 40% of CPU, or even more 60%- > > 100%. > > > > My server, the newest dell model, has 8 core Intel processors and 32G > > memory, though I'm not sure the exact model number. The sales guys told > > me one of their most powerful models made by Foxxcon. > > > > So I doubt my uwsgi configurations. I'll paste all my configuration > > soon, but let me make some explanations. > > > > I don't how many workers I should have, so I started 25 workers on 5 > > sockets, each handling 5 workers. I also requested them to listen up to > > 4000 connections, though I don't think I need so many connections, and > > each worker will gracefully kills itself before processing 3000 > > requests. > > > > I'm not sure why I made the configuration, but I did it, seems working > > while not busy, but not working while busy. I said not working means I > > could found tens of broken pipe each second in the uwsgi log, and the > > server load could reach up to 4 or 6. > > > > So any problem with the configuration provided the information above? > > or anything else if helpful to analysis. > > > > > > > > django.ini configuration: > > > > # specicy workers, please change this according to the server capacity > > workers = 25 > > max-requests = 3000 > > > > #set socket listen queue to <n> (default 100, maximum is system > dependent) > > listen = 4000 > > socket = :8081 > > socket = :8082 > > socket = :8084 > > socket = :8083 > > socket = :8085 > > > > map-socket = 0:1,2,3,4,5 > > map-socket = 1:6,7,8,9,10 > > map-socket = 2:11,12,13,14,15 > > map-socket = 3:16,17,18,19,20 > > map-socket = 4:21,22,23,24,25 > > > > > > # load django > > module = django.core.handlers.wsgi:WSGIHandler() > > > > > > # uwsgi log > > daemonize = ./log/uwsgi.log > > logdate = true > > logslow = true > > logbig = true > > log-5xx = true > > disable-logging = true > > > > # use harakiri to kill requests cosing more than 20 seconds > > harakiri = 20 > > # you will be told why killed in detail > > harakiri-verbose = true > > > > and finally, thanks. > > > > -- > > 吴焱红(Samuel) > > > > > > > > > > _______________________________________________ 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 > -- *吴焱红(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
