SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
Miguel Balparda
Magento 2: Premium Performance
with PHP 7 and Varnish
•Full time traveler
•Magento Master 2016
•Meet Magento speaker
•Magento Certified Solution Specialist
•BBQ Certified Solution Specialist
Miguel Balparda
@mbalparda
Test overview
1. Magento 2 using PHP 5.6 vs Magento 2 using PHP 5.6 and Varnish
2. Magento 2 using PHP 7 vs Magento 2 using PHP 7 and Varnish
3. Magento 2 using PHP 5.6 vs Magento 2 using PHP 7
Hardware
Software
● Apache 2.2
● Redis 2.8.4
● PHP-FPM 5.6.15 (latest versions available at testing time)
● PHP-FPM 7.0.2 (latest versions available at testing time)
● Percona 5.6
● Varnish 4.0.1
● Centos 6.7 x86_64
● Siege 3.0.5
● Magento 2.0.2 with sample data and sample theme
Varnish
Varnish + Magento
Magento + Varnish
Replace your default VCL and restart the service
service varnish restart
Magento env.php (redis)
'cache' =>
array(
'frontend' =>
array(
'default' =>
array(
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' =>
array(
'server' => '127.0.0.1',
'port' => '6379'
),
),
Magento env.php (redis)
'page_cache' =>
array(
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' =>
array(
'server' => '127.0.0.1',
'port' => '6379',
'database' => '1',
'compress_data' => '0'
)
)
)
)
Magento env.php (memcache)
(PHP memcache extension)
'session' =>
array (
'save' => 'memcache',
'save_path' => 'tcp://<memcache ip or host>:<memcache port>'
),
(PHP memcached extension)
'session' =>
array (
'save' => 'memcached’,
'save_path' => '<memcache ip or host>:<memcache port>'
),
Magento CLI
We enabled production mode by running:
magento deploy:mode:set production
Siege automation
#!/bin/sh
echo "Creating sitemap:"
curl $4 | sed 's/<url>/<url>n/g' | grep 0.5 | sed 's/.*loc>(.*)</loc.*/1/g' > urls.txt
curl $4 | sed 's/<url>/<url>n/g' | grep 1.0 | sed 's/.*loc>(.*)</loc.*/1/g' >>urls.txt
echo "Warming cache:"
siege -i -c50 -t60s -f urls.txt
echo "Waiting 1 minute for the first test."
sleep 1m
echo "Starting tests:"
for i in `seq 1 $5`;
do
echo "Running test # $i / $5:"
Siege -i -c$1 -t$2s -f urls.txt
echo "Waiting 1 minute for the next test."
sleep 1m
done
echo "Removing urls.txt:"
rm urls.txt
Siege output
** Siege 2.60
** Preparing 100 concurrent users for battle.
The server is now under Siege...done
Transactions: 339 hits
Availity: 93.39 %
Elapsed time: 67.47 secs
Data transferred: 4273708 bytes
Response time: 8.25 secs
Transaction rate: 5.02 trans/sec
Throughput: 63342.34 bytes/sec
Concurrency: 41.47
Successful transactions: 337
Failed transactions: 26
Longest transaction: 17.77 secs
Shortest transaction: 0.37 secs
PHP 5.6 transaction rate
PHP 5.6 transactions
PHP 5.6 response time
PHP 5.6 vs PHP 5.6 Varnish transaction rate
8x2.3x2x
PHP 5.6 vs PHP 5.6 Varnish transactions
9x5x2x
PHP 5.6 vs PHP 5.6 Varnish response time
377x90x50x
PHP 7 transaction rate
PHP 7 vs PHP 7 Varnish transaction rate
4.7x1.6x1-7x
PHP 7 vs PHP 7 Varnish transactions
5x1.5x1.6x
PHP 7 vs PHP 7 Varnish response time
187x31x51x
PHP 5.6 vs PHP 7 transaction rate
PHP 5.6 vs PHP 7 transactions
PHP 5.6 vs PHP 7 response time
Conclusion
Thank you for coming!

Contenu connexe

Tendances

nginxをソースからインストールしてみたよ
nginxをソースからインストールしてみたよnginxをソースからインストールしてみたよ
nginxをソースからインストールしてみたよ
mamoru tateoka
 
Rails Plugins 2 Hoe
Rails Plugins 2 HoeRails Plugins 2 Hoe
Rails Plugins 2 Hoe
oscon2007
 
Kettunen, miaubiz fuzzing at scale and in style
Kettunen, miaubiz   fuzzing at scale and in styleKettunen, miaubiz   fuzzing at scale and in style
Kettunen, miaubiz fuzzing at scale and in style
DefconRussia
 

Tendances (20)

nginxをソースからインストールしてみたよ
nginxをソースからインストールしてみたよnginxをソースからインストールしてみたよ
nginxをソースからインストールしてみたよ
 
PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22
 
Write a redis client of your own
Write a redis client of your ownWrite a redis client of your own
Write a redis client of your own
 
Run Node Run
Run Node RunRun Node Run
Run Node Run
 
Plone deployment made easy
Plone deployment made easyPlone deployment made easy
Plone deployment made easy
 
Varnish Caching
Varnish CachingVarnish Caching
Varnish Caching
 
Rails Plugins 2 Hoe
Rails Plugins 2 HoeRails Plugins 2 Hoe
Rails Plugins 2 Hoe
 
Config managament for development environments ii
Config managament for development environments iiConfig managament for development environments ii
Config managament for development environments ii
 
Puppet
PuppetPuppet
Puppet
 
Haproxy - zastosowania
Haproxy - zastosowaniaHaproxy - zastosowania
Haproxy - zastosowania
 
Puppet and Openshift
Puppet and OpenshiftPuppet and Openshift
Puppet and Openshift
 
Creating qmgr and allowing remote authorization
Creating qmgr and allowing remote authorizationCreating qmgr and allowing remote authorization
Creating qmgr and allowing remote authorization
 
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
 
Kettunen, miaubiz fuzzing at scale and in style
Kettunen, miaubiz   fuzzing at scale and in styleKettunen, miaubiz   fuzzing at scale and in style
Kettunen, miaubiz fuzzing at scale and in style
 
Babushka
BabushkaBabushka
Babushka
 
Monit - NHRuby May 2009
Monit - NHRuby May 2009Monit - NHRuby May 2009
Monit - NHRuby May 2009
 
VCLをTDDで書いてデプロイする
VCLをTDDで書いてデプロイするVCLをTDDで書いてデプロイする
VCLをTDDで書いてデプロイする
 
Don’t block the event loop!
Don’t block the event loop!Don’t block the event loop!
Don’t block the event loop!
 
nouka inventry manager
nouka inventry managernouka inventry manager
nouka inventry manager
 
Dev ops on startup environment
Dev ops on startup environmentDev ops on startup environment
Dev ops on startup environment
 

En vedette

Data Insight Russian Ecommerce Ecosystem (oct'2013)
Data Insight Russian Ecommerce Ecosystem (oct'2013)Data Insight Russian Ecommerce Ecosystem (oct'2013)
Data Insight Russian Ecommerce Ecosystem (oct'2013)
Alexey Petrovsky
 
Trabalho sobre eleições - João
Trabalho sobre eleições - JoãoTrabalho sobre eleições - João
Trabalho sobre eleições - João
Tânia Regina
 
01. simuladores de negocio
01. simuladores de negocio01. simuladores de negocio
01. simuladores de negocio
Cesar
 

En vedette (17)

Magento 2 Seminar - Maarten Schuiling - The App Economy
Magento 2 Seminar - Maarten Schuiling - The App EconomyMagento 2 Seminar - Maarten Schuiling - The App Economy
Magento 2 Seminar - Maarten Schuiling - The App Economy
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2
 
Data Insight Russian Ecommerce Ecosystem (oct'2013)
Data Insight Russian Ecommerce Ecosystem (oct'2013)Data Insight Russian Ecommerce Ecosystem (oct'2013)
Data Insight Russian Ecommerce Ecosystem (oct'2013)
 
Zendcon scaling magento
Zendcon scaling magentoZendcon scaling magento
Zendcon scaling magento
 
Z-Ray: A customizable development tool belt (Zendcon 2016)
Z-Ray: A customizable development tool belt (Zendcon 2016)Z-Ray: A customizable development tool belt (Zendcon 2016)
Z-Ray: A customizable development tool belt (Zendcon 2016)
 
Midwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMidwest PHP - Scaling Magento
Midwest PHP - Scaling Magento
 
php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101
 
Elk ruminating on logs
Elk ruminating on logsElk ruminating on logs
Elk ruminating on logs
 
Success in E-commerce for India Retail Sector
Success in E-commerce for India Retail SectorSuccess in E-commerce for India Retail Sector
Success in E-commerce for India Retail Sector
 
12 Amazing Features of Magento 2
12 Amazing Features of Magento 212 Amazing Features of Magento 2
12 Amazing Features of Magento 2
 
La revolution russe (2)
La revolution russe (2)La revolution russe (2)
La revolution russe (2)
 
Ulrich
UlrichUlrich
Ulrich
 
Trabalho sobre eleições - João
Trabalho sobre eleições - JoãoTrabalho sobre eleições - João
Trabalho sobre eleições - João
 
Panda Update @ TradeTracker
Panda Update @ TradeTrackerPanda Update @ TradeTracker
Panda Update @ TradeTracker
 
Magento 1.x to Magento 2 Code Migration Tools
Magento 1.x to Magento 2 Code Migration ToolsMagento 1.x to Magento 2 Code Migration Tools
Magento 1.x to Magento 2 Code Migration Tools
 
01. simuladores de negocio
01. simuladores de negocio01. simuladores de negocio
01. simuladores de negocio
 
아마존 AWS 클라우드에서 Magento 설치 매뉴얼
아마존 AWS 클라우드에서 Magento 설치 매뉴얼아마존 AWS 클라우드에서 Magento 설치 매뉴얼
아마존 AWS 클라우드에서 Magento 설치 매뉴얼
 

Similaire à Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish

X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
Yiwei Ma
 
Mr201309 automated on-execute_test_using_virtual_box_eng
Mr201309 automated on-execute_test_using_virtual_box_engMr201309 automated on-execute_test_using_virtual_box_eng
Mr201309 automated on-execute_test_using_virtual_box_eng
FFRI, Inc.
 

Similaire à Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish (20)

Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
 
Linux processes control and monitoring
Linux processes control and monitoringLinux processes control and monitoring
Linux processes control and monitoring
 
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
 
X64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 newX64服务器 lnmp服务器部署标准 new
X64服务器 lnmp服务器部署标准 new
 
RubyKaigi 2014: ServerEngine
RubyKaigi 2014: ServerEngineRubyKaigi 2014: ServerEngine
RubyKaigi 2014: ServerEngine
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 
Installing php 7.4 Nginx Laravel 7.x on Centos 8
Installing php 7.4 Nginx Laravel 7.x on Centos 8Installing php 7.4 Nginx Laravel 7.x on Centos 8
Installing php 7.4 Nginx Laravel 7.x on Centos 8
 
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.
 
Continuous testing In PHP
Continuous testing In PHPContinuous testing In PHP
Continuous testing In PHP
 
10 Million hits a day with WordPress using a $15 VPS
10 Million hits a day  with WordPress using a $15 VPS10 Million hits a day  with WordPress using a $15 VPS
10 Million hits a day with WordPress using a $15 VPS
 
Proactive monitoring with Monit
Proactive monitoring with MonitProactive monitoring with Monit
Proactive monitoring with Monit
 
Lonestar php scalingmagento
Lonestar php scalingmagentoLonestar php scalingmagento
Lonestar php scalingmagento
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
Puppet Camp NYC 2014: Build a Modern Infrastructure in 45 min!
Puppet Camp NYC 2014: Build a Modern Infrastructure in 45 min!Puppet Camp NYC 2014: Build a Modern Infrastructure in 45 min!
Puppet Camp NYC 2014: Build a Modern Infrastructure in 45 min!
 
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
 
Free radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleFree radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmaple
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of Puppet
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of Puppet
 
Analyze Virtual Machine Overhead Compared to Bare Metal with Tracing
Analyze Virtual Machine Overhead Compared to Bare Metal with TracingAnalyze Virtual Machine Overhead Compared to Bare Metal with Tracing
Analyze Virtual Machine Overhead Compared to Bare Metal with Tracing
 
Mr201309 automated on-execute_test_using_virtual_box_eng
Mr201309 automated on-execute_test_using_virtual_box_engMr201309 automated on-execute_test_using_virtual_box_eng
Mr201309 automated on-execute_test_using_virtual_box_eng
 

Plus de Yireo

Plus de Yireo (20)

Faster Magento Integration Tests
Faster Magento Integration TestsFaster Magento Integration Tests
Faster Magento Integration Tests
 
Mage-OS Nederland
Mage-OS NederlandMage-OS Nederland
Mage-OS Nederland
 
Modernizing Vue Storefront 1
Modernizing Vue Storefront 1Modernizing Vue Storefront 1
Modernizing Vue Storefront 1
 
Magento 2 Seminar - Peter-Jaap Blaakmeer - VR-webshop
Magento 2 Seminar - Peter-Jaap Blaakmeer - VR-webshopMagento 2 Seminar - Peter-Jaap Blaakmeer - VR-webshop
Magento 2 Seminar - Peter-Jaap Blaakmeer - VR-webshop
 
Magento 2 Seminar - Toon van Dooren - Varnish in Magento 2
Magento 2 Seminar - Toon van Dooren - Varnish in Magento 2Magento 2 Seminar - Toon van Dooren - Varnish in Magento 2
Magento 2 Seminar - Toon van Dooren - Varnish in Magento 2
 
Magento 2 Seminar - Andra Lungu - API in Magento 2
Magento 2 Seminar - Andra Lungu - API in Magento 2Magento 2 Seminar - Andra Lungu - API in Magento 2
Magento 2 Seminar - Andra Lungu - API in Magento 2
 
Magento 2 Seminar - Roger Keulen - Machine learning
Magento 2 Seminar - Roger Keulen - Machine learningMagento 2 Seminar - Roger Keulen - Machine learning
Magento 2 Seminar - Roger Keulen - Machine learning
 
Magento 2 Seminar - Jisse Reitsma - Magento 2 techniek vertalen naar voordelen
Magento 2 Seminar - Jisse Reitsma - Magento 2 techniek vertalen naar voordelenMagento 2 Seminar - Jisse Reitsma - Magento 2 techniek vertalen naar voordelen
Magento 2 Seminar - Jisse Reitsma - Magento 2 techniek vertalen naar voordelen
 
Magento 2 Seminar - Sander Mangel - Van Magento 1 naar 2
Magento 2 Seminar - Sander Mangel - Van Magento 1 naar 2Magento 2 Seminar - Sander Mangel - Van Magento 1 naar 2
Magento 2 Seminar - Sander Mangel - Van Magento 1 naar 2
 
Magento 2 Seminar - Arjen Miedema - Search Engine Optimisation
Magento 2 Seminar - Arjen Miedema - Search Engine OptimisationMagento 2 Seminar - Arjen Miedema - Search Engine Optimisation
Magento 2 Seminar - Arjen Miedema - Search Engine Optimisation
 
Magento 2 Seminar - Tjitte Folkertsma - Beaumotica
Magento 2 Seminar - Tjitte Folkertsma - BeaumoticaMagento 2 Seminar - Tjitte Folkertsma - Beaumotica
Magento 2 Seminar - Tjitte Folkertsma - Beaumotica
 
Magento 2 Seminar - Jeroen Vermeulen Snelle Magento 2 Shops
Magento 2 Seminar - Jeroen Vermeulen  Snelle Magento 2 ShopsMagento 2 Seminar - Jeroen Vermeulen  Snelle Magento 2 Shops
Magento 2 Seminar - Jeroen Vermeulen Snelle Magento 2 Shops
 
Magento 2 Seminar - Christian Muench - Magerun2
Magento 2 Seminar - Christian Muench - Magerun2Magento 2 Seminar - Christian Muench - Magerun2
Magento 2 Seminar - Christian Muench - Magerun2
 
Magento 2 Seminar - Anton Kril - Magento 2 Summary
Magento 2 Seminar - Anton Kril - Magento 2 SummaryMagento 2 Seminar - Anton Kril - Magento 2 Summary
Magento 2 Seminar - Anton Kril - Magento 2 Summary
 
Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks
Magento 2 Seminar - Daniel Genis - Magento 2 benchmarksMagento 2 Seminar - Daniel Genis - Magento 2 benchmarks
Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks
 
Magento 2 Seminar - Ben Marks - Keynote
Magento 2 Seminar - Ben Marks - KeynoteMagento 2 Seminar - Ben Marks - Keynote
Magento 2 Seminar - Ben Marks - Keynote
 
Magento 2 Seminar - Community agenda
Magento 2 Seminar - Community agendaMagento 2 Seminar - Community agenda
Magento 2 Seminar - Community agenda
 
Magento 2 Seminar - Jisse Reitsma - Migratie Planning
Magento 2 Seminar - Jisse Reitsma - Migratie PlanningMagento 2 Seminar - Jisse Reitsma - Migratie Planning
Magento 2 Seminar - Jisse Reitsma - Migratie Planning
 
Magento 2 Seminar - Welkom
Magento 2 Seminar - WelkomMagento 2 Seminar - Welkom
Magento 2 Seminar - Welkom
 
Dutch Joomla PHP Developers group - HikaShop Plugin Events
Dutch Joomla PHP Developers group - HikaShop Plugin EventsDutch Joomla PHP Developers group - HikaShop Plugin Events
Dutch Joomla PHP Developers group - HikaShop Plugin Events
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish

  • 1. Miguel Balparda Magento 2: Premium Performance with PHP 7 and Varnish
  • 2. •Full time traveler •Magento Master 2016 •Meet Magento speaker •Magento Certified Solution Specialist •BBQ Certified Solution Specialist Miguel Balparda @mbalparda
  • 3. Test overview 1. Magento 2 using PHP 5.6 vs Magento 2 using PHP 5.6 and Varnish 2. Magento 2 using PHP 7 vs Magento 2 using PHP 7 and Varnish 3. Magento 2 using PHP 5.6 vs Magento 2 using PHP 7
  • 5. Software ● Apache 2.2 ● Redis 2.8.4 ● PHP-FPM 5.6.15 (latest versions available at testing time) ● PHP-FPM 7.0.2 (latest versions available at testing time) ● Percona 5.6 ● Varnish 4.0.1 ● Centos 6.7 x86_64 ● Siege 3.0.5 ● Magento 2.0.2 with sample data and sample theme
  • 8. Magento + Varnish Replace your default VCL and restart the service service varnish restart
  • 9. Magento env.php (redis) 'cache' => array( 'frontend' => array( 'default' => array( 'backend' => 'Cm_Cache_Backend_Redis', 'backend_options' => array( 'server' => '127.0.0.1', 'port' => '6379' ), ),
  • 10. Magento env.php (redis) 'page_cache' => array( 'backend' => 'Cm_Cache_Backend_Redis', 'backend_options' => array( 'server' => '127.0.0.1', 'port' => '6379', 'database' => '1', 'compress_data' => '0' ) ) ) )
  • 11. Magento env.php (memcache) (PHP memcache extension) 'session' => array ( 'save' => 'memcache', 'save_path' => 'tcp://<memcache ip or host>:<memcache port>' ), (PHP memcached extension) 'session' => array ( 'save' => 'memcached’, 'save_path' => '<memcache ip or host>:<memcache port>' ),
  • 12. Magento CLI We enabled production mode by running: magento deploy:mode:set production
  • 13. Siege automation #!/bin/sh echo "Creating sitemap:" curl $4 | sed 's/<url>/<url>n/g' | grep 0.5 | sed 's/.*loc>(.*)</loc.*/1/g' > urls.txt curl $4 | sed 's/<url>/<url>n/g' | grep 1.0 | sed 's/.*loc>(.*)</loc.*/1/g' >>urls.txt echo "Warming cache:" siege -i -c50 -t60s -f urls.txt echo "Waiting 1 minute for the first test." sleep 1m echo "Starting tests:" for i in `seq 1 $5`; do echo "Running test # $i / $5:" Siege -i -c$1 -t$2s -f urls.txt echo "Waiting 1 minute for the next test." sleep 1m done echo "Removing urls.txt:" rm urls.txt
  • 14. Siege output ** Siege 2.60 ** Preparing 100 concurrent users for battle. The server is now under Siege...done Transactions: 339 hits Availity: 93.39 % Elapsed time: 67.47 secs Data transferred: 4273708 bytes Response time: 8.25 secs Transaction rate: 5.02 trans/sec Throughput: 63342.34 bytes/sec Concurrency: 41.47 Successful transactions: 337 Failed transactions: 26 Longest transaction: 17.77 secs Shortest transaction: 0.37 secs
  • 18. PHP 5.6 vs PHP 5.6 Varnish transaction rate 8x2.3x2x
  • 19. PHP 5.6 vs PHP 5.6 Varnish transactions 9x5x2x
  • 20. PHP 5.6 vs PHP 5.6 Varnish response time 377x90x50x
  • 22. PHP 7 vs PHP 7 Varnish transaction rate 4.7x1.6x1-7x
  • 23. PHP 7 vs PHP 7 Varnish transactions 5x1.5x1.6x
  • 24. PHP 7 vs PHP 7 Varnish response time 187x31x51x
  • 25. PHP 5.6 vs PHP 7 transaction rate
  • 26. PHP 5.6 vs PHP 7 transactions
  • 27. PHP 5.6 vs PHP 7 response time
  • 29. Thank you for coming!