<?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>Sat, 25 May 2013 08:25:09 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Andrew Martin's Blog: Serving PHP session files from a RAM based disk (tmpfs) for AWS Micro Instance]]></title>
      <guid>http://www.phpdeveloper.org/news/16959</guid>
      <link>http://www.phpdeveloper.org/news/16959</link>
      <description><![CDATA[<p>
<i>Andrew Martin</i> has a new post to his blog looking at a technique that could be used to help minimize some of the performance issues you could see on <a href="http://aws.amazon.com">AWS micro instances</a> dealing with PHP session handling. His alternative is <a href="http://www.binarysludge.com/2011/08/31/serving-php-session-files-from-a-ram-based-disk-tmpfs-for-aws-micro-instances/">serving them from a RAM-based disk</a> instead.
</p>
<blockquote>
It's rare to find a web server with slow disk I/O performance, but Amazon's EC2 micro-instances are one such example. Their EBS disk subsystem access is rated "low", and this can have a detrimental effect on HTTP throughput. [...] This leaves sessions, which can be written to a <a href="http://www.binarysludge.com/2011/01/13/redundant-and-fault-tolerant-php-session-storage/">redundant and fault tolerant storage system</a>. [...] In order to speed up the disk access, a RAM-based disk can be mounted over the session directory. This has the disadvantage of being volatile - the data is lost in case of a server reboot, or the mount point being unmounted. However if tolerable, storing sessions in RAM insulates the application from poor filesystem performance.
</blockquote>
<p>
He mentions the two types of kernels that can be used, ramfs and tmpfs, and the specifics of using a tmpfs filesystem to implement the technique (complete with command line calls to make it happen). 
</p>]]></description>
      <pubDate>Thu, 06 Oct 2011 11:42:36 -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[Kevin van Zonneveld's Blog: Revisiting Faster PHP Sessions]]></title>
      <guid>http://www.phpdeveloper.org/news/16306</guid>
      <link>http://www.phpdeveloper.org/news/16306</link>
      <description><![CDATA[<p>
<i>Kevin van Zonneveld</i> has a new post to his blog revising an older post talking about session management with PHP and how limit the resources needed by them. In <a href="http://kevin.vanzonneveld.net/techblog/article/faster_php_sessions/">this post</a> he points out another method - holding the sessions in RAM rather than on disk.
</p>
<blockquote>
sing 2007 article <a href="http://kevin.vanzonneveld.net/techblog/article/create_turbocharged_storage_using_tmpfs/">Create turbocharged storage using tmpfs</a>, we can defeat some of this over-engineering and take a simpler approach to speeding up sessions in PHP. We'll store them decentralized in memory by mounting RAM onto the existing /var/lib/php5 session directories throughout your application servers, which I will call nodes from now on.
</blockquote>
<p>
He includes the commands you'll need to make a directory live in the RAM of your machine and how to migrate the existing sessions to this new data store. He covers some of the advantages of this approach (including that there's "less tech" involved so it's easier to manage). There is one point of failure he points out - that it wouldn't be a solution you could use for websites that might need to bridge sessions across machines.
</p>]]></description>
      <pubDate>Fri, 06 May 2011 10:49:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mike Willbanks' Blog: PHP Performance Series: Caching Techniques]]></title>
      <guid>http://www.phpdeveloper.org/news/9711</guid>
      <link>http://www.phpdeveloper.org/news/9711</link>
      <description><![CDATA[<p>
On his blog today, <i>Mike Willbanks</i> has <a href="http://blog.digitalstruct.com/2008/02/27/php-performance-series-caching-techniques/">started up</a> a new series that will look at various caching techniques that are available to PHP developers now:
</p>
<blockquote>
Welcome to the first edition of the PHP performance series, a new series that I will be explaining ways to gain efficiencies and squeezing more performance out of your applications. This first edition, caching techniques, focuses on ways to cache data to optimize your current sites. Some of the concepts here are fairly easy to implement while others may take strategic design in the architecture of your application.
</blockquote>
<p>
The methods he looks at <a href="http://blog.digitalstruct.com/2008/02/27/php-performance-series-caching-techniques/">this time</a> are:
</p>
<ul>
<li>Opcode Caching
<li>File Priming
<li>Caching Variables
<li>File Caching
<li>Memory Caching
<li>Database Memory Tables
<li>RAM Disk
</ul>]]></description>
      <pubDate>Wed, 27 Feb 2008 10:25:00 -0600</pubDate>
    </item>
  </channel>
</rss>
