Friday, August 15

How to Speed up Magento E-Commerce Store


Speed up the Magento store is always the challenging one. Everyone know to set the configuration in magento backend to optimize the site. apart from that we need to follow the below Hosting Environments and some other general tips.

First we should host the site in Dedicated server
Host the site in your customer country
Go to Mysql Admin Manager and Repair all the tables and Optimize the table
Only Install necessary Apache modules
use apache mod_expires and be sure to set how long the files should be cached.
Enable Gzip Compression in your htaccess file
Use Content Delivery Network(CDN) for a static content. like css,js,images
Please try to avoid external javascript and Iframe. Because every DNS lookup takes extra time.
Enable Apache KeepAlives.
Must Enable the Compilation mode in your Magento admin
Minimize the http redirects
Make your output should be W3C validated. because Errors may slowdown the browser
Turn off your Web server logs, it reduces the disk writes.
Try to Update the magento to latest version.
Increase the Query cache size in your Mysql Server
Set php_value_memory_limit to 128M in your php configuration to ensure we don't run out of memory.
Use Different server for Magento Application and MySQL.
Use Load Balancer to avoid the down time when more number of hits in the site.
If your site heavily crawled by the search engines, then you can tweak your robots.txt.
Ref: http://www.byte.nl/blog/magento-robots-txt/
Minimize the js and css files
specify the image dimensions for your images
try to Implement anyone of the cache like APC,Varnish,etc...
try to go with some other third party booster module like AITOC Magento Booster, Nitrogento



Thursday, June 19

Top 5 Issues Affecting Mangento Performance

Below are Most common Top 5 Issues, which causes 84% performance Issues. Most of the issues are due to inefficient operations, memory misuse, redundant or useless Looping.

1.    Calculating the size of an array on each iteration of a loop
2.    SQL queries inside a loop
3.    Loading the same model multiple times
4.    Redundant data set utilization
5.    Inefficient memory utilization

Reference : http://info.magento.com/rs/magentocommerce/images/Conquer_the_5_Most_Common_Magento_Coding_Issues_to_Optimize_Your_Site_for_Performance.pdf

Sunday, June 8

Magento Performance Optimization - A Complete Overview



Optimizing the magento speed is always the challenging one. In this article we will go through some of the steps to fine tune your server to allow magento to run more quickly.

1. Apache mod_expires
Whenever the user visits the site , always the web browser keep the cache of the web pages. All the web pages should have content expiry header that tells the browser when the cache will expires. If the header is not set properly always the page will request the content from the source with every page hit. in order to ensure magento set correct content expiry header, we need to add the following block of code in htaccess file.

ExpiresActive On
ExpiresDefault "access plus 1 month"

2. Apache KeepAlive
Apache KeepAlive functionality is used to allow the TCP connection between client and server  to remain open connection to allow multiple request to be served over the same connection. this can be used to decrease the page load time on web pages especially with lots of images, since it removes the over head of having multiple connections opened. to use this functionalities, edit the /etc/apache2/apache2.conf  and find keep alive entries and enabled as follows. 

KeepAlive On
KeepAliveTimeout 2

the timeout parameter is unit of seconds.   

3. GZip Compression
Web pages can be compressed using Gzip between client and server, reducing the amount of data that needs to be transferred. even though the act of compressing and decompressing adds a performance overhead, there is a net gain in reducing the traffic for large pages. to use GZip compression, enable the mod_deflate module in apache and add the following to the vhost for the site.

SetOutputFilter DEFLATE
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

4. MySQL Tuner:
MySQL tuner is a perl script that allows to analysis your database and gives recommendation which variables you should adjust in my.cnf to increase the performance. this can really help to increase the performance without the expensive hardware changes. to install and run this script follow the command.

bash$ wget http://mysqltuner.com/mysqltuner.pl
bash$ perl mysqltuner.pl

In the next articles we will continue the below performance optimization technique.
  • MemCached
  • PHP APC
  • Database Session Storage
  • Query caching


Saturday, May 24

How to get Magento Admin Log Details


If you are running the magento store with multiple administrator, its very difficult to find who edited the product,category,sales or some other admin activities.

When I googled the module to find the admin log details, I didn't get any module. one day when i surfing in to magento admin panel, surprisingly I saw the admin log details.

with the help of admin log, we can easily discover which administrator logged and which page/category/product they visited and modification they made.we can view the detailed information on the history, date and time of the action made. so if something happened wrong in your store, we can find out who/what could caused the problem.

In Magento admin panel under system->admin action log we can see all the admin activities with detailed information.

Please refer the below screen-shot for reference.