Improving the Performance of a Local Magento Install
Magento is great, but it needs a good amount of hardware behind it. Developing locally can get slow and cumbersome unless your environment is tweaked properly. Here are a few tips for boosting Magento performance without impacting the rest of your development environment. Please keep in mind that the memory allocations work well for my machine (dual core, 4 gigs of ram).
Database
Install innoDB. Magento can use the in-memory buffer pool to cache table indexes and data.
Configure my.ini:
innodb_buffer_pool_size = 64M
innodb_thread_concurrency = 4 (or 8 if you have dual core)
query_cache_size = 64M
query_cache_limit = 2M
apache
enable mod_expires in httpd.conf
php
in php.ini enable:
realpath_cache_size = 16k
realpath_cache_ttl = 120
Install the eAccelerator binaries for php. APC is a better solution but is less compatible with windows. If you need to compile these, click here for instructions. Then configure it:
extension=eaccelerator.dll
eaccelerator.shm_size=64
eaccelerator.cache_dir=C:\PHP\tmp
eaccelerator.enable=1
eaccelerator.optimizer=1
eaccelerator.check_mtime=1
eaccelerator.shm_max=0
Install memcached.
add the following lines inside the config of epp/etc/local.xml
<cache>
<backend>memcached</backend>
<memcached>
<servers>
<server>
<host><![CDATA[localhost]]></host>
<port><![CDATA[11211]]></port>
<persistent><![CDATA[1]]></persistent>
</server>
</servers>
<compression><![CDATA[0]]></compression>
<cache_dir><![CDATA[]]></cache_dir>
<hashed_directory_level><![CDATA[]]></hashed_directory_level>
<hashed_directory_umask><![CDATA[]]></hashed_directory_umask>
<file_name_prefix><![CDATA[]]></file_name_prefix>
</memcached>
</cache>
Admin Backend
- Keep the indexes up to date (System > index management)
- Compile Mage classes (System > tools > Complilation)
- Enable all cachine (System > Cache Management)