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!

26 comments:

Taylor Bara 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...

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

Gclub45 said...

You are very good at that.
คาสิโนออนไลน์ที่น่าเชื่อถือและมีความเป็นมืออาชีพที่สุดในตอนนี้
โปรโมชั่นGclub ของทางทีมงานตอนนี้แจกฟรีโบนัส 50%
เพียงแค่คุณสมัคร สล็อตออนไลน์ กับทางทีมงานของเราเพียงเท่านั้น
ร่วมมาเป็นส่วนหนึ่งกับเว็บไซต์คาสิโนออนไลน์ของเราได้เลยค่ะ
สมัครสล็อตออนไลน์ >>> Goldenslot
สนใจร่วมสนุกกับ คาสิโนออนไลน์ คลิ๊กได้เลย
มีทั้งคาสิโนออนไลน์ หวยออนไลน์ ฟุตบอลออนไลน์ สล็อตออนไลน์ และอื่นๆอีกมากมาย

ahmed said...

We will now offer you important tips for cleaning, disinfecting and disinfecting the baths:
شركة النجوم لخدمات التنظيف
شركة تنظيف فلل بمكة
شركة تنظيف شقق بمكة
شركة تنظيف بيوت بمكة

Geek squad support said...

Great blog post.
if you have any queries related to your hardware devices like more mobiles, laptop then easily contact our pageGeek squad support we provide the best solution for our customer.

Quickbooks support said...

This is a great article, with lots of information in it, These types of articles interest users on your site. Please continue to share more interesting articles!

jacklinemelda said...

Affordability of our Custom Research Papers for Sale services is one of the main attributes that had made us become the best provider of Research Paper for Sale Online in the industry.

rajuar said...

Hiya, I am really glad I have found this info. Today bloggers publish only about gossip and net stuff and this is actually irritating. A good blog with interesting content, this is what I need. Thanks for making this website, and I will be visiting again. Do you do newsletters by email?


Vedic Astrologer
Vedic Astrologer in India
Vedic Astrologer in Chennai
Astrologer in India
Astrology Consultant in India
Astrology Consultant in Chennai
Numerology Consultant
Numerology Consultant in Chennai
Horoscope Consultant in Chennai
Gemstone Consultant in Chennai
Marriage Matching in Chennai
Vastu Consultant in Chennai

njytr said...

reverseloaded
love this site. Keep it up

Geek squad said...

Geek squad provides 24 hours of service to help you out the complete procedure of downloading and installing the Setup. Geek Squad Tech solving technical problems of your device. It has given its toll-free numbers to support you anytime, anywhere. For more information, visit geek squad chat.

joeysmilth said...

Zip file is the most widely used file creating process. Using this, we can zipped a number of files inside one single file folder. It is also a type of compressed file that can easily send and retrieve different types of data and information. To know how to create it on Windows 10, then visit open zip file windows 10.

color laser printer test page chocolate bar said...

print color or black white test pages is the best place to troubleshoot your printer that too without downloading any software. So do visit the website print test page

linksys router default password said...

Use any device of your choice to connect to Linksys Router, if you’re using a wireless network it will connect directly

jsnlee2020 said...

Good morning readers of this blog! I am a professional essay writer and am working at this fantastic section for a long time of my hard life! Please, visit our service's online page if you want be the greatest student of the year!!!

alicetaylor said...

Apache, at the web server level, and NGINX PHP performance by implementing a reverse proxy server.
click

facebook like apkxyz said...

Thanks for your helpful sharing. I have read that knowledge very much, it gives me a lot of things.

Luke Wilson said...

Thank you for that article — I see you have extensive knowledge in that sphere. It's good you decided to share it with the audience here ) You can also go to mspy.com and learn how to use advanced monitoring software with your devices.

eassy said...

This is my first experience in using this Assignmenthelponline service. My paper was completed within the deadline. I was able to communicate my concerns with the support staff and with my writer. My paper was revised twice following the guidelines I gave. I am happy with the final copy. Thanks them for making this service available.

myprepaidcenter said...

The best use of myprepaidcenter online portal is for Card Verification, Activation, Balance Check if you are an account holder in the US, Canada, UK, Australia.

upmusic said...

دانلود آهنگ جدید
دانلود آهنگ سینا پارسیان شکاف

eassy said...

The quality of the work done by Termpaperwriter service is unmatched and it has really changed my life at University for good. The professionalism, speed and work which writers put into each order are extraordinary. Nothing is impossible for this group of experts, this is really the best writing service on earth!

quickbooks sync manager error said...

The quickbooks sync manager services have been ended and since then the third-party app developers are working to create a solution to easily sync their apps with the quickbooks.