mani
mani

Reputation: 1044

Increase performance of magento website.

I tried all possible ways to speedup magento site. But i didn't get any result from that.

I followed some of following methods..

Enabled all Magento caching layers.

Enabled the gzip compression.

Install the GTspeed Plugiin and optimized the images, js and CSS.

But no use. My website still at very low responsive rate.

And i tried Compilation option in Magento. But it's not wroking and when i clicking on Compilation process after some time it's getting

500 internal error.

Here is my Magento Website : http://shyamwerragrandmart.com/

And i have another issue also. In my website while trying to add any products to cart it's almost taking 30sec-1min to add to the cart (using ajax). This has to be decreased. What can i do for this.?

Here i am using Go Daddy Web hosting services.

Which has unlimited Bandwidth and Unlimited Space.

Please suggest me the better options for increasing the Performance of my website.

Upvotes: 0

Views: 3465

Answers (3)

BrimSeth
BrimSeth

Reputation: 1

Generally, shared hosting is not the best type of hosting for Magento. Especially Go Daddy, they are notoriously bad. Find something else, Nexcess has decent shared hosting plans if going the VPS or dedicated hosting route is too much.

Other posts have covered most topics, but once you secure reliable hosting, try a full page cache.

Shameless Plug: I'd recommend Brim's Full Page Cache, http://ecommerce.brimllc.com/full-page-cache-magento.html. Perhaps a little bias as I wrote it, but an excellent FPC as it runs on enterprise and community, has hole punching, and is fully configurable via the admin panel.

Upvotes: 0

Balaji Kandasamy
Balaji Kandasamy

Reputation: 4506

This list may help you for Magento performance improvement:

Enable Magento caching

This is ofcourse the first step in optimization: Enable all the available caches in the Magento Admin Panel.

Compress images

Many people forget that images (PNG, JPG) can be compressed, which lowers the bandwidth between the browser and the webserver. Not only the images used by the Magento skin need optimizing, but catalog images as well. Various tools allow you to compress batches of images, for instance the online tool Smush.It.

Disable unneeded Magento modules

By disabling Magento modules that you do not need, less resources are needed – as simple as that. Modules could be disabled through the configuration in the Magento Admin Panel, or by editing XML-files in app/etc/modules. For instance, disable Mage_Log which performs queries on every request, but is not needed if you gather site statistics using external programs.

Enable flat catalogs for smaller webshops

For smaller webshops switching from the complex EAV-structure to a flat catalog could save time. This optimization is dubious and depends on many parameters, so do not take this step lightly.

W3C compliance

While it could be argued that this is less important with the coming of HTML5, it is still a fact that if your webpages are filled with ugly errors, the browser will have a harder time interpreting it. If you stick to W3C compliance, it is made sure the browser engine has an easy job parsing your HTML-code.

Compress output in general

By enabling the PHP-setting zlib.output_compression the output generated by PHP is compressed when sent to the browser. This saves bandwidth. Instead of using this, you could use the Apache mod_deflate module as well, which allows also for compression of non-PHP output (CSS, JavaScript, other plain text-files).

Configure PHP options

Most PHP settings actually do not influence the performance of Magento, but just set certain limits. For instance, settings like memory_limit and max_execution_time do not increase the page load but just make sure that certain actions do not timeout or run into memory problems.

Session storage

With Magento, sessions could be stored in files or in the database (by configuring app/etc/local.xml). Which option performs best, really depends on how the hosting environment is setup. If MySQL databases perform well, session storage in the database could benefit your site. But if MySQL is not setup correctly, the best choice might be files.

Use a PHP accelerator

By opcode caching, PHP-execution could be fastened. There are various PHP accelerators doing this job (APC, ZendOptimizer+, eAccelerator, XCache). Both APC and ZendOptimizer+ are working flawless with Magento.

Tune PHP realpath_cache

By tuning the PHP realpath_cache_size to for instance 128K (default is 16K) and the realpath_cache_ttl to 86400, things might be speeding up. Make sure you don’t run out of memory, because every Apache child will consume the configured caching size.

Use Apache mod_expires

By telling the browser which files to keep in cache for how long, you can optimize the browser cache. For instance, JavaScript files tend to change much less then CSS files (at least in the first stages of the site), but perhaps after the site is running smooth for some months you can maximize the expiration date.

Beware 404 errors

Every time a file (like a stylesheet or image) is not found, this generates a 404 error. Because the default 404 of Magento is caught by the application of Magento itself, this causes the Magento application to start for every 404 encountered. Check your Apache logs to make sure all 404 errors are solved.

Disable Magento logging

Within the Magento configuration, you can enable logging under the Developers-tab. Depending on the Magento modules this could lead to more logs needed to be written to the filesystem, slowing down your shop. Because the logging-abilities are only needed to debug something, in daily usage, it’s best to disable logging altogether.

MySQL table optimization

Through phpMyAdmin, you can perform the command OPTIMIZE TABLE on specific Magento database-tables. When a table is cluttered, this could lead to improved performance. This does not only count for the complex EAV-tables, but also for regular MySQL tables that are used frequently (for instance, core_config_data).

Merge CSS and JavaScript

By merging all CSS and JavaScript files together as one big file, only one single HTTP-request is needed by the browser to fetch this content. This saves bandwidth. For this merging, the FooMan Speedster module could be used. Magento 1.4 contains an option to merge CSS, while JavaScript-files are merged by default.

Besides merging, crunching is also an option offered by FooMan Speedster: It removes whitespaces from the output, but when compression is already applied to CSS, this option is less needed.

Use Magento Compiler module

The Magento Compiler module limits the number of directories that PHP has to search through when looking for PHP-files. This decreases the PHP execution-time, which speeds up the Magento application in general.

Be warned that you need to be careful when making changes to your Magento system, while the Magento Compiler is enabled. Upgrades should only be undertaken when the compiler is (temporarily) disabled.

One very neat trick that speeds up things tremenduously is to create a tmpfs-mount specifically for the includes/src folder. Note that this tmpfs-mount needs to be at least 100Mb – preferably 200Mb.

MySQL server tuning

The default MySQL setup is a lot of times sufficient to run a general hosting environment, but not all optimized for Magento. Tuning settings like query_cache_size could dramatically increase performance, but is also dangerous because it hugely depends on other variables (number of databases, number of tables per database, number of queries, peak usage).

Serve static content through a CDN

Static content like images, CSS-stylesheets or JavaScript-files, could be served through other servers that are more optimized for static content. For instance, a CDN could be used so that the static content is always served from a location that is closest to the visitor. This is vital for webshops serving customers worldwide.

Disable local Magento modules

If your site does not need local Magento modules, you could choose to skip the search for local modules alltogether. Within the app/etc/local.xml file, you will find an XML-tag allowing you to do so.

Be carefull with HTTPS

Every time you use SSL between webserver and browser, the process of encrypting and decrypting is added on both sides. Also there is a slight overhead in bandwidth. The Magento site runs slightly faster if you disable SSL for all or just a few pages. However, this “win” is so small compared to the other wins on this page, that it should only be handled with caution. The gained bandwidth is non-vital, while almost all computers nowadays have CPU-power with which the encryption/decryption process takes place in microseconds.

Magento in the cloud

While CDNs could be used to optimize the bandwidth for static content, the Magento application could also be optimized in the same way by using cloud computing.

Memory-based filesystem for dynamic data

By storing dynamic data (var/cache, var/session) on a memory-based filesystem like RAMdisk or tmpfs, the disk I/O is decreased.

Disable Apache htaccess-files

When allowing the usage of htaccess-files, Apache needs to inspect every directory in its path to see if an htaccess-file is present. By moving the Apache configuration-directives from the htaccess-file to the VirtualHost configuration-file, and disabling htaccess-files all together, the Apache execution-time is decreased. This tip probably applies in most cases only to dedicated servers.

Use Nginx or Litespeed

While the Apache webserver is very flexible in its configurations, there are other webservers that are better optimized regarding memory usage: By replacing Apache with either Nginx or Litespeed, you could speed up the Magento scripts even more. Both webservers require manual configuration to allow for SEF URLs.

Use lazyload for images

When a page is loading, a visitor is often waiting for images on that page to load. Depending on the number and size of these images, this can take some time. Instead of loading images at once when the page is loaded, you can also add the LazyLoad JavaScript effect that makes sure only visible images (within the browser screen) are loaded, while remaining images are only loaded once the visitor scrolls down.

Minimize Apache logging

If Apache logging is minimized, less file operations are needed for every incoming request. Ofcourse less logging also means less insight when something goes wrong. An alternative is to optimize the filesystem on which Apache logs are stored. By default, Apache logs to the /var filesystem – but there’s no need to enable things like journalling for that filesystem.

ref: http://magentotutorialbeginners.blogspot.in/2014/05/magento-performance-improvement.html

Upvotes: 2

Slimshadddyyy
Slimshadddyyy

Reputation: 4081

You can go through the below steps for Magento Optimization:

  1. High Performance Dedicated Server. Ex: Amazon EC2 cloud
  2. Swap Apache for NGINX
  3. Minimize Javascript use
  4. Minify and Compressed CSS files
  5. ‘Combine CSS’ seeks to reduce the number of HTTP requests made by a browser
  6. Optimize images
  7. Use lazyload for images
  8. Specify Image dimensions
  9. Combine images into CSS sprites
  10. Use a Content Delivery Network (CDN) for delivering static files like JS, CSS and Images to offload your server
  11. Disable modules/extension which are not required
  12. Enable all Magento Caches
  13. Use a Full Page Cache / Varnish Cache / Memcache / RedisCache
  14. Don’t use layered navigation if you don’t really need it, it needs a lot of resources
  15. Enable Compilation
  16. Limit the number of products on a product overview page.
  17. Set only those attribute frontend properties to ‘Yes’ that you’re actually going to use. Set all other to ‘No’.
  18. Don’t use in quick search, advanced search compare, etc. : Catalog -> Attributes -> Manage Atributes -> Frontend Properties.
  19. Install Google Page Speed Module
  20. Minimize redirects – Minimizing HTTP redirects from one URL to another cuts out wait time for users.
  21. Prefer asynchronous resources – Fetching resources asynchronously prevents those resources from blocking the page load.

Upvotes: 5

Related Questions