<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 19 May 2013 07:07:33 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[James Fuller: Simply scale with Nginx, Memcached, PHP-FPM and APC]]></title>
      <guid>http://www.phpdeveloper.org/news/19129</guid>
      <link>http://www.phpdeveloper.org/news/19129</link>
      <description><![CDATA[<p>
<i>James Fuller</i> has <a href="http://www.jblotus.com/2013/02/01/simply-scale-with-nginx-memcached-php-fpm-and-apc/">posted a guide to scaling</a> your web application using the nginx web server, memcached, PHP-FPM and APC caching.
<p>
<blockquote>
We sell an educational product that serves a predictable 15,000 requests per minute for 10+ hours/day, every day. Instead of Apache, we use nginx with <a href="http://www.php.net/manual/en/install.fpm.php">PHP-FPM</a> to handle this traffic. This is becoming a very popular setup for many companies with non-trivial traffic, but I have also found success with it in my small <a href="http://www.linode.com/?r=8ab874aa33b39b129030c8e53132a9d5ce87a06f">256MB Ram VPS</a>. For various reasons, nginx does a better job with memory and concurrent connection handling than Apache. In this post, I want to talk about some of the reasons you might want to go with this setup.
</blockquote>
<p>
He talks about some of the efficiency gains that memcache and nginx can give you pretty easily and some of the common uses for nginx, including using it as a reverse proxy. He talks some about Apache's typical request handling and shows the difference between that and how nginx does its "never block, finish fast" handling. He fits in the other pieces - PHP-FPM, memcached and APC - showing how each of them offers their own types of performance gains for different areas of the application.
</p>]]></description>
      <pubDate>Mon, 04 Feb 2013 10:46:01 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Zumba Engineering Blog: Some CakePHP optimizations]]></title>
      <guid>http://www.phpdeveloper.org/news/18708</guid>
      <link>http://www.phpdeveloper.org/news/18708</link>
      <description><![CDATA[<p>
For those out there using the CakePHP framework to create your applications, you might be interested in <a href="http://engineering.zumba.com/2012/11/05/cakephp-optimizations/">these quick tips</a> from <i>Juan Basso</i> on the Zumba Engineering Blog for both the architecture and actual code to optimize the performance of the app.
</p>
<blockquote>
Our site and system has a lot of throughput and it make us use more instances and try to reduce the load in every part. It makes the company happy (save money) and also make the customer happy (faster load). On this article I will go over few things in terms of architecture and some code changes/strategies that could make your application faster as well.
</blockquote>
<p>Some of the recommendations include:</p>
<ul>
<li>Installing the APC/opcode caching to help save execution time
<li>Avoiding as many network requests as possible
<li>Use local file/data caching
<li>Using the "requestAction" inside controllers with its built-in caching
</ul>]]></description>
      <pubDate>Wed, 07 Nov 2012 09:31:20 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: Using APC correctly]]></title>
      <guid>http://www.phpdeveloper.org/news/18303</guid>
      <link>http://www.phpdeveloper.org/news/18303</link>
      <description><![CDATA[<p>
In <a href="http://css.dzone.com/articles/using-apc-correctly">this new post</a> to DZone.com, <i>Giorgio Sironi</i> shares a few helpful hints on using the APC tool to help improve the performance of your web applications.
</p>
<blockquote>
APC (Alternative PHP Cache) is one of the orthogonal tools you can use to speed up the execution of PHP code. This article explains from scratch the correct use of APC's system cache (not touching the user cache, which is just a standard key/value map). APC has also other features like upload progress support, but the system cache is its main features and has such a little footprint on your code that you should throw an apc.php file to everyone picking on you for writing strings in single or double quotes.
</blockquote>
<p>
He describes what the APC cache does for you (both on a lower, opcode and a higher, performance levels) and how it relates to the shared processes a web server uses. He finishes off the post with a quick guide to getting it installed and working ("pecl install") and some of the common settings to tweak to get the most of the functionality.
</p>]]></description>
      <pubDate>Wed, 01 Aug 2012 11:09:52 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[S&eacute;bastien Thomas' Blog: Monitoring PHP APC cache usage]]></title>
      <guid>http://www.phpdeveloper.org/news/16954</guid>
      <link>http://www.phpdeveloper.org/news/16954</link>
      <description><![CDATA[<p>
<i>S&eacute;bastien Thomas</i> has a recent post to his blog shows how (with just a bit of code) you can <a href="http://www.lecentre.net/blog/archives/1311">monitor your APC cache usage</a> on your local host.
</p>
<blockquote>
I won't go deep into how OpCode caches work, you will find a lot of docs, just google for APC, Xcache, eAccelerator... What I can say is that APC (as other caches do) will save binary parts of your PHP code into memory and use it when you call for the same PHP function again. This way you save all the PHP file opening, parsing, etc. [...] One thing you won't come accross often on internet is How (the hell) do I know if APC is performing well ?
</blockquote>
<p>
His answer comes in the form of code based on the <a href="https://github.com/wwalter/apc-php-monitor">APC-PHP-Monitor script</a>. He changed it slightly to allow for use in other places, like with Nagios monitoring. A Nagois template is included to query the cache and report back a hit ratio. An example of the full cache results can be <a href="http://www.lecentre.net/blog/wp-content/uploads/2011/10/APC-INFO-qxat3p01-10.100.34.39-Mozilla-Firefox_2011-10-03_14-48-04.jpg">seen here</a> complete with general cache info, hits, misses and file versus user caching stats.
</p>]]></description>
      <pubDate>Wed, 05 Oct 2011 13:11:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPClasses.org: Lately in PHP Episode 16 - APC in PHP, MODX CMS, Top Developers]]></title>
      <guid>http://www.phpdeveloper.org/news/16932</guid>
      <link>http://www.phpdeveloper.org/news/16932</link>
      <description><![CDATA[PHPClasses.org has posted their latest episode of their "Lately In PHP" podcast today - <A href="http://www.phpclasses.org/blog/post/160-PHP-540-Will-not-Include-APC-Is-MODX-CMS-better-than-Wordpress-Top-PHP-Developers-in-Every-Country--Lately-in-PHP-Episode-16.html">PHP 5.4.0 Will not Include APC, Is MODX CMS better than Wordpress? Top PHP Developers in Every Country</a>.
</p>
<blockquote>
PHP 5.4 beta 1 was released but APC is not going to be included at least in PHP 5.4.0. Manuel Lemos and Ernani Joppert discuss this and other happenings in the PHP world, like the adoption of more robust Continuous Integration methods to prevent shipping buggy PHP versions like what happened with PHP 5.3.7.
</blockquote>
<p>
The podcast also features an interview with <i>Bob Ray</i>, an author and contributor to the <a href="http://www.modx.com/">MODX CMS platform</a> project. You can listen to this latest episode either through <a href="http://www.phpclasses.org/blog/post/160-PHP-540-Will-not-Include-APC-Is-MODX-CMS-better-than-Wordpress-Top-PHP-Developers-in-Every-Country--Lately-in-PHP-Episode-16.html">the in-page player</a>, by <a href="http://www.phpclasses.org/blog/post/160/file/88/name/Lately-In-PHP-16.mp3">downloading it directly</a> or by <a href="http://www.phpclasses.org/blog/category/podcast/post/latest.rss">subscribing to their feed</a> and getting this and past shows automatically.
</p>
]]></description>
      <pubDate>Fri, 30 Sep 2011 09:11:53 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Script-Tutorials.com: How to Use APC Caching with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16860</guid>
      <link>http://www.phpdeveloper.org/news/16860</link>
      <description><![CDATA[<p>
On Script-Tutorials.com today there's a new article introducing you to <a href="http://www.script-tutorials.com/how-to-use-apc-caching-with-php/">using APC caching</a> in your PHP applications. Their simple example sets up a caching class that handles the dirty work for you.
</p>
<blockquote>
Today I have another interesting article for PHP. We will talking about caching, and practice of using caching in php. I will make review of APC caching and will show you how you can use APC in PHP. [...] Now people have learned to use the server memory for data storage. RAM much faster than hard disk, and the price of memory falls all the time, so let's use all these advantages of this.
</blockquote>
<p>
Included in the post is the code for a few different files - the caching class itself that implements the <a href="http://php.net/apc">APC</a> functions in PHP and some examples of it in use: saving objects, fetching data from the cache and removing things from the cache.
</p>]]></description>
      <pubDate>Thu, 15 Sep 2011 08:29:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Cache Data in RAM with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16441</guid>
      <link>http://www.phpdeveloper.org/news/16441</link>
      <description><![CDATA[<p>
DevShed has posted a new article in their series looking at storage interfaces and how to use them. In <a href="http://www.devshed.com/c/a/PHP/Implementing-a-Cache-System-in-PHP/">this latest article</a> they show how to create a caching layer that will allow you to work with any sort of caching backend you'd like.
</p>
<blockquote>
As with other elements of object-oriented programming, it's possible to use segregated interfaces in a great variety of scenarios and conditions and, therefore, enjoy the benefits that they provide right out of the box. [...] My goal in this article is to create an extendable caching system based on the contract defined by a segregated interface. To achieve this, the first step we need to take is to create the interface in question.
</blockquote>
<p>
He shows how to create the "CacheableInterface" that provides the structure for the child interfaces to follow. It provides methods for setting, getting, deleting and checking to see if a key exists. They illustrate its use with an interface to an APC cache, a file caching and a class that uses dependency injection to define the interface to use. 
</p>]]></description>
      <pubDate>Wed, 08 Jun 2011 10:48:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Caching of Zend Framework application configuration file]]></title>
      <guid>http://www.phpdeveloper.org/news/16394</guid>
      <link>http://www.phpdeveloper.org/news/16394</link>
      <description><![CDATA[<p>
On the Zend Developer Zone today there's a new post showing how you can <a href="http://devzone.zend.com/article/14893-Caching-of-Zend-Framework-application-configuration-file">cache your application configuration file</a> to boost the performance of your Zend Framework application just a little bit more.
</p>
<blockquote>
If you think that you've done everything in terms of performance optimization of your Zend Framework-based project, I bet that your application configuration file was not included in that process. [...] Reason why I'm referring to application config is that its parsing is performed on every request, which is certainly unnecessary, as you don't make configuration changes very often. Solution is simple - cache it.
</blockquote>
<p>
He opts for an APC-based solution that, in the bootstrap, reads in the configuration file and caches it as a part of a custom Zend_Application object. Code is included for both the addition to the bootstrap and the custom class extending Zend_Application to handle the actual caching.
</p>]]></description>
      <pubDate>Fri, 27 May 2011 12:02:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Artur Graniszewski's Blog: Drupal 7: HipHop for PHP vs APC - benchmark]]></title>
      <guid>http://www.phpdeveloper.org/news/16362</guid>
      <link>http://www.phpdeveloper.org/news/16362</link>
      <description><![CDATA[<p>
<i>Artur Graniszewski</i> has written up a comparison of the performance of a standard Durpal 7 installation using <a href="http://php.webtutor.pl/en/2011/05/17/drupal-hiphop-for-php-vs-apc-benchmark/">HipHop versus APC</a> to handle the optimization of the application.
</p>
<blockquote>
There have been many suggestions on improving Drupal performance, some of them recommend the use of APC module, data caching, or even compilation of the entire system through HipHop for PHP. While the first two solutions have been successfully implemented, no one was able to perform the build process. After many battles with the the compiler and the Drupal code, I present you results of the first successful translation of Drupal 7 to C++ language
</blockquote>
<p>
He introduces the methods he used and the statistics of the platform (hardware) he tested with. He also includes the software used and compile commands used to create the compiled Drupal version. Included in the post are graphs showing CPU usage comparing the two types of testing (HipHop and APC) versus a normal PHP-based installation. It also briefly touches on concurrency levels and the different optimizations that could be made with the gcc compiler.
</p>]]></description>
      <pubDate>Thu, 19 May 2011 11:01:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Simas Toleikis' Blog: PHP data caching techniques]]></title>
      <guid>http://www.phpdeveloper.org/news/15566</guid>
      <link>http://www.phpdeveloper.org/news/15566</link>
      <description><![CDATA[<p>
<i>Simas Toleikis</i> has <a href="http://simas.posterous.com/php-data-caching-techniques">posted some caching techniques</a> he's come up with to handle a few different situations including simple file-level caching and working with memcached.
</p>
<blockquote>
Caching intermediate data is the most primitive and yet the most rewarding optimization technique where you don't need to fiddle with any complex algorithms or premature optimizations. If you are into PHP you should be aware of all the best practices and the right tools for this job to make your websites fly.
</blockquote>
<p>
He covers a few different, though common, situations you may come across in your application where caching could be very helpful:
</p>
<ul>
<li>Static scope variables
<li>APC shared memory functions
<li>Memcached for large distributed caches
<li>In-memory database tables
<li>Simple file-level caches
</ul>]]></description>
      <pubDate>Mon, 13 Dec 2010 08:45:10 -0600</pubDate>
    </item>
  </channel>
</rss>
