Yes I am running openload on localhost, I don't trust my DSL enough to
get accurate results :(

my MIDDLEWARE_CLASSES:

    "django.middleware.common.CommonMiddleware",
    "django.middleware.doc.XViewMiddleware",
    "django.middleware.sessions.SessionMiddleware",

I'm caching on a view by view basis (hope that's the correct
terminology) using this code.

index = cache_page(index, 180)

After looking at those middleware classes I removed the session
middleware and it has dropped response times to a very respectable:

Total TPS: 144.27
Avg. Response time:  0.034 sec.
Max Response time:   0.675 sec
Total Requests:    1951
Total Errors:         0

So I believe my problem was the session middleware. At present I don't
require the session middleware (I will move the admin). However in the
near future the forum will change to requiring user authentication,
any thoughts about the best way for me to enable caching with the
sessions enabled? If need be what would help my problems is if the
session caching time can't be improved then if sessions are enabled
only for certain views? As an example, in one of my sites I have no
session requirements, except when generating a captcha and then
verifying the captcha when the comment is submitted.

Thanks for your help!



On 11/23/05, Eugene Lazutkin <[EMAIL PROTECTED]> wrote:
>
> For comparison I ran openload against my blog page
> (http://lazutkin.com/blog/). It is 38012 bytes at the moment. I don't know
> how many db transactions required to build it, but with cache it's a moot
> point anyway. Incidentally I use "file:" cache. The site is hosted with
> DreamHost --- cheap community hosting company.
>
> Over Internet using my home connection I got:
>
> Total TPS:  12.54
> Avg. Response time:  0.781 sec.
> Max Response time:   1.641 sec
> Total Requests:     503
> Total Errors:         0
>
> With average ping ~40ms, it correspondes to ~400kbps, which looks about
> right order of magnitude.
>
> Judging by your times you probably used "localhost" for load testing, or you
> had some intermediate caching, or you have really fat connection to get 24k
> in 20ms. ;-)
>
> I don't know what the exact problem is, but I would suggest to check basic
> stuff first: check footprint (maybe swapping is an issue); check database
> speed (e.g., using Django's database API with some rudimentary timing
> program); if you run db and apache/django on the same server, try to
> separate them (sometimes there is an interference between programs); to get
> realistic test results, try to run openload from separate computer (or
> several copies of openload from separate computers for even more realism).
> If everything works as expected, you probably found a bug in cache subsystem
> and we need to find a way to reproduce it.
>
> BTW, could you cut'n'paste your MIDDLEWARE_CLASSES? The order is important.
>
> Thanks,
>
> Eugene

Reply via email to