<?xml version="1.0" encoding="utf-8"?>


<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
    <title>Magento Blog</title>
    <link>http://www.magentocommerce.com/blog/</link>
    <description></description>
    <dc:language>en</dc:language>
    <dc:creator>YoavKutner</dc:creator>
    <dc:rights>Copyright 2008</dc:rights>
    <dc:date>2008-07-19T17:12:00-08:00</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />

    <item>
      <title>Performance is Key! &#45; Notes on Magento&#8217;s Performance</title>
      <link>http://www.magentocommerce.com/blog/performance-is-key-notes-on-magentos-performance/</link>
      <guid>http://www.magentocommerce.com/blog/performance-is-key-notes-on-magentos-performance/#When:07:11:00Z</guid>
      <description><![CDATA[<h3 style="margin-bottom: 12px;">Magento's performance is key.</h3>

<p>Over the past few months, we've dedicated significant resources to diagnose and optimize Magento's performance. Now that Magento's 1.0 feature set is mostly complete, we are glad to share some of our work and the effort that has gone towards the goal of making Magento <b>fast and furious</b>. We are extremely happy with the results of our testing and benchmarks.</p>
<p>With such extensive features, functionality and flexibility performance may sometimes take a hit, and Magento is no exception to this rule.  But there are performance gains in every incremental improvement, and we're starting to see significant results in the latest release.  Below are a few of the performance improvements that appear in Magento's latest release. </p>
<ul class="disc">
	<li>Top menu join queries rewritten, top menu block is cached now on per store view level for every active category</li>
	<li>Added catalog indexes for layered navigation and search</li>
	<li>Added dynamic merge and whitespace remove during JavaScript load</li>
	<li>Footer block is cached</li>
	<li>Implemented &lt;remove name=&quot;&quot;&gt; directive in layout xml to avoid instantiating of unwanted block objects,  skipped left/right column blocks generation for pages with 1-column template&lt;/remove&gt;</li>
	<li>Most of sales order attributes became static and were moved to one raw table</li>
	<li>Quote, quote address and quote items entities are stored separately</li>
	<li>Greatly improved popular tags block generation time</li>
	<li>Quote optimization for using in top links block and in the sidebar</li>
	<li>Implemented caching API for using in Mage_Core_Model_Abstract descendant models</li>
	<li>Removed unnecessary queries from catalog pages and homepage (e.g. reduced total number of database queries from 700 to 60  for homepage, and from 500 to 100 on product listing page on a database of 1000 products and 300 categories).</li>
</ul>
<p>From our performance and load tests we have found that <b>the latest Magento release outperforms version 0.8.17240 by almost double</b>. Below we show a graph of one of the load tests we ran using Apache Benchmark (ab) comparing the two Magento versions. We experienced similar results throughout our tests and comparisons of the two versions. </p>

<img src="http://www.magentocommerce.com/images/uploads/requests_per_second.jpg" style="border: 0;" alt="image" width="650" height="290" />

<h3 style="margin-bottom: 12px;">DYI (Do it Yourself) Performance Enhancements</h3>

<p>While we continue to improve Magento's core performance, there are additional improvements that Magento users can implement to yield performance gains in a single-server environment:</p>
<ul class="disc">
	<li><b>Install a PHP opcode cache such as <a href="http://pecl.php.net/package/APC" title="APC" target="_blank">APC</a> or <a href="http://xcache.lighttpd.net/" title="XCache" target="_blank">XCache</a>.</b>  These can deliver significant improvements to PHP's responsiveness by caching PHP code in an intermediate bytecode format, which saves the interpreter from recompiling the PHP code for each and every request.</li>
	<li><b>Make sure your Apache configuration has KeepAlives enabled.</b>  KeepAlives are a trick where multiple HTTP requests can be funneled through a single TCP connection. Since the setup of each TCP connection incurs additional time, this can significantly reduce the time it takes to download all the files (HTML, JavaScript, images) for a website.</li>
	<li><b>Use a memory-based filesystem for Magento's var directory.</b>  Magento makes extensive use of file-based storage for caching and session storage.  The slowest component in a server is the hard drive, so if you use a memory-based filesystem such as <b>tmpfs</b>, you can save all those extra disk IO cycles by storing these temporary files in memory instead of storing them on your slow hard drive.</li>
	<li><b>Modify the configuration for your MySQL server to take better advantage of your server's RAM.</b>  Most Linux distributions provide a conservative MySQL package out of the box to ensure it will run on a wide array of hardware configurations.  If you have ample RAM (eg, 1gb or more), then you may want to try tweaking the configuration. An example<b> my.cnf</b> is below, though you will want to consult the MySQL documentation for a complete list of configuration directives and recommended settings.</li>
</ul>
<p>Example <b>my.cnf</b>:</p>
<img src="http://www.magentocommerce.com/images/uploads/example_cnf.jpg" style="border: 0;" alt="image" width="558" height="169" />

<h3 style="margin-bottom: 12px;margin-top: 10px;">Time to Cluster?</h3>
<p>As any successful online retailer knows, a growing business means growing pains.  If your store is a huge success, then you'll undoubtedly require more horsepower to keep your customers happy.  This means leaving the world of single-server websites and moving to a clustered environment with two or more servers.</p>
<p>There are varying ways to accomplish this, but a typical first step is to add more web servers and place them all behind a load balancer, which will distribute the load fairly among all web servers.  This method is popular because (a) web servers are cheaper than database servers; and (b) there's really no limit to the amount of web servers you can add.</p>
<p><b><u>Note:</u></b> One current limitation in Magento is that there is no official method to propagate catalog images to each web node.  If you're not comfortable setting up some sort of facility to do this, then you may want to hire a professional or try a different method of scaling.</p>
<p>A second method involves a performance tactic called “database replication.”  When using replication, you will have two or more database servers in your cluster.  One will be the “master” and the rest will be called “slaves.”  The master is the only database server that accepts any sort of write-based queries.  These write queries are then replicated by each of the slaves in real-time (or very close to it).  The advantage of this setup is that Magento can issue read queries to any of the slave servers, saving all the write queries for the master database.  A database is traditionally a difficult component to scale horizontally, so replication is a happy compromise.</p>
<p>The initial setup and configuration for MySQL replication is out of the scope of this document, but we can refer you to the experts.  Here is a tutorial that <a href="http://www.howtoforge.com/mysql_database_replication" title="explains all the details" target="_blank">explains all the details</a>.</p>
<p>Once you have MySQL replication functioning, configuring Magento to use multiple database servers is a relatively simple task.  The only file you will have to edit is <b>app/etc/local.xml</b>.  An example is shown below.  As you can see, there are two database connections configured, one called <b>default_setup</b> and one called <b>default_read</b>.  The <b>default_setup</b> connection will be used for all write-based queries, and the <b>default_read</b> connection will be used for all read-based queries.</p>
<p>Example <b>app/etc/local.xml</b>:</p>
<img src="http://www.magentocommerce.com/images/uploads/example_localxml.jpg" style="border: 0;" alt="image" width="597" height="445" />
<p>This article has only covered a few of the well-known tactics for improving site performance.  However, every website's scenario is slightly different, so it's often worth hiring a professional to appraise the needs of your site and provide you with possible upgrade options.  But if you're comfortable with Linux and confident when working with configuration files, try out a few of our suggestions above.  You may be pleasantly surprised.</p>
<p><b>Have any ideas of your own?</b> We'd love to hear your thoughts. Leave a comment or <a href="http://www.magentocommerce.com/group/view/168" title="join the Magento Performance and Optimization Group">join the Magento Performance and Optimization Group</a>.]]></description>
      
      <dc:subject></dc:subject>
      <dc:date>2008-03-20T07:11:00-08:00</dc:date>
    </item>
 


    <item>
      <title>Comment by SimpleHelix.com</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>sometimes, choosing the right web host makes all the difference.
<br />
take a look at <a href="http://www.magentify.com" target="_blank">http://www.magentify.com</a> for instance, speed is really not an issue anymore.
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by i960</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>@jayhlii - They mentioned this in their latest blog on 1.1: &#8220;Magento 1.1 stable release is scheduled for mid to late July and more information will be made available shortly. &#8220;
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by jayhlee</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>When is the new version of Magento slated to come out?
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by oshipper</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>Any news on if new versions have addressed these concerns?
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by jan212</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>@magentoteam - You are talking about Xcache in this article and say that you&#8217;re only supporting APC atm in the wiki installation guide&#8230;  What&#8217;s correct?
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by webfxmasta</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>After installing XCache or APC, do I have to modify the magento source to utilize apc_compile_file or xcache_get/set?&nbsp; Or is the opcode caching automatically working after installation (and apache restart)?
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by mascker</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>Hi,
</p>
<p>
Don&#8217;t know if this makes sense, but as far as I know, the system loads every time the etc/ folders and parses the XML files.
</p>
<p>
This is necessary for process new modules. 
</p>
<p>
Here is the idea. Why not cache all XML files for 30 days,  and when we want to add a new module we go to the admin section and we empty the cache, forcing Magento to process the XML files again.
</p>
<p>
Regards
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by MagKen</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>Just been comparing load times of my existing store with a fresh magento installation using the Firebug plugin. Even though the 39 requests for my store took 2.67s and 16 requests for the magento page took 1.3s my page definitely refreshed much quicker in the browser window (Safari and Firefox).
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by MagKen</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>Hi Yoav, I am with Clook in the UK. We have one of their vps hosting packages. I tried the fix you mentioned but it did not seem to make any difference, so I tried reinstalling again but with no improvements.
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by YoavKutner</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>@MagKen  - What host are you using?
</p>
<p>
admin panel is slow to load due to the dashboard. We are improving the dashboard and will make it available soon. 
</p>
<p>
There is also a fix that was published on the boards here: <a href="http://www.magentocommerce.com/boards/viewthread/5366/P15/#t19853">http://www.magentocommerce.com/boards/viewthread/5366/P15/#t19853</a>
</p>
<p>
This fix is helps with the caching of the JavaScript.
</p>
<p>
Thanks
</p>
<p>
yoav
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by MagKen</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>Just installed on my vps and would agree that ver 1 appears to be to slow to use on a live site. I have to point out however that I am not a techy user. Installation was very smooth, I ran the server check and the installer prompted me to change file permissions, no complaints there.
</p>
<p>
Logging in to Admin takes about 6 seconds, loading the shop home page with no sample products takes about 5 seconds.
</p>
<p>
I believe my vps has minimum 256 mb ram and software such as Expression Engine and LiteCommerce run well.
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by Max_Schreck</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>I&#8217;m sorry for the previous post&#8230; it&#8217;s there. <img src="http://www.magentocommerce.com/images/smileys/smile.gif" width="19" height="19" alt="smile" style="border:0;padding:0;" />
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by Max_Schreck</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>It&#8217;d be good to mention MySQL Query Cache in this article. <a href="http://dev.mysql.com/doc/refman/5.0/en/query-cache.html" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/query-cache.html</a> For example it can speed up the response time from 5 sec to 1 sec in some cases.
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by wflorian</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>Even if there are performance improvements, I still have major performance problems on my testserver. I really hope that there will be more big performance improvements coming soon.
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by oshipper</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>Looking good but there are still a number of major performance issues to work out before a 1.0. release. Hope this lighter interface contains a much lighter and less complicated checkout process. Will be reporting some bugs and looking forward to putting the next version through it&#8217;s paces right away.
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by PhiLho</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>Interesting. A quick test showed the previous version was a bit slow, it is nice to see you care and work on this problem. Looks like you know what you are doing&#8230; <img src="http://www.magentocommerce.com/images/smileys/tongue_laugh.gif" width="19" height="19" alt="tongue laugh" style="border:0;padding:0;" />
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by mascker</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>Hi,
</p>
<p>
Wat about caching templates (at least the catalog)?
</p>
<p>
will certainly increase disk space, but i think every template could cached for about 3 minutes?
</p>
<p>
Don&#8217;t know if is a viable alternative, but&#8230;
</p>
<p>
Regards
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by YoavKutner</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>@Ross  - Thanks for the link. We have already started work on a lighter interface that will be an alternative to the default one. We should make it available right after the release of 1.0
</p>
<p>
Thanks
</p>
<p>
yoav
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by Ross</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>Thanks for taking the time to write up some performance info, the DIY tips will come in very handy!
</p>
<p>
I was just reading over on Yahoo Developer Network about some new ideas they have come up with for front-end performance improvements, which is also a good read (for theme developers).
<br />
<a href="http://developer.yahoo.net/blog/archives/2008/03/yahoos_latest_p.html" target="_blank">http://developer.yahoo.net/blog/archives/2008/03/yahoos_latest_p.html</a>
</p>
<p>
Maybe once you folk at Varien have finished optimising the back-end, you could also look at some front-end optimisation with the default theme?&nbsp; (Also, it would be great to have a minimalist core &#8216;interface&#8217; as a base for skinning/theming - I find the default one quite heavy)
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by Raymond Brigleb</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>Wow. Thanks a million for that helpful post. Excellent tips, and the performance is looking much improved.
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by Dylan</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>I agree with Steve on this. I was a bit shocked to see how many calls are made to the database per page, as well as the amount of function calls that are made (upwards of 70k+ in 8.1 for some pages). 
</p>
<p>
Hopefully page caching will help reduce this, but it would be cool if some of those select statements got cached themselves to avoid this many trips to the db.
</p>
<p>
I&#8217;m glad to see Varien has an interest in performance, keep up the good work guys, and thanks for keeping us informed.
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by Steve Yan</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>Great to see Magento is able to run in a clustered environment so easily.&nbsp; The read-only databases (slaves) offers significant speed improvements while improving load balancing.&nbsp; 
</p>
<p>
I am now wondering about the viability of a single box solution.&nbsp; Magento make quite a number of round trips to the database per page.&nbsp; It&#8217;s 60 on the home page and 100 on the product listing.&nbsp; The contention between the webserver and database would lead one to speculate that there exists a good possibility of creating a bottleneck.
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by mytechfactory</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>I can see the performance difference on my site. Thanks a lot Varien.
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by i960</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>Are there any tmpfs alternatives available for Windows?&nbsp; I am already using APC with great results and I have my MySQL configuration pretty well optimized.&nbsp; If I could also use something like tmpfs that would be great.
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>

    <item>
      <title>Comment by WebAddict</title>
      <link>{url_as_title}</link>
      <description><![CDATA[<p>These performance improvements will make a big difference on a large site. I am looking forward to see how much better this can get.
</p>]]></description>
    <dc:date>2008-07-19 T;17:12:00-08:00</dc:date>
    </item>


</channel>
</rss>