SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
C O N C U R R E N C Y
A N I N T R O D U C T I O N T O
J O H N E N N E W, S O L U T I O N S A R C H I T E C T, D E E S O N O N L I N E
C E N G O N D . O .
@ D E E S O N _ L A B S
H T T P : / / W W W. D E E S O N - O N L I N E . C O . U K / L A B S
… O R H O W I M A D E M I G R AT E FA S T E R
W H AT I S
C O N C U R R E N C Y ?
Database
Filestore
Web service
Application
Database
Filestore
Web service
Application
B R E A K I N G T H E
P R O B L E M D O W N …
– E D WA R D A . L E E
“… a folk definition of insanity is to do the same
thing over and over again and to expect the results
to be different. By this definition, we in fact require
that programmers of multithreaded systems be
insane. Were they sane, they could not understand
their programs …”
T H E P R O B L E M W I T H T H R E A D S , 2 0 0 6
T H E H T T P : / / W W W. E E C S . B E R K E L E Y. E D U / P U B S / T E C H R P T S / 2 0 0 6 /
E E C S - 2 0 0 6 - 1 . H T M L W I T H T H R E A D S , 2 0 0 6
T H E D I N I N G P H I L O S O P H E R S
H T T P : / / D E E S O N - O N L I N E . C O . U K / L A B S / M U LT I - P R O C E S S I N G - PA R T- 1 -
H O W - M A K E - D R U S H - R U S H
• lock_acquire()
• drush_invoke_process()
• DB transactions (innodb)
D R U PA L 7 T O O L S
M A K I N G M I G R AT E
M O V E …
W H Y S P E E D U P M I G R A T I O N S ?
• Reduce the time a migration takes
• Discover and fix problems quicker
• Remigrate faster / regular migrations
T H E P R O C E S S …
• https://github.com/johnennewdeeson/drush-multi-
processing
• Download mt.drush.inc and place in sites/all/drush
• Update to migrate 7.x-2.6-rc1
• Configure your migration class for batched operation
• Create a custom drush import command (or modify
mtm.drush.inc also at github URL above)
• Full instructions online at: http://deeson-online.co.uk/labs/
multi-processing-part-2-how-make-migrate-move
Configuring your migration class
Configuring your migration class
Creating a Drush command
Starting the process thread manager
Process setup …
Process teardown …
L I V E D E M O …
F I N E T U N I N G …
• Ramp up slowly - monitor server load and db load
• /etc/my.cnf

innodb_locks_unsafe_for_binlog = 1

innodb_flush_log_at_trx_commit=2
• Use alternative cache mechanism to ease your database
load (e.g. memcache)
• $conf['lock_inc'] = 'sites/all/modules/memcache/
memcache-lock.inc';
• $conf['memcache_stampede_protection'] = TRUE;
T H A N K S !
… A N Y Q U E S T I O N S ?
J O H N E N N E W, S O L U T I O N S A R C H I T E C T, D E E S O N O N L I N E
C E N G O N D . O .
@ D E E S O N _ L A B S
H T T P : / / W W W. D E E S O N - O N L I N E . C O . U K / L A B S

Weitere ähnliche Inhalte

Mehr von LizzieHodgson

Digibury: The Power of Web APIs by Paul Hallett from Twilio
Digibury: The Power of Web APIs by Paul Hallett from TwilioDigibury: The Power of Web APIs by Paul Hallett from Twilio
Digibury: The Power of Web APIs by Paul Hallett from TwilioLizzieHodgson
 
Digibury: Project Conway Big Reveal Part 2- the hardware build
Digibury: Project Conway Big Reveal Part 2- the hardware buildDigibury: Project Conway Big Reveal Part 2- the hardware build
Digibury: Project Conway Big Reveal Part 2- the hardware buildLizzieHodgson
 
Digibury: Project Conway Big Reveal Part 2 - The Software
Digibury: Project Conway Big Reveal Part 2 - The SoftwareDigibury: Project Conway Big Reveal Part 2 - The Software
Digibury: Project Conway Big Reveal Part 2 - The SoftwareLizzieHodgson
 
DigiProject Conway the software
DigiProject Conway the softwareDigiProject Conway the software
DigiProject Conway the softwareLizzieHodgson
 
Digibury: Project Conway Big Reveal Part 1
Digibury: Project Conway Big Reveal Part 1Digibury: Project Conway Big Reveal Part 1
Digibury: Project Conway Big Reveal Part 1LizzieHodgson
 
Digibury: Ann Kempster - Why we need 300seconds
Digibury: Ann Kempster - Why we need 300seconds Digibury: Ann Kempster - Why we need 300seconds
Digibury: Ann Kempster - Why we need 300seconds LizzieHodgson
 
Digibury: Martin Jewiss - Colour, Creativity and Running Away
Digibury: Martin Jewiss - Colour, Creativity and Running AwayDigibury: Martin Jewiss - Colour, Creativity and Running Away
Digibury: Martin Jewiss - Colour, Creativity and Running AwayLizzieHodgson
 

Mehr von LizzieHodgson (7)

Digibury: The Power of Web APIs by Paul Hallett from Twilio
Digibury: The Power of Web APIs by Paul Hallett from TwilioDigibury: The Power of Web APIs by Paul Hallett from Twilio
Digibury: The Power of Web APIs by Paul Hallett from Twilio
 
Digibury: Project Conway Big Reveal Part 2- the hardware build
Digibury: Project Conway Big Reveal Part 2- the hardware buildDigibury: Project Conway Big Reveal Part 2- the hardware build
Digibury: Project Conway Big Reveal Part 2- the hardware build
 
Digibury: Project Conway Big Reveal Part 2 - The Software
Digibury: Project Conway Big Reveal Part 2 - The SoftwareDigibury: Project Conway Big Reveal Part 2 - The Software
Digibury: Project Conway Big Reveal Part 2 - The Software
 
DigiProject Conway the software
DigiProject Conway the softwareDigiProject Conway the software
DigiProject Conway the software
 
Digibury: Project Conway Big Reveal Part 1
Digibury: Project Conway Big Reveal Part 1Digibury: Project Conway Big Reveal Part 1
Digibury: Project Conway Big Reveal Part 1
 
Digibury: Ann Kempster - Why we need 300seconds
Digibury: Ann Kempster - Why we need 300seconds Digibury: Ann Kempster - Why we need 300seconds
Digibury: Ann Kempster - Why we need 300seconds
 
Digibury: Martin Jewiss - Colour, Creativity and Running Away
Digibury: Martin Jewiss - Colour, Creativity and Running AwayDigibury: Martin Jewiss - Colour, Creativity and Running Away
Digibury: Martin Jewiss - Colour, Creativity and Running Away
 

Kürzlich hochgeladen

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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 Processorsdebabhi2
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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...Martijn de Jong
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Kürzlich hochgeladen (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Drupal camp london 2014 John Ennew Concurrency Session Deeson Online

  • 1. C O N C U R R E N C Y A N I N T R O D U C T I O N T O J O H N E N N E W, S O L U T I O N S A R C H I T E C T, D E E S O N O N L I N E C E N G O N D . O . @ D E E S O N _ L A B S H T T P : / / W W W. D E E S O N - O N L I N E . C O . U K / L A B S … O R H O W I M A D E M I G R AT E FA S T E R
  • 2. W H AT I S C O N C U R R E N C Y ?
  • 3.
  • 5.
  • 7. B R E A K I N G T H E P R O B L E M D O W N …
  • 8. – E D WA R D A . L E E “… a folk definition of insanity is to do the same thing over and over again and to expect the results to be different. By this definition, we in fact require that programmers of multithreaded systems be insane. Were they sane, they could not understand their programs …” T H E P R O B L E M W I T H T H R E A D S , 2 0 0 6 T H E H T T P : / / W W W. E E C S . B E R K E L E Y. E D U / P U B S / T E C H R P T S / 2 0 0 6 / E E C S - 2 0 0 6 - 1 . H T M L W I T H T H R E A D S , 2 0 0 6
  • 9. T H E D I N I N G P H I L O S O P H E R S H T T P : / / D E E S O N - O N L I N E . C O . U K / L A B S / M U LT I - P R O C E S S I N G - PA R T- 1 - H O W - M A K E - D R U S H - R U S H
  • 10. • lock_acquire() • drush_invoke_process() • DB transactions (innodb) D R U PA L 7 T O O L S
  • 11. M A K I N G M I G R AT E M O V E …
  • 12.
  • 13. W H Y S P E E D U P M I G R A T I O N S ? • Reduce the time a migration takes • Discover and fix problems quicker • Remigrate faster / regular migrations
  • 14. T H E P R O C E S S … • https://github.com/johnennewdeeson/drush-multi- processing • Download mt.drush.inc and place in sites/all/drush • Update to migrate 7.x-2.6-rc1 • Configure your migration class for batched operation • Create a custom drush import command (or modify mtm.drush.inc also at github URL above) • Full instructions online at: http://deeson-online.co.uk/labs/ multi-processing-part-2-how-make-migrate-move
  • 17. Creating a Drush command
  • 18. Starting the process thread manager
  • 21. L I V E D E M O …
  • 22. F I N E T U N I N G … • Ramp up slowly - monitor server load and db load • /etc/my.cnf
 innodb_locks_unsafe_for_binlog = 1
 innodb_flush_log_at_trx_commit=2 • Use alternative cache mechanism to ease your database load (e.g. memcache) • $conf['lock_inc'] = 'sites/all/modules/memcache/ memcache-lock.inc'; • $conf['memcache_stampede_protection'] = TRUE;
  • 23. T H A N K S ! … A N Y Q U E S T I O N S ? J O H N E N N E W, S O L U T I O N S A R C H I T E C T, D E E S O N O N L I N E C E N G O N D . O . @ D E E S O N _ L A B S H T T P : / / W W W. D E E S O N - O N L I N E . C O . U K / L A B S