E-commerce is also about

Transcription

E-commerce is also about
Magento server & environment optimization
Get very fast page rendering, even under heavy load !
E-commerce is also about
© NBS System 2011, all right reserved
Managed Hosting & Security
www.nbs-system.com
1
2
3
►
So many figures to paste here…









Akamai & Forrester : 5 seconds to load, 20% of people bailing out
Shopzilla raised its revenues of ~10% by stepping down from 7s to 2s loadtime
Yahoo : +400 ms, 5 to 9% traffic loss and Google : +500 ms, -20% traffic
Amazon : +100 ms, -1% sales
Interrogated users claims that 2 seconds is fair, 4s is too much
52% of visitors consider speed an essential criteria for returning to a site
In 2010, 75% of visitors won’t come back if the site is slow (64% in 2006)
Speed directly influence your SEO & SEM efficiency
60% of visitors go away if a page load in more than 6 seconds on vid.stream…
4
►Google is also using speed as an important ranking factor (it’s official)
► Graph (given by Google) show clearly the target: 1.5s
► More and you are part of the red team called « SLOW »
► This is not good for your SEO ranking and SEM efficiency
► Relevance is still more important but… Don’t you have competitors ?
5
6
7
Large features panel & flexibility comes at a price
► Do it in assembler, it will be fast and you’ll become crazy
► The use of OOP language & framework help to work faster
► PHP is still an interpreted language (Vs Compiled one)
► Magento is a kind of “meta” framework
► The EAV model gave a lot of flexibility to the catalog but is costly
►
8
9
► APDEX is the key to “user oriented” benchmarks
► When you reach a 0,85 APDEX index, your server is
loaded but responsive, it’s a fair “deal”
► 4 levels for user experience (like your girlfriend, except
for the timings) :
o
o
o
o
Satisfied (for exemple less than a second)
Tolerating (from 1 second to 4 seconds)
Frustrated (more than 4 seconds)
Inacceptable (not served/errors)
APDEX T =
E
G
1,00
0,94
0,85
F
0,70
P
0,50
U
0,00
Tolerating count
Satisfied count +
2
Total samples
10
►
►
►
►
Funkload is “Apdex aware”
It provide reliable tests and cute reporting capabilities
Allow you to draft scenarii and inject them
Will determine number of C.U (Concurrent User) with a fix Apdex
11
Yslow & Pagespeed are Firefox extensions to check your optims
► www.gtmetrix.com does it directly through a site (thus 4 all browsers)
► Reaching more than 90% is not easy, a default demostore, on a default
serveur (no optim) scores C/C (76/72%) and takes ~3,1s to load.
►
Those two performance rule set are among the most complete
► Respecting all rules will grant you a serious SEO & perfs boost
►
12
Less than 0,9 seconds to (fully) load the homepage
► 45 ms to get the home and start downloading the static files
► Grade A/A on Yslow & Pagespeed
► Deliver massive parallelizing and caching capability
► Serving up to 200 simultaneous actions (~50 000 Uniq visitor / day)
per front web servers with a Community Edition
► Serving up to 300 simultaneous actions on a Enterprise Edition (FPC)
►
13
http://fr.fotolia.com/id/7005820
14
Leave some 404
► Forget to activate Bloc Caching
► Badly coded Crons
► “Cold cache” effect
► Load a lot of products/categories on the Home
► Let the Log database be overcrowded
► Foreign includes
► Misconfiguring Magento’s cache setting
► Conception errors (like real time sliders)
► Hard disk access, nothing worse
►
15
Webserver
Integration / Extension
CSS3
Minify
Alt httpd
Alt Php
Etags
Expire
Sprite
SolR
Ramdisks
Opcode
caching
Environment
Tuning / Settings
CDN
Memcached
Linux
tuning
Mysql
tuning
Rproxy
Split
web/DB
Magento
tuning
Apache
tuning
16
Small
Medium
Mutualized
Dedicated,
Virtualized
Separate W/DB
0 to 2000 UV/d ~30 000 UV/d
Large
Dual Datacenter
Load balanced
~80 000 UV/d
UV/d = Uniq Visitor per Day
Extra Large
Dual Datacenter
CDN + Cloud for pikes
> 100 000 UV/d
17
18
Split front & DB
► Activate Flat catalog
► Use Enterprise Edition (full page cache)
► Activate Mage_optimizer
► Use SOLR for large catalog
► Opcode caching system (APC, Zend, Eaccel etc.)
► Activate caching in back office (and check that code calls it)
► Minify & compress JS & CSS files (Nitrogento does it)
► Tweak your apache config (Use Etags, Expire headers, Gzip)
►
19
Fine tune your Linux Setup
► Put cache & sessions files on ramdisks
► Split Front / Back Office instances
► Use IRQ Balancing
► Mount disk with noatime option
► Lower socket Wait Timeout in /proc
► Add a reverse proxy (Nginx or Varnish for example)
► CDN get resources from many different CNAMES
► Truncate (or archive) your log tables in Magento
► Check foreign includes response times and put them at the end
►
20
8 resources per servers, 32 resources in one run !
8 resources, then the next 8 resources, etc…
21
CSS3
► HTML5
► Progressive degradation
► Sprites
► Deactivate atime
► Tune up your DB
► Try Nginx + PHP FPM (warning, no htaccess support)
► Use DRBD to link two servers (blockdevice across network)
► Latest Memcached + memcache client => flush the old cache keys
►
22
Extend to Cloud
► Hybrid your physical servers with a Cloud will optimize your costs
►
Visits per hour, Servers are taking blue load, Cloud light blue
16000
14000
People connected
12000
10000
8000
6000
4000
2000
0
0
1
2
3
4
5
6
7
8
9
10 11 12 13 14 15 16 17 18 19 20 21 22 23
Hour ranges
Cloud
Architecture
23
►
This Magento extension provide :







Standard & Custom bloc caching (even if not called in code)
Automated Sprite generation
Gathering & Minifying of your JS / CSS files
Gzip / Etags / Expire header configuration
Automatically deploy your static files to CDN (& patch themes files)
Reduce http requests numbers
Learning mode to help






24
►
On a Demostore with Nitrogento :

Homepage load time falls to 0,05s to get the main file
Static resources are fetched in one time (reducing DL time, 2 times faster)
Your pages make 20 or more less HTTP requests
You transfer 20% less content (zipping)
Your customer use their browser cache more efficiently
Lower pressure on your servers & bandwidth

Before

After





25
Thank you for your attention !
Need (fast) Magento
managed hosting ?
www.nbs-system.com (soon available in English)
Telephone : +33.1.58.56.60.86
Mail : [email protected]
26