View
280
Download
0
Category
Preview:
Citation preview
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 1
22. September 2015
Harald Zeitlhofer, Dynatrace
harald.zeitlhofer@dynatrace.com @HZeitlhofer
Improve Magento Performance To Drive Higher Conversions
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 2
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 3
• Major problem in November 2014 • Magento Shop was actually too slow!
• Infrastructure was very limited at that Lme
• Scale Infrastructure ? • Get external advice • The real problems were hidden that Lme
Performance threatens goals
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 4
lessc CSS pre-‐processor
social login module
PHP execuLon was really
slow
during the first analysis session we iden2fied
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 5
average contribution of PHP compilation time
Slow PHP execuLon
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 6
PHP compilation time could be reduced considerably just by using PHP 5.5 + Opcache!
ARer update to PHP 5.5
use latest versions of used technology
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 8
PHP execution presented a major global bottleneck
for page load times
Performance hotspot: PHP execuLon
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 9
less CSS preprocessor
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 10
less CSS preprocessor
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 11
errors in PHP execuLon
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 12
server-side calls to unused external services
Social Login Modul
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 13
Using external services
performance hotspot /en/externalprice/
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 14
response Lme hotspot PHP
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 15
slow SAP connector ?
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 16
session data locking
response Lme hotspot: usleep();
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 17
• CM_RedisSession uses usleep() in locking logic
• session_start() locks session file • only lock if required • session_write_close() releases lock
PHP session locking
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 18
• New feature: show stock and leadLmes
• Calculated on-‐the-‐fly • Very bad performance impact
Inhouse development
• Design change: pre calculate and cache • Workflow change: test automaLon including performance tests
know your code
know your external libraries
evaluate carefully before using
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 20
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 21
Modern Web Pages: lots of staLc content
434 Resources in total on that page: 230 JPEGs, 75 PNGs, 50 GIFs, …
more than 20MB page size
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 22
Not following Web Performance Best PracLces 282! Objects on that page 9.68MB Page Size
8.8s Page Load Time
Most objects are images delivered from the
main domain
Very long connect Lme (1.8s) to the CDN
use proper caching
pack JS, CSS
use sprite for images
use CDNs
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 24
cached content
sLll creates roundtrips !
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 25
Original Web Request handling
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 26
New Web Request handling
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 27
more information: http://apmblog.dynatrace.com/2014/10/30/proper-configuration-running-php-nginx/ http://www.slideshare.net/HaraldZeitlhofer/php-conference-berlin-2015-running-php-on-nginx
NGINX
use proper server tools
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 29
Status Quo
• Infrastructure has changed significantly • New design and review process • Test automaLon with performance tests
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 30
CharLng data in business dashboards
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 31
PosiLve impact on conversion rate
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE 32
www.dynatrace.com
Thank you !!!
Harald Zeitlhofer Performance Advocate #HZeitlhofer harald.zeitlhofer@dynatrace.com hmp://blog.dyntrace.com
Dynatrace Free Trial: hmp://bit.ly/dmrial
Recommended