Get Ubuntu Get Ubuntu

Download Ubuntu now for free, request a free CD or buy it on DVD or CD

Get Support Get Support

Free documentation and community support, or buy professional support

Get Involved Get Involved

Share technical know-how with other users, or help to promote Ubuntu

Get Developing Get Developing

Share your development expertise and help shape the future of Ubuntu

User login

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
2 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Navigation

Who's new

  • pertapacilik
  • saifulfaizan
  • mayonks
  • naiimullah
  • iwe

Who's online

There are currently 0 users and 1 guest online.

Subscribe to Ubuntu Malaysia by e-mail

Delivered by FeedBurner

Search

Tornado

bizkut's picture

One of the perennial problems I've had with using Django as the basis of my site is speed. At first, I used Apache and mod_python to serve the Django views, but once I realised how slow that was I switched over to using mod_wsgi for Django, whilst having the static files served by lighttpd. Apache is just basically the broker that sends the requests in the necessary directions.

But things are still slow, especially since I updated the site to its latest incarnation. I'm used to dealing with performance issues in web apps, so I'm sure I'll nail this one sooner or later, but it's still annoying.

So, dear lazyweb, cast your weather eye over this setup and make any suggestions for improvements as appropriate:

 

  • Bytemark VM with 256MB RAM
  • Apache, passing off to:
    • Lighttpd for static files
    • WSGI (in daemon mode) for Django views
  • Memcached + Django caching middleware

ab gives me the following statistics over 1000 requests (non-concurrent):

Server Software:        Apache/2.2.8
Server Hostname:        grahambinns.com
Server Port:            80

Document Path:          /blog/
Document Length:        39362 bytes

Concurrency Level:      1
Time taken for tests:   474.210 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      39898000 bytes
HTML transferred:       39362000 bytes
Requests per second:    2.11 [#/sec] (mean)
Time per request:       474.210 [ms] (mean)
Time per request:       474.210 [ms] (mean, across all concurrent requests)
Transfer rate:          82.16 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       56   59   3.3     58      87
Processing:   278  415 100.7    376     875
Waiting:       74  127  30.3    116     377
Total:        337  474 100.9    437     941

Percentage of the requests served within a certain time (ms)
  50%    437
  66%    544
  75%    558
  80%    574
  90%    601
  95%    621
  98%    646
  99%    689
 100%    941 (longest request)

Suggestions in a comment or by email to blog@grahambinns.com. Thanks in advance, folks...

Categories: dear lazyweb django performance planet ubuntu uk



Original Source: http://grahambinns.com/blog/2010/03/10/zippity-zippity/