Serendipity and Performance Questions
Posted: Sun Oct 21, 2007 9:52 pm
Hello everyone, ready for my brain dump and questions?
I've been using Serendipity for about the last year or so on about 15 different sites. I have one site (www.ufcresultslive.com) which gets extremely high traffic once a month during that month's UFC event. When my blog was on shared hosting response was always not too bad, but recently I've moved to a dedicated hosting box (3.0 Ghz P4 with 2GB ram). The box is running CentOS4, Apache 2.052, PPH 4.39 and MySQL 4.1.
I expected that I would have much better performance at crunch time being that I'm the only user on the box, but that just hasn't been the case. Last night my server was swamped (linux showing 270 processes and 100% cpu) (meaning about 180 of those were httpd). The problem is of course that the content is being served dynamically and killing me on memory, cpu and db access. I turned on query caching in mysql and that seems to have helped a bit, but I am wondering?
Does anyone have any general or specific hints on optimizing your linux environment for Serendipity?
I've also tried turning on mod_cache in apache, unfortunately the crunch is over so I can't tell if there is a difference, it doesn't seem like each process is using less memory or cpu time to me though. Reading several sources seems to indicate that mod_cache wasn't really stable/production ready until apache 2.2, so I'm not sure if I'm wasting my time using it in 2.052.
I'm not really much of a linux admin (I can make my way around alright, but doing things like upgrading apache on a live site makes me a bit nervous). I do have a test box here at home running in a virtual machine that I will play around with upgrading to apache 2.2, but in the mean time I'd love to hear some things that have helped other people out.
I also assume that this is not a specific Serendipity problem, I'm sure any php/mysql content engine would have the same issues, unless they had some sort of time based page caching built in.
Notes:
1) I'm not running the stats plug in
2) I've gotten rid of the extended properties plug in (after last night)
3) I'm not getting spammed...this was real traffic last night (lucky me).
So, last night I did about 20,000 visitors, but if my site wasn't so unresponsive I'm sure I would have had 50,000 or more. I was thinking about maybe doing a static version of my site and swapping that in the day of the UFC events, but that seems like overkill. There should be some way to do page caching such that the server is only checking for dynamic content at specific pre-defined intervals (say 10 minutes). Meaning one mysql or php access during that 10 minutes and the rest of the time it's static pages based on the url requested. The logical place for that to occur is in apache or some web server front end proxy. I think I've configured that, but can't tell if it's helping or not (not confident due to the 2.0x version of apache I'm running).
I tried the experimental cache plug in for serendipity, but I can't tell if it's helping or not and unfortunately I won't see real traffic like that for another month.
Help? Advice? Similar experiences?
I've been using Serendipity for about the last year or so on about 15 different sites. I have one site (www.ufcresultslive.com) which gets extremely high traffic once a month during that month's UFC event. When my blog was on shared hosting response was always not too bad, but recently I've moved to a dedicated hosting box (3.0 Ghz P4 with 2GB ram). The box is running CentOS4, Apache 2.052, PPH 4.39 and MySQL 4.1.
I expected that I would have much better performance at crunch time being that I'm the only user on the box, but that just hasn't been the case. Last night my server was swamped (linux showing 270 processes and 100% cpu) (meaning about 180 of those were httpd). The problem is of course that the content is being served dynamically and killing me on memory, cpu and db access. I turned on query caching in mysql and that seems to have helped a bit, but I am wondering?
Does anyone have any general or specific hints on optimizing your linux environment for Serendipity?
I've also tried turning on mod_cache in apache, unfortunately the crunch is over so I can't tell if there is a difference, it doesn't seem like each process is using less memory or cpu time to me though. Reading several sources seems to indicate that mod_cache wasn't really stable/production ready until apache 2.2, so I'm not sure if I'm wasting my time using it in 2.052.
I'm not really much of a linux admin (I can make my way around alright, but doing things like upgrading apache on a live site makes me a bit nervous). I do have a test box here at home running in a virtual machine that I will play around with upgrading to apache 2.2, but in the mean time I'd love to hear some things that have helped other people out.
I also assume that this is not a specific Serendipity problem, I'm sure any php/mysql content engine would have the same issues, unless they had some sort of time based page caching built in.
Notes:
1) I'm not running the stats plug in
2) I've gotten rid of the extended properties plug in (after last night)
3) I'm not getting spammed...this was real traffic last night (lucky me).
So, last night I did about 20,000 visitors, but if my site wasn't so unresponsive I'm sure I would have had 50,000 or more. I was thinking about maybe doing a static version of my site and swapping that in the day of the UFC events, but that seems like overkill. There should be some way to do page caching such that the server is only checking for dynamic content at specific pre-defined intervals (say 10 minutes). Meaning one mysql or php access during that 10 minutes and the rest of the time it's static pages based on the url requested. The logical place for that to occur is in apache or some web server front end proxy. I think I've configured that, but can't tell if it's helping or not (not confident due to the 2.0x version of apache I'm running).
I tried the experimental cache plug in for serendipity, but I can't tell if it's helping or not and unfortunately I won't see real traffic like that for another month.
Help? Advice? Similar experiences?