APC Configuration and Optimization for Rackspace Cloud Server (PVHVM)

Advertisement

Here is a quick guide for APC Configuration and Optimization for Rackspace Cloud Server PVHVM Performance Flavor. Warranted Great Result. It is actually not possible to say from just one Page Speed Test that the website is nicely tweaked or not. On Pingdom, you can see our this website loads at 2.39 seconds :p :

First and foremost thing is that, webpagetest.org is the ONLY the standard, time tested, really regularly updated tool to test somewhat real experience, thats too after taking an average sampling more than 100 tests under various situation. There will be third party javascripts and other stuffs, usually from Google, which actually fails and increases the page loading speed. YSlow is definitely another great tool. Now look at this result of the same 2.39 seconds loading one on webpagetest :

Vim

1

http://www.webpagetest.org/result/140416_K1_YYX/1/details/

Well, actually its possible to lower the 2.39 seconds to 1.6 seconds ! The Bible is Yahoo!’s an excellent guide on page speed optimization which everyone knows. If we flush the buffer at regular div interval, on WordPress it will actually show the website to be very fast (this is one of the sophisticated way how the Managed WordPress Hosting, WordPress Theme Creators make the consumers fool). Also note that, webpagetest.org is failing to detect the CDNs. Except Post Attachment images (for SEO) and one CSS (for dev purpose), all static contents are actually served from Cloud Files. So, this much junk is written to make you understand few things and shake your head => How the Heck I Will Understand That My APC Configuration and Optimization for Rackspace Cloud Server for PVHVM Performance Server is Optimum?

Back to APC. As we are basically running PHP, which is one of the worst scripting language; together with a kind of crippled MySQL (MySQL actually is not so bad like it appears after using WordPress), we actually need to Optimize the Webserver Software (we prefer Apache2 as tweak can render it more secure and stable) and the way PHP is handled.

Advertisement

---

Alternative PHP Cache or APC is a PHP accelerator. PHP accelerator is nothing but a PHP extension developed to improve the performance of server side software applications written in the PHP. If properly configured, it bypasses the parsing to compiling steps done by PHP for the frontend. You must know that, the way of installing APC is actually 2 or 3 in number. APC is no longer available in PHP 5.5+. The new name is Opcache. We will perform a peck install of APC.

Vim

1

sudo apt-get install php-apc

The last command to install APC will be :

Vim

1

sudo pecl install apc

If it throws error (you might have hardened PHP or many other config is different), it usually solves :

Vim

1

sudo pecl install apc-beta

You will need to install these to run that last step :

Vim

1

2

3

4

5

6

7

8

9

#two commandsf

sudo aptitude install php5-dev

#and

sudo apt-get install php-pear make libpcre3-dev

#dependencies are(1)php-pear(2)php5-dev(3)make(4)libpcre3-dev

#obviously the last step

sudo pecl install apc

#restart Apache2

sudo/etc/init.d/apache2 restart

There is reason why aptitude install has been used instead of one liner :

Vim

1

sudo apt-get install php-pear php5-dev make libpcre3-dev

Search on this website if you want to know what is aptitude and what is apt-get. Open the php.ini file and add the extension :

Vim

1

2

3

4

5

sudo nano/etc/php5/apache2/php.ini

#edit,addthisandwriteout{^+O},thenexit{^+X}

extension=apc.so

#restart Apache2

sudo/etc/init.d/apache2 restart

You will get a file here, its nice :

Vim

1

http://jesin.tk/apc-php-download/

It will show you stat plus you will understand that it is working fine. Like this :

Actually, on Ubuntu 13.10 setup, the file should be here (you need not to download in that case, just move to public folder to run it on browser), location is this :

Vim

1

/usr/share/php/

Delete the file or move to non-public area, its dangerous to keep it public. Again, open php.ini and add :

Here’s what we’ve got for you which might like :

WordPress SaaS – WordPress as a Service on Cloud Computing Platform. How it is prepared and delivered ? What is advantages for the use and aspects ? We run a limited Pilot project to deliver WordPress SaaS and WordPress VIP delivers WordPress SaaS. We are taking the readers has the basic idea about SaaS, if […]