IIS Aid + eAccelerator?

I just came across your site and am very excited about installing the IIS Aid package. Thanks for offering this.

I've noticed that your using APC in the package however in the forums and articles you talk about how you're having better luck with eAccelerator. Will you be providing an update to IIS Aid with this change? If not, could you provide info on how to reconfigure for best eAccelerator performance?

Also, is it worth trying out Microsoft's FastCGI preview2 at this point? How would one install it after installing IIS Aid?

-AJ

Average rating
(1 vote)
Brashquido's picture

Location: Melbourne, Australia

Joined: Sep 2003

Send PM

Brashquido said:

Hi AJ,

Welcome to my forums :). Short answer is yes. I hope to have update the IIS Aid PHP Installer in the next week or two, and among the changes will be an update to PHP 4.4.6 and a change from APC to eAccelerator. I can certainly help you configure eAccelerator if you like, but just keep in mind that doing this is like buying cloths for people. Everyone is a different size and have different needs. By nature all opcode caches are memory bound, so if you are hosting on a server with limited available memory and a lot of PHP scripts then you will to take that into account. It becomes a bit of a juggling act, but more often than not can be done very effectively.

As for the MS FastCGI preview 2, I think it is still a bit too early to be putting it in production use. It looks amazingly promising (have a read of my interview articles) but I wouldn't be going there yet for production use. The FastCGI module written by Shane Caraveo is very solid under PHP4 and has been around for 5 years now to have a lot of bugs and kinks worked out. That said, it does have limitations the biggest one of which its settings are applied per application pool. This is really only an issue for web host providers (which is why they are all so excited bout the MS FastCGI development), but for standard environments on a VPS or dedicated server it is generally a really good option.

northman's picture

Joined: Mar 2007

Send PM

northman said:

Thanks for the prmpt response Dominic. I'm in charge of serveral Windows 2003 Standard Servers, all of which have 4 GB RAM and run IIS6. Our PHP applications connect with Oracle databases, and one uses a GIS component called MapServer to serve Google-style maps. If you could offer some suggestions on best eAccelerator settings, it would be greatly appreciated.

Thanks also for your comments on MS FastCGI preview2. We'll definitely hold off on trying that for now.

-AJ

Brashquido's picture

Location: Melbourne, Australia

Joined: Sep 2003

Send PM

Brashquido said:

Hi AJ,

A few questions for you;

What is your available memory at peak times?

How many Application pools do your servers run?

What is the total size of all your cachable scripts (everything that ends in .php, .inc, etc)?

If you can, also find out the total size of all your most frequently used cachable scripts.

How many concurrent requests will your servers deal with at peak times?

northman's picture

Joined: Mar 2007

Send PM

northman said:

Dominic, we just run 1 application pool. We probbly oonly see a max of 5 concurrent requests. How would I find out the answers to your other questions?

Also, Shane's FastCGI appears to have some configuration options that can be set in fastcgi.reg. Do you recommend any specific settings?

-AJ

Brashquido's picture

Location: Melbourne, Australia

Joined: Sep 2003

Send PM

Brashquido said:

Hi AJ,

If all your PHP scripts reside in structured directories, you could use something like TreeSize from JamSoftware. By the sounds of it I don't think it will be an issue. You can find out how much available memory you have using performance monitor or by using task manager. If your servers have 4GB and run IIS 6 and not much else then we should be fine.

FastCGI does have some registry settings, but the current version of the IIS Aid PHP Installer allows you to configure these as a part of the install process. As you have a lot of memory and only one application pool I would set StartServers at around 10, IncrementServers to somewhere between 2 and 5, and MaxServers to around 25. I'd suggest leaving the Timeout value to the default of 600 unless you have specific need to change it.

Once you have PHP installed you can check your configuration by placing the following code in a file called info.php (anything you want really, so long as it ends in .php) and placing it inside the root of your website;

<br />
<?<br />
phpinfo();<br />
?><br />

Now when you goto yourdomain.com/info.php you should be presented with a page detailing your PHP environment settings. The other way of course is to browse to the "IIS-Aid.com PHP Installer" under "All Programs" in the start menu and select the "PHP Info" item.

Now I have a few more questions for you :).

1) Will you be installing the IIS Aid PHP Installer on a development server first? Reason being that the current version is the first beta, and I have identified a few bugs in it. Nothing critical, but just a few things I'd need to work through with you. These obviously will be fixed in the next version.

2) Do you mind me asking where you found out about my site and the IIS Aid PHP installer?

northman's picture

Joined: Mar 2007

Send PM

northman said:

Thanks again Dominic. Yes, we do use structured directories for PHP content. PHP content doesn't amount to much for size - a couple hundred KB or so. Alot of our content is in the form of HTML JSP pages (using Tomcat). Do you recommend any settings for best Tomcat performance?

I'm trying your FastCGI suggestions - StartServers at 10, IncrementServers at 5, and MaxServers at 25. So far so good.

Yes, I had IISAid installed of a development server. I'm trying out eAccelerator in place of APC. Here's the settings I'm using so far.

extension=eaccelerator.dll

eaccelerator.shm_size="0"
eaccelerator.cache_dir="c:\temp"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="0"
eaccelerator.compress_level="0"

Would you recommend any changes here for better performance?

-AJ

Brashquido's picture

Location: Melbourne, Australia

Joined: Sep 2003

Send PM

Brashquido said:

At the moment you have specified EA to use 0 MB of memory, have compression turned off and haven't set where to store the cache (which will mean it'll be using memory and disk). See if these make a difference, and then use the phpinfo(); function to view your PHP environment and verify that EA is being loaded.

eaccelerator.check_mtime 1
eaccelerator.compress 1
eaccelerator.compress_level 9
eaccelerator.content shm
eaccelerator.keys shm
eaccelerator.optimizer 1
eaccelerator.sessions shm
eaccelerator.shm_max 0
eaccelerator.shm_only 1
eaccelerator.shm_prune_period 0
eaccelerator.shm_size 32
eaccelerator.shm_ttl 0

Also keep in mind that EA is compatible with Zend Optimiser which APC and Xcache are not. That won't do a great deal, but could possibly help out as well.

northman's picture

Joined: Mar 2007

Send PM

northman said:

Thanks Dominic. I tried your settings. Here's what I get with the php function.

eAccelerator support enabled
Version 0.9.2a
Caching Enabled true
Optimizer Enabled true
Memory Size 33,554,392 Bytes
Memory Available 30,683,208 Bytes
Memory Allocated 2,871,184 Bytes
Cached Scripts 6
Removed Scripts 0
Cached Keys 0

I got confused about what the eaccelerator.cache_dir settings was for. So I don't need it at all?

From what you can see, can I tweak the eaccelerator settings more?

I was going to give the MS FastCGI preview a try on another development server that's running PHP 4.3.10. Will it work for this version?

-AJ

northman's picture

Joined: Mar 2007

Send PM

northman said:

Oops, I forgot to include the remaining eAccelerator settings.

Directive Local Value Master Value
eaccelerator.cache_dir /tmp/eaccelerator /tmp/eaccelerator
eaccelerator.check_mtime 1 1
eaccelerator.compress 1 1
eaccelerator.compress_level 9 9
eaccelerator.content shm_and_disk shm_and_disk
eaccelerator.debug 0 0
eaccelerator.enable 1 1
eaccelerator.filter no value no value
eaccelerator.keys shm_and_disk shm_and_disk
eaccelerator.name_space no value no value
eaccelerator.optimizer 1 1
eaccelerator.sessions shm_and_disk shm_and_disk
eaccelerator.shm_max 0 0
eaccelerator.shm_only 0 0
eaccelerator.shm_prune_period 0 0
eaccelerator.shm_size 0 0
eaccelerator.shm_ttl 0 0

I noticed the cache_dir is set to /tmp/eaccelerator. Where is this on a Windows system?

-AJ

Brashquido's picture

Location: Melbourne, Australia

Joined: Sep 2003

Send PM

Brashquido said:

If you have your EA content, keys and sessions set to use shared memory only (i.e. shm), then you won't need to specify a temp directory. Probably won't hurt to do it anyway in case you ever use disk bound cache, but I wouldn't recommend it as HDD is a lot slower than memory.

As for using the MS FastCGI tech preview with PHP4, I'm actually not sure as I've only ever used it with PHP5 and only ever read about it being used with PHP5. I don't know of any technical issues that prevent it's use with PHP4, so who knows.