Magento Resource | E-Commerce Generation Explorer

Oct/09

15

Some Methods to Speed up Magento – a Guide to Making Magento Faster

Some Methods to Speed up Magento – a Guide to Making Magento Faster
1. Install Fooman Speedster
This one made a massive difference to page loads for the first site I am testing.
http://www.magentocommerce.com/extension/457/fooman-speedster
2. Enable Gzip Compression in .htaccess
http://www.magentocommerce.com/boards/viewthread/7100/
To do this, uncomment this part in the .htacess: (Line 52)
#php_flag zlib.output_compression on
(ie Remove the # save and reupload)
(Next are from – http://www.magentocommerce.com/blog/comments/performance-is-key-notes-on-magentos-performance/)
3. Install APC or Xcache
APC – http://pecl.php.net/package/APC
Xcache – http://xcache.lighttpd.net/
Looking at benchmarks and folks comments, it seems to be a toss of coin which one to go for.
I will probably go for APC on balance.
Will be asking my host to install this.
Ok. My host installed it. And further to Discovery posting below, thought I would add that in here to the main body. Discovery pointed out that thread here had extra tips once APC had been installed: http://www.magentocommerce.com/boards/viewthread/9882/
Essentially, after APC has been installed, you locate the local.xml file in the install. (Mine was here – /home/yoursitename/public_html/app/etc/local.xml
You then add the following code to just below:
<global>
<cache>
<backend>apc</backend>
<prefix>alphanumeric</prefix>
</cache>
I have to say that I actually have installed APC, and then tried this, but that it actually slowed down my server. Response times went up from about 2 seconds to 3 seconds.
Your mileage may however vary, so give it a go
4.”Modify the configuration for your MySQL server to take better advantage of your server’s RAM. 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 my.cnf is below, though you will want to consult the MySQL documentation for a complete list of configuration directives and recommended settings.”
They have a list of settings there for my.cnf as follows:
key_buffer = 512M
max_allowed_packet = 64M
table_cache = 512
sort_buffer_size = 4m
read_buffer_size = 4m
read_rnd_buffer_size = 2m
myisam_sort_buffer_size = 64m
tmp_table_size = 128m
query_cache_size = 96m
query_cache_type = 1
thread_cache_size = 8
max_connections = 400
wait_timeout = 300
Again, get your host to do it, (which is what I will be doing  ) or figure it out.
5. This thread here – http://www.magentocommerce.com/boards/viewthread/5366/P60/ – Includes a post from a Server Admin at Rackspace who had experience optimizing for Magento
The two that jumped out at me were:
a/ First off, I made some changes to your system, I increased the APC.shm.size to 128 This will allow more data to be cached by apc, in theory it’ll store more data.
(This sounds like it is linked to APC above – So maybe install APC first before doing this  )
6. From thread above:
“I also made some changes to the vhost.conf file for the shop site, historically disabling open_basedir allows magento to work slightly better.”
No idea what this is. Any guru’s care to comment? A step by step would be useful from someone if you know how to do it.

Some Methods to Speed up Magento – a Guide to Making Magento Faster

1. Install Fooman Speedster

This one made a massive difference to page loads for the first site I am testing.

http://www.magentocommerce.com/extension/457/fooman-speedster

2. Enable Gzip Compression in .htaccess

http://www.magentocommerce.com/boards/viewthread/7100/

To do this, uncomment this part in the .htacess: (Line 52)

#php_flag zlib.output_compression on

(ie Remove the # save and reupload)

(Next are from – http://www.magentocommerce.com/blog/comments/performance-is-key-notes-on-magentos-performance/)

3. Install APC or Xcache

APC – http://pecl.php.net/package/APC

Xcache – http://xcache.lighttpd.net/

Looking at benchmarks and folks comments, it seems to be a toss of coin which one to go for.

I will probably go for APC on balance.

Will be asking my host to install this.

Ok. My host installed it. And further to Discovery posting below, thought I would add that in here to the main body. Discovery pointed out that thread here had extra tips once APC had been installed: http://www.magentocommerce.com/boards/viewthread/9882/

Essentially, after APC has been installed, you locate the local.xml file in the install. (Mine was here – /home/yoursitename/public_html/app/etc/local.xml

You then add the following code to just below:

<global>

<cache>

<backend>apc</backend>

<prefix>alphanumeric</prefix>

</cache>

I have to say that I actually have installed APC, and then tried this, but that it actually slowed down my server. Response times went up from about 2 seconds to 3 seconds.

Your mileage may however vary, so give it a go

4.”Modify the configuration for your MySQL server to take better advantage of your server’s RAM. 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 my.cnf is below, though you will want to consult the MySQL documentation for a complete list of configuration directives and recommended settings.”

They have a list of settings there for my.cnf as follows:

key_buffer = 512M

max_allowed_packet = 64M

table_cache = 512

sort_buffer_size = 4m

read_buffer_size = 4m

read_rnd_buffer_size = 2m

myisam_sort_buffer_size = 64m

tmp_table_size = 128m

query_cache_size = 96m

query_cache_type = 1

thread_cache_size = 8

max_connections = 400

wait_timeout = 300

Again, get your host to do it, (which is what I will be doing  ) or figure it out.

5. This thread here – http://www.magentocommerce.com/boards/viewthread/5366/P60/ – Includes a post from a Server Admin at Rackspace who had experience optimizing for Magento

The two that jumped out at me were:

a/ First off, I made some changes to your system, I increased the APC.shm.size to 128 This will allow more data to be cached by apc, in theory it’ll store more data.

(This sounds like it is linked to APC above – So maybe install APC first before doing this  )

6. From thread above:

“I also made some changes to the vhost.conf file for the shop site, historically disabling open_basedir allows magento to work slightly better.”

No idea what this is. Any guru’s care to comment? A step by step would be useful from someone if you know how to do it.

source from: http://www.blastedthing.com/magento/questions/mag-9-methods-to-speed-up-magento-a-guide-to-making-magento-faster/

·

3 comments

  • Chris · 24/04/2010 at 03:11

    Hi there, I took a look at this.. and I installed the fooman speedster… but for some reason my site looks like this

    http://www.zukodesign.com

    … it seems to have failed at minifying things.. I set the permissions and added the information to the .htaccess file.. not sure what i have to do.. I also contacted fooman… have any idea?

  • Admin comment by admin · 26/04/2010 at 04:05

    I don’t know why I can’t access your site. But I didn’t use fooman for some projects as well.

  • mocnmqah · 01/11/2011 at 20:17

    I’m not sure where you’re getting your information, but good topic. I needs to spend some time learning much more or understanding more. Thanks for wonderful information I was looking for this information for my mission.

Leave a Reply

<<

>>

Theme Design by devolux.nh2.me