Reputation:
I am just a beginner here. I am using xampp1.7.1 php version 5.2.9 and Magento 1.7. In my local server i want to increase the speed of magento and for that purpose i try a lot of trick which are found in google. But still the performance isn't increasing. Particularly the saving times (whatever i save in back end) it takes huge time (5 munites or more...). Here is the list what i did :
Change the value of
memory_limit = 8M --> memory_limit = 128M
query_cache_size=16M --> query_cache_size=64M
Set the value of 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
From this :
<IfModule mod_deflate.c>
############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip
# Insert filter on all content
###SetOutputFilter DEFLATE
# Insert filter on selected content types only
#AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
# 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
</IfModule>
To this :
<IfModule mod_deflate.c>
############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip
# Insert filter on all content
SetOutputFilter DEFLATE
# Insert filter on selected content types only
#AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
# 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
</IfModule>
Uncheck from “#php_flag zlib.output_compression on” to “php_flag zlib.output_compression on”
Enable "Cache Management" from magento backend
Install “Fooman_Speedster” extension
But still the speed of it is not increased. If you have any suggestion or tips please share with me. Sorry for my English. A lot of thanks in advance.
Upvotes: 1
Views: 6500
Reputation: 36
When developing localy on windows there are two common causes of delay, resolution of localhost is one and windows slow file operations due to complex OS ACL is the other.
To improve the situation you must replace every localhost entry in your magento installation with 127.0.0.1. Some people make an entry in their windows hosts file that allows localhost to be redirected to 127.0.0.1 , this will improve file serving time but php commands like PDO connect will still produce one second delay each until 127.0.0.1 has replaced localhost in settings.
To avoid windows slow file operations you need a opcode cache php accelerator like APC or WinCache. When developing in windows you can activate IIS and use Microsoft Web Platform Installer to install/configure PHP, MYSQL and WinCache in few clicks. When using xampp you can install APC with http://downloads.php.net/pierre/ or http://dev.freshsite.pl/php-accelerators/apc.html binaries or building APC with Visual Studio and then configure with directions from internet. From my experience last WinCache version is extremely fast and it is a real safe choice for windows. Very few developers i know use IIS instead of apache due to the bad past of IIS but at this time it is easier to setup, can handle more requests and it is faster in most parts when compared to apache in windows.
With those 2 changes you will see a 1000%-20000% improvement while configuring MySQL for production wont benefit a development environment at all. Tweaking cache and gzip in htaccess wont benefit a local environment either, firstly because you read the files directly from your hard disk (with a cache optimizer from memory) and secondly because it is a dynamic site that you will constantly change during development so you cant set expire times and disable etags.
To improve the speed even more you will have to tweak your template. In few words as all suggest combine all png that you can , convert to base64 the ones you cant combine and use a tool like Lab.js to control loading so you can make sure your page on load is less that 1.5 sec. When moving to production use a CDN to serve media. If all go well everything will be so fast you wont care again about HW benchmarks, DB optimization and hosting comparition until you have many thousands visits per day and serve a lot of content. (Static caching not dynamic pages / parts of pages and using magento cache system for your scripts for ultimate speed ).
P.S. Using windows client version to broadcast a site in the www is legal as long as you don't change the 20 concurrent connection limit in the OS from my understanding while reading the licence.
Upvotes: 2