I'm having some issues with performance and wondering if there's anything I can do to speed things up.
I'm using the db cache backend (memcached doesn't seem to want to work for me and my memory is running low enough as it is). The page I'm trying to speed up has a quite a bit of db interaction (it's a forum index page), it isn't overly popular (around 500 uniques/day, avg 7 page views/user), though if I can avoid the major load it would be good. It seems that the cache is working (dynamic components aren't dynamic for the cache time and there is corresponding data in the cache table), though the speed gain isn't really anything much to write home about, response times have gone from ~5 to ~3 seconds. I haven't looked at the db cache internals though I would have suspected that it was a matter of 2 db queries to determine/return the cached page. Other pages I have with 5 db queries have a response time of around 1 second. I'm using Apache/2.0.54 (Debian GNU/Linux) mod_python/3.1.3 Python/2.3.5, django is the latest before the last set of backwards incompatible changes. Server is P4 2.8ghz with 1 gig of ram. If it's important the page size is ~24kb. I've included the output from openload below, is that an Apache cache kicking in where it drops to sub 0.1 second responses? Any ideas that could help me would be greatly appreciated. MaTps 0.34, Tps 0.34, Resp Time 2.965, Err 0%, Count 1 MaTps 0.44, Tps 1.35, Resp Time 3.251, Err 0%, Count 6 MaTps 0.53, Tps 1.37, Resp Time 3.971, Err 0%, Count 11 MaTps 0.82, Tps 3.46, Resp Time 3.819, Err 0%, Count 15 MaTps 0.78, Tps 0.41, Resp Time 3.428, Err 0%, Count 16 MaTps 0.99, Tps 2.80, Resp Time 3.807, Err 0%, Count 19 MaTps 1.04, Tps 1.53, Resp Time 1.899, Err 0%, Count 23 MaTps 2.67, Tps 17.34, Resp Time 0.436, Err 0%, Count 41 MaTps 2.80, Tps 3.98, Resp Time 0.919, Err 0%, Count 54 MaTps 2.78, Tps 2.65, Resp Time 4.230, Err 0%, Count 57 MaTps 4.04, Tps 15.30, Resp Time 0.176, Err 0%, Count 107 MaTps 13.70, Tps 100.70, Resp Time 0.085, Err 0%, Count 208 MaTps 24.92, Tps 125.87, Resp Time 0.101, Err 0%, Count 335 MaTps 34.55, Tps 121.27, Resp Time 0.032, Err 0%, Count 457 .......... here's another that I ran to copy the before/after loads, server load went from "load average: 0.18, 0.25, 0.40" to "load average: 3.49, 1.55, 0.86" MaTps 0.03, Tps 0.03, Resp Time 33.326, Err 0%, Count 1 MaTps 0.38, Tps 3.57, Resp Time 13.769, Err 0%, Count 6 MaTps 0.43, Tps 0.89, Resp Time 19.468, Err 0%, Count 8 MaTps 1.32, Tps 9.28, Resp Time 2.513, Err 0%, Count 25 MaTps 8.23, Tps 70.42, Resp Time 0.066, Err 0%, Count 105 MaTps 14.46, Tps 70.58, Resp Time 0.088, Err 0%, Count 176 MaTps 21.61, Tps 85.97, Resp Time 0.020, Err 0%, Count 263 MaTps 28.15, Tps 87.00, Resp Time 0.079, Err 0%, Count 350 MaTps 32.23, Tps 68.97, Resp Time 0.029, Err 0%, Count 420 MaTps 38.34, Tps 93.25, Resp Time 0.094, Err 0%, Count 514 MaTps 40.19, Tps 56.84, Resp Time 0.034, Err 0%, Count 595 MaTps 46.80, Tps 106.36, Resp Time 0.041, Err 0%, Count 712 MaTps 50.22, Tps 81.00, Resp Time 0.237, Err 0%, Count 793 MaTps 55.88, Tps 106.79, Resp Time 0.036, Err 0%, Count 900