Performance Optimization - FastCGI, Caching and Performance
Posted: 24 June 2008 05:34 PM   [ Ignore ]  
Grad Student
Rank
Total Posts:  36
Joined  05-15-2008

After reading about Data Caching and Performance, I saw an option to enable FastCGI with PHP 5 at my hosting control panel.

I have EE 1.6.3 implemented at a Linux Apache/2.2.8 server, PHP 5 with normal CGI.

As I understand, FastCGI instead of creating a new process for every request, can use a single persistent process which handles many requests over its lifetime.
And I think I have read something about leaving the PHP scripts in memory to reduce access times.

So I don’t know why isn’t this recommended at the “Data Caching and Performance” article.

Is there anything I should be aware of when enabling this feature?

Any other suggestions to improve EE response time/performance?

Profile
 
 
Posted: 25 June 2008 01:23 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  13109
Joined  05-15-2004
mencargo - 24 June 2008 05:34 PM

So I don’t know why isn’t this recommended at the “Data Caching and Performance” article.

Because it does not concern EE as such, it’s a server thing. More RAM could possibly help, too, or getting a dedicated server, or ... In all of these cases, this has got nothing to do with EE per se.

Any other suggestions to improve EE response time/performance?

If you are concerned about server performance, it is generally a good idea not to run PHP as a CGI process at all (the fast kind, or otherwise) but as a compiled Apache module (mod_php). Not all hosts will allow you to do that, though.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 25 June 2008 01:57 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  36
Joined  05-15-2008

Well, it has nothing to do with EE, but if it has a good impact on it, it should be recommended.
Obviously hardware is another issue, but the thing is to squeeze every drop of it in EE benefit, and we can configure some parts of the environment we use.
I mean, EE recommends it’s own hosting and it claims to be “highly optimized for clients in need of ExpressionEngine”.

So, if there are such “optimizations” in server side, I would like to implement them.

My hosting service show me some options in the control panel that sound interesting, like the use of PHP 5 with CGI or FastCGI, and the use of “Apache Handlers”, that I really don’t know much about it.

I have a 2 year contract with Hostmonster, so, what would you guys recommend with it?

I just saw this comparison , and also noticed that my hosting has an option to “Install Default php.ini” to be able to manipulate the “Master php.ini file” for my public html.

Profile
 
 
Posted: 25 June 2008 02:24 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  13109
Joined  05-15-2004
mencargo - 25 June 2008 01:57 AM

Well, it has nothing to do with EE, but if it has a good impact on it, it should be recommended.

The article you mentioned deals with ExpressionEngine caching mechanisms, a rather more narrow focus; perhaps this page might be a more appropriate venue. As a rule, however, we do not offer general advice not pertaining to EE as such. We don’t teach you XHTML or CSS in our docs, and we don’t explain how to setup (or optimize, for that matter) your MySQL server. EE just assumes there is one.

I mean, EE recommends it’s own hosting and it claims to be “highly optimized for clients in need of ExpressionEngine”.

Quite so.

So, if there are such “optimizations” in server side, I would like to implement them.

Frankly, I don’t think it is possible to distill the skill and knowledge of an experienced database administrator into a short and concise section of the user-guide here. There is usually much trial and error involved, too, to tweak the system to optimal performance.

I have a 2 year contract with Hostmonster, so, what would you guys recommend with it?

I know nothing about Hostmonster, sorry.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 25 June 2008 02:36 AM   [ Ignore ]   [ # 4 ]  
Grad Student
Rank
Total Posts:  36
Joined  05-15-2008

Well, I’m not asking for the complete tutorial to install the perfect system for EE, just to be able to make the best choice from the options I have, like FastCGI vs CGI, php.ini config, apache handlers and that kind of tweaks that are generally at our “normal hosting” service.
I know that if I want the perfect EE solution, Engine Hosting would be a obvious choice, but this is my first EE project and I’m just trying to learn.

Profile
 
 
Posted: 25 June 2008 09:27 AM   [ Ignore ]   [ # 5 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1089
Joined  01-07-2008

Since EE relies heavily on the database, that is the part that needs the most optimization.  Your host should know how to setup a server for a dynamic website.
The same goes for backups.  A host for mostly static websites will do a lot of file backups.  For EE database backups are more important.

CGI is generally accepted to be slow, so the choice usually ends up being FastCGI vs. a server module such as mod_php.  You should definitely consult with your host about what setup their servers handle best.  The ideal solution on one provider may not be the best solution for another.

The bottom line - trust in your host’s experience.  They deal with these issues every day.  Tell them what kind of application you’re running and let them do the server setup for you.
The only thing you should have to worry about is creating a website.

 Signature 

Blog | Twitter | Coffee

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 61109 Total Logged-in Users: 49
Total Topics: 73946 Total Anonymous Users: 31
Total Replies: 398834 Total Guests: 558
Total Posts: 472780    
Members ( View Memberlist )