Forum Moderators: coopster

Message Too Old, No Replies

php and server load

         

omoutop

2:15 pm on Jun 24, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello all and thanks for any tips/insight.

Lets assume we have a site (50% of it is static pages, 50% of it are php generated pages) of around 300k pages in total (static and php generated).

The site has the following general structure: www.example.com/folder1/folder2/folder3/.....

(we use mod_rewritte in our php files to create frieldly urls and keep the same site structure)

Our question (regarding server load) is this:
is it worth it to use php to create static pages?
using a manual button in our cp or a crontab job, we can easily create many hundrets of pages.
We are thinking to do this in the indexes of the first 2-3 levels, in our example: folder1/index.htm, folder2/index.htm and folder3/index.htm, since these pages get the most hits per day.

Is this method efficient to reduce our server load?

jatar_k

8:01 pm on Jun 25, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



absolutely

have you identified the load problem?

Is it just a general issue or are there specific points/scripts that are causing issues?

Is it the server crying or users?

omoutop

5:58 am on Jun 26, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



our server (dedicated) is in another country.
what i know is what the technicians there tell me
and they stated that the server load reaches 50% (of the cpu? i couldnt tell excatly what they mean by that).

We have no major complains from our user - but i cant trust their feedback 100%.

During most of the year we have no problems.. but from May till end of August we have many hundrents thousants visitors per day, mostly on our dynamic content pages, thus increasing our needs during those months.

I have optimized my queries as much as i can/know.
I have created indexes in my tables.
(i even split my tables into multiple databases).

For the next part, I thought of creating static content for those pages - and by the use of crontab to update them every couple of day or once per week.

An you say its a good soution solution. Nice knowing that.

And as an extra question.. what more can i do besides what i have mentioned already?

jatar_k

1:31 pm on Jun 26, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it sounds like you have done most of the things, another possible idea would be looking at caching and accelerating for php, though I am not sure that would do much

as long as the content of those pages isn't changing too often (the definition of too often is very subjective) then generating static content is probably your best bet.

henry0

3:29 pm on Jun 26, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



But if static content is generated out of dynamic content DB originated will that no create a nightmare problem when in need of deleting any of those pages while keeping in sync the DB/PHP links-tree?

jatar_k

3:47 pm on Jun 26, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



that is the concern, it needs to be managed, I always hope that dynamic sites have a static plan to how everything is inter connected even if the number of pages at any given level is unknown.

I also hope it isn't a "i need to have an answer for every request" scenario

you manage it like anything else, whatever you use to create the whole needs to understand how the whole is supposed to be constructed and manage additions and removals accordingly

who deletes pages anyway, that's good traffic on those old pages ;)

omoutop

6:00 am on Jun 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



our plan/thought is to create static pages mostly on indexes (which have 95% fixed content) and not on pages that content depends on user request/search (although our structure allows us to have them all static to maintain our urls in the search engines without penaly).

The 5% of the indexes that changes is based mostly on latest reviews/articles/blogs/image gallerys, or some counters we have (for example "this aspect has 5 reviews", with 5 being a variable based on feedback we get from customers/visitors

thanks guys for the insight/info.