开发者

Magento performance question

开发者 https://www.devze.com 2023-01-28 19:18 出处:网络
I have an installation of 1.3.2.4 running two Store Views and 2,734 products. The site sees around 15,000 visits a month.

I have an installation of 1.3.2.4 running two Store Views and 2,734 products. The site sees around 15,000 visits a month.

Apache and MySQL (mostly Apache) hovers at around 1.5 GB RAM usage most of the time and peaks over 3 GB. My questions i开发者_运维技巧s, considering the stats, is this normal? Seems like a lot.

If that memory usage is in fact abnormal, would an upgrade to 1.4.1.1 help?


If you consider your stores, then you are doing just fine. But regarding the traffic you're getting, it seems that you need to provide some extra features to Magento to let it fire up. For this, you can have some of the following:-

  • Install APC (Alternative PHP Cache) or XCache (or any other alternative) and configure the use of it in your Magento back-end. It dramatically increases the speed of Magento.
  • You can have Magento's cache stored in memory (tmpfs in Linux).
  • You can also tell Magento to save sessions into Memcache so that your sessions are in memory & distributed.
  • Check your Magento's Index Management section for any requirement of indexes, every month or bi-monthly. If you do find any indexing required, then do it immediately & clear the cache from your Cache Management.
  • Check your database every week or bi-monthly for any overhead in any of your database's tables. If you do find any overhead, then "optimize" those tables immediately.

Try reading some of these articles, to know more about these.

Also, upgrading to 1.4.1.1 will help you out in terms of features provided by Magento. But for performance, I think it will be best to wait for some more time, until Magento releases its version 2 in the market, in which some performance issues may be taken care of by Magento.

Hope it helps.


1.3.2.4 is a good stable release, upgrading to 1.4.0.1 is very painless and will give you the added benefit of split index management and much faster administration area (mass attribute update is fixed).

Don't be overly concerned about memory usage, depending on the number of Apache modules you have loaded, you should expect to see about 30MB per child. As long as your not swapping or encroaching your limits, you shouldn't have any real concerns over how much is being consumed. Disabling unused modules will help cut down memory - but to be honest, not by any noticeable margin.

You could always throw Nginx in front as a reverse proxy to serve static content requests and pipe PHP/dynamic reqs. back to Apache. That way you can keep the modular Apache build with .htaccess support and cut down your memory overheads significantly.

However, this could do with more information, such as the output from

free -m

To see how some of the memory is being allocated.

I'd probably suggest downloading tuning-primer.sh to run on your MySQL config. It will give a good (entry-level) indication of how efficient your memory allocation is.


Those stats look quite typical for Magento, if you consider a single hit/page load can use upwards of 64MB RAM.

Your Apache settings can also drastically effect the amount of RAM your system uses. Upgrading your Magento installation may give some small performance boost, but don't expect it to do much for memory consumption etc.

If your memory consumption is a real issue for you then you have several possible routes to reduce resource usage, such as:

  1. Install Nginx as a reverse caching proxy to apache (apache is a hog and is poor serving static content).

  2. Use Nginx + PHP Fast CGI and remove apache

  3. Try using worker MPM module for apache, or Fast CGI.

  4. Install caching proxy such as Varnish/Squid.

  5. If you are stuck with apache you can tweek KeepAlive and other settings to allow you to reduce memory usage

  6. Tweek MySQL settings, such as query caching to imporove resource usage / performance

I have found 1. to work very well in reducing cpu/memory usage as it will allow Nginx to serve static images etc without requiring apache to hog RAM trying to serve them.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号