Sunday, March 20, 2011

Scaling myVidster Part 3: Apache + PHP-FPM

Recently I decided to upgrade my servers so that myVidster can keep up with its growing traffic. I also decided to implement PHP-FPM to fix an issue with my APC setup discussed in Scaling myVidster Part 2.

Before the upgrade my setup was Apache +  MOD_FASTCGI + APC.  I did not have any issues with server performance but the APC host would restart every 2 hours.  This concern me because the cache would have to warm back up (rebuild) and during high traffic this could cause a bottle neck.  With that in mind I decided to add PHP-FPM to my setup.

I follow the setup instructions posted here and got PHP-FPM setup with only a few headaches.  My biggest learning was recompiling MOD_FASTCGI.  His steps are for a DSO install and I decided to go with a static library instead because I have done it before and was succesful.  After I recompiled PHP with PHP-FPM, I tried to use my old static library copy of MOD_FASTCGI which caused my server to fail.  To solve this I had to recompile the static library.

Also the default settings in the php-fpm.conf could not handle the traffic.  For those who use PHP-FPM here are my settings.

pm.max_children = 225
pm.start_servers = 60
pm.min_spare_servers = 40
pm.max_spare_servers = 80
pm.max_requests = 500

I am still getting the '[pool www] seems busy' warnings once in a while, so I might increase these values.

My new setup is Apache +  MOD_FASTCGI + PHP-FPM + APC and have been running this setup for the past 2 days.  My first impression is that I love this setup!  PHP-FPM gives you more control on how your server executes php scripts and the APC host no longer restarts every 2 hours.  As for performance I did not execute any benchmarks but I did notice faster and more responsive page loading.  I will also like to note that the Apache + PHP-FPM setup is not too common and most people use Nginx instead.  Right now no one has published any benchmark data comparing the two setups.  So for now go for what works for you and your visitors!

6 comments:

Bruno Araujo said...

What can you say about this software https://cellspyapps.org/how-to-hack-an-iphone/? Did you try some of them?

ninja said...

https://kodi.software/
https://plex.software/
https://luckypatcher.pro/ Thanks for sharing.I found a lot of interesting information here. A really good post, very thankful and hopeful that you will write many more posts like this one.

Aswin said...

Hello there. I found your web site by the use of Google at the same time as searching for a comparable subject, your site came up. It seems great. I have bookmarked it in my google bookmarks to come back then.

Acupressure Care ProductsPersonal Care ProductsPersonal Care Products Shops in ChennaiAcupressure Care ProductsPersonal Care ProductsPersonal Care Products Shops in ChennaiAcupressure Care Products in ChennaiAcupressure Care Products in IndiaBuy Acupressure Care Products OnlineAcupressure Care Products PricesAcupuncture Needle Shops in Chennai
Acupuncture Needle Prices in ChennaiBuy Acupuncture Needle Online in IndiaAcupuncture NeedlesAcupuncture Needle Products in Chennai
Acupuncture Ring in ChennaiBuy Acupuncture Ring Acupuncture Ring IndiaAcupuncture Ring ShopsAcupressure Foot Roller ShopsAcupressure Mat Shops in ChennaiAcupressure Mat Shops in IndiaSpine Massager in ChennaiBuy Spine Massager Online in India

creditcard login said...

creditcard login

credit card login: A mainstream physical retail goal, and also a go-to goal for on the web and application customers — works 1,100 retail chains in 49 states.

TAMILSTATUS said...

Hi there, I found your blog by way of Google whilst searching for a related subject, your web site came up, it appears good. I have bookmarked it in my google bookmarks. Hi there, just changed into alert to your blog thru Google, and found that it is really informative. I am going to be careful for brussels. I will be grateful should you continue this in future. Lots of people will likely be benefited from your writing. Cheers!


Vastu in Dubai and UAE
Vastu Consultant in Dubai and UAE
Vastu Shastra Consultant in Dubai and UAE
Best Vastu Consultant in Dubai and UAE
Vastu Shastra Training in Dubai and UAE
Indian Vastu Training tamil status videos for whatsapp
Whatsapp Tamil DP Status Quotes and Images
Vastu Consulation in Dubai and UAE
Vastu Remedies in Dubai and UAE
Vastu Tips For Homes
Vastu Tips For Office and Buildings
Vastu Training Programs and Workshops in Dubai and UAE

برق یار said...

به خاطر داشته باشید که آسانسور قیمت آسانسور ، بازسازی آسانسور و شرکت آسانسور نیز مسائل قابل ملاحظه‌ای است.نگهداری قطعات آسانسور ، شغل نصب آسانسور است. سیستم تهویه مطبوع به خاطر داشته باشید که تهویه مطبوع سامسونگ و شرکت تهویه مطبوع نیز بهترین سیستم تهویه مطبوع و تهویه مطبوع ساختمان می باشد. برق یار برای خدمات برق برای عیب یابی ، تعمیر ، نگهداری یا نصب ، سرویس تاسیسات و کامپیوتر است.