And I have more info around nltk package I used for language processing. nltk is heavily used in my app, which takes long time to import at the development environment at the first time. Since the server is very busy, so can it be a headache besides db and caches issues?
thanks again On Wed, Oct 17, 2012 at 12:26 AM, Javier Guerra Giraldez <[email protected] > wrote: > On Tue, Oct 16, 2012 at 11:15 AM, Guido Notari <[email protected]> > wrote: > > 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. > > > > I agree on several of Guido's observations: > > - uWSGI has _very_ little overhead. most (all?) of the CPU usage you > see are coming from your app > > - Django is good enough for the vast majority of websites out there. > as anything out there it's easily misused. > > - CPU-bound web apps are rare. the first bottleneck you'll usually > hit is the database. django_debug_toolbar permanently enabled on > development allows you to be aware of the dreaded "N+1 queries" > issue. log_min_duration_statement for Postgres (and slow-log on > MySQL) is great to pinpoint non-optimal queries. > > - after optimizing database access, a good cache strategy saves almost > all remaining performance issues. > > > but.... there's one thing i don't see addressed: > > - DB issues would show spikes on either HD waittimes or CPU/RAM > consumption by the database process, not the uWSGI process. > > .... unless you're using SQLite? > > > -- > Javier > _______________________________________________ > 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
