SlideShare una empresa de Scribd logo
1 de 38
Parallel Computing: Strategies and Implications
Dori Exterman
CTO
IncrediBuild.
In this session we will discuss…
Multi-threaded vs. Multi-Process
Choosing between Multi-Core or Multi-
Threaded development
Considerations in making your choices
Scalability
Summary and Q&A
Moore’s Law Going Multicore
Instead of doing everything in a linear fashion, programmers
need to ensure applications are designed for parallel tasking.
Increase in clock speed, allowing software to automatically
run faster. No longer obliged to Moore’s law
Multi-threaded Development: Pros
Easy and fast to communicate and share data
between threads.
Easy to communicate with parent process.
Beneficial for large datasets that can’t be divided to
sub sets.
Supported by many libraries.
Multi-threaded Development: Cons
One thread crashes  the whole process crashes
Multi-threaded apps are hard to debug
Shared data requires a set of (difficult to maintain)
locks
Too many threads  too much time in context-
switching.
Not scalable to other machines / public cloud
Multi-process Development: Pros
Includes multi-threaded by definition.
Process crash won’t harm other processes.
Easier to debug
Less lock issues – depending on the
infrastructure/API used.
Scalable – distributed computing  public cloud
Multi-process Development: Cons
Custom development required in order to
communicate between processes
Requires special mechanism to share memory
data between processes
Smaller set of supporting libraries
Synch/no-synch
Large data sets
Ease of development
Scaling - Compute time and intensity
Multi-threaded vs. Multi-core:
List of Considerations
Easier in multi-threaded
Easier debug in multi-threaded
In multi-process, will require custom
development
Many mechanisms exists to allow this --
both for multi-process and multi-threaded
Synchronization/State Maintenance
Pre-made libraries for multi-threaded
MP - Easier debug/maintenance/code understanding /
less bugs will be introduced with new commits
MP - Can be developed and maintained by
less experienced developers
MP - Requires developer to maintain encapsulation
Bugs are less complicated to solve when MT is not involved
Ease of Development –
Multi-Threaded vs. Multi-Process
How many tasks do I have to execute in parallel –
dozens /millions
How many tasks will my product need to support in the
future?
How much time will each task take? Milliseconds or
minutes?
How much memory will each task require?
How large is the data that each task requires?
Throughput & scalability - 1/2
How complex is each task’s code?
Is my system real-time
Would you benefit from scalability?
Business wise - scalability as a service?
Offloading
Throughput & scalability - 2/2
Do my tasks require special hardware?
Will my tasks perform better with specific hardware?
Connection to a database
Other Questions
Let’s have a look at a real-life scenario
Maven vs Make (What are these?)
• Common
• Many tasks
• Tasks are atomic
• Minimal communication
• Small dataset
• Scalability
Scenarios – Build system approach: Maven
• Multi-threaded code was only added
recently:
Scenarios – build system approach: Maven
• Not Scalable: Users are asking for it, but it is
still missing multi-process invocation.
Single Machine, Single Core
Single Machine – Multi-Core
8 cores, 15:45 minutes
Make
• Multi-process (same as other modern build
tools)
• Better memory usage
• Scalable – 3rd party solutions (DistCC, IceCC,
IncrediBuild)
Single Machine – Multi-Core (predicted)
8 cores, 11 minutes
QT on multiple machines, multi-core
130 cores, 1:40 minutes
QT on multiple machines, multi-core
130 cores, 1:40 minutes
Real Life Scenarios
Common high-throughput scenarios and
decision
Multi-threaded:
• Large Mesh – Memory (CAD, AI (connections
between objects), weather forecasting,
genetic algorithms) –
Needs all the data to be in-memory and
accessible for all tasks.
Common high-throughput scenarios and
decision
Multi-threaded:
• Real time – financial transactions, defense
systems
Latency and initialization time are very
important.
Common high-throughput scenarios and
decision
Multi-Threading:
• Applications which most of the calculation
(business logic) is DB related (stored
procedures)
CRM, ERP, SAP
Common high-throughput scenarios and
decisions
Multi-threaded code:
• Simple scenarios
• Real-time applications
• Long initialization time with short
computation time
• Communication, synchs and states
• Only a few highly intensive tasks.
Common high-throughput scenarios and
decision
Multi-Processing:
Large independent dataset: when we don’t need all
data in-memory at the same time.
Low dependencies between data entities.
• Simulations (transient analysis) – Ansys, PSCad
• Financial derivatives – Morgan Stanley
• Rendering
Common high-throughput scenarios and
decision
Multi-Processing:
When we have Many calculations with small business
units.
Solution: batch tasks
• Compilations
• Testing (unit tests, API tests, stress tests)
• Code analysis
• Asset builds
• Math calculations (Banking, Insurance, Diamond
industry).
Common high-throughput scenarios and
decision
Multi-Processing:
• GPU – applications that scale to use many
GPUs (CUDA, OpenCL)
Common high-throughput scenarios and
decision
Multi-Processing:
• When applications stream output of
computation:
NVIDIA Shield, Onlive Service, Netflix
Common high-throughput scenarios and
decision
Multi-Processing:
• Scalability
• Offloading
• Full cloud solution
• SAAS
Summary
Summary - Writing Scalable Apps:
Architectural considerations :
• Can my execution be broken to many independent tasks?
• Can the work be divided over more than a single host?
• Do I have large datasets I need to work with?
• How many relations are in my dataset?
• How much time would it take my customers to execute a
large scenario – do I have large scenarios?
Summary - Writing Scalable app:
Technical considerations:
• Do I have any special communication and
synchronization requirements?
• Dev Complexity - What risks can we have in terms of
race-conditions, timing issues, sharing violations –
does it justify multi-threading programming?
• Would I like to scale processing performance by
using the cloud or cluster?
Moving to multi-core
Some of the known infrastructures to using
multi-core/multi-machine solutions:
• MapReduce (Google – dedicated grid)
• Hadoop (Open source – dedicated grid)
• Univa Grid Engine(Propriety – dedicated grid)
• IncrediBuild (Propriety - ad-hoc  process
virtualization grid)
Dori Exterman, IncrediBuild CTO
dori.exterman@incredibuild.com
Download IncrediBuild today – free on 4 core
local machine
http://www.incredibuild.com

Más contenido relacionado

La actualidad más candente

Nondeterminism is unavoidable, but data races are pure evil
Nondeterminism is unavoidable, but data races are pure evilNondeterminism is unavoidable, but data races are pure evil
Nondeterminism is unavoidable, but data races are pure evilracesworkshop
 
The Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance TuningThe Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance TuningjClarity
 
Moving Toward Deep Learning Algorithms on HPCC Systems
Moving Toward Deep Learning Algorithms on HPCC SystemsMoving Toward Deep Learning Algorithms on HPCC Systems
Moving Toward Deep Learning Algorithms on HPCC SystemsHPCC Systems
 
Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017
Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017
Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017Big Data Spain
 
Operating System Process Synchronization
Operating System Process SynchronizationOperating System Process Synchronization
Operating System Process SynchronizationHaziq Naeem
 
Software cracking and patching
Software cracking and patchingSoftware cracking and patching
Software cracking and patchingMayank Gavri
 
Comparing different concurrency models on the JVM
Comparing different concurrency models on the JVMComparing different concurrency models on the JVM
Comparing different concurrency models on the JVMMario Fusco
 
CUDA by Example : Advanced Atomics : Notes
CUDA by Example : Advanced Atomics : NotesCUDA by Example : Advanced Atomics : Notes
CUDA by Example : Advanced Atomics : NotesSubhajit Sahu
 
Netty Cookbook - Chapter 2
Netty Cookbook - Chapter 2Netty Cookbook - Chapter 2
Netty Cookbook - Chapter 2Trieu Nguyen
 

La actualidad más candente (9)

Nondeterminism is unavoidable, but data races are pure evil
Nondeterminism is unavoidable, but data races are pure evilNondeterminism is unavoidable, but data races are pure evil
Nondeterminism is unavoidable, but data races are pure evil
 
The Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance TuningThe Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance Tuning
 
Moving Toward Deep Learning Algorithms on HPCC Systems
Moving Toward Deep Learning Algorithms on HPCC SystemsMoving Toward Deep Learning Algorithms on HPCC Systems
Moving Toward Deep Learning Algorithms on HPCC Systems
 
Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017
Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017
Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017
 
Operating System Process Synchronization
Operating System Process SynchronizationOperating System Process Synchronization
Operating System Process Synchronization
 
Software cracking and patching
Software cracking and patchingSoftware cracking and patching
Software cracking and patching
 
Comparing different concurrency models on the JVM
Comparing different concurrency models on the JVMComparing different concurrency models on the JVM
Comparing different concurrency models on the JVM
 
CUDA by Example : Advanced Atomics : Notes
CUDA by Example : Advanced Atomics : NotesCUDA by Example : Advanced Atomics : Notes
CUDA by Example : Advanced Atomics : Notes
 
Netty Cookbook - Chapter 2
Netty Cookbook - Chapter 2Netty Cookbook - Chapter 2
Netty Cookbook - Chapter 2
 

Similar a Dori Exterman, Considerations for choosing the parallel computing strategy that fits your needs

Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture corehard_by
 
Strata SC 2014: Apache Mesos as an SDK for Building Distributed Frameworks
Strata SC 2014: Apache Mesos as an SDK for Building Distributed FrameworksStrata SC 2014: Apache Mesos as an SDK for Building Distributed Frameworks
Strata SC 2014: Apache Mesos as an SDK for Building Distributed FrameworksPaco Nathan
 
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020Tim Wagner
 
Microservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problemsMicroservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problemsŁukasz Sowa
 
Declare Victory with Big Data
Declare Victory with Big DataDeclare Victory with Big Data
Declare Victory with Big DataJ On The Beach
 
The Effectiveness, Efficiency and Legitimacy of Outsourcing Your Data
The Effectiveness, Efficiency and Legitimacy of Outsourcing Your Data The Effectiveness, Efficiency and Legitimacy of Outsourcing Your Data
The Effectiveness, Efficiency and Legitimacy of Outsourcing Your Data DataCentred
 
AWS Sydney Summit 2013 - Big Data Analytics
AWS Sydney Summit 2013 - Big Data AnalyticsAWS Sydney Summit 2013 - Big Data Analytics
AWS Sydney Summit 2013 - Big Data AnalyticsAmazon Web Services
 
SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesMahmoudZidan41
 
Multithreading 101
Multithreading 101Multithreading 101
Multithreading 101Tim Penhey
 
Deliver Best-in-Class HPC Cloud Solutions Without Losing Your Mind
Deliver Best-in-Class HPC Cloud Solutions Without Losing Your MindDeliver Best-in-Class HPC Cloud Solutions Without Losing Your Mind
Deliver Best-in-Class HPC Cloud Solutions Without Losing Your MindAvere Systems
 
Scaling apps for the big time
Scaling apps for the big timeScaling apps for the big time
Scaling apps for the big timeproitconsult
 
Scaling Systems: Architectures that grow
Scaling Systems: Architectures that growScaling Systems: Architectures that grow
Scaling Systems: Architectures that growGibraltar Software
 
Technology insights: Decision Science Platform
Technology insights: Decision Science PlatformTechnology insights: Decision Science Platform
Technology insights: Decision Science PlatformDecision Science Community
 
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling StoryPHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Storyvanphp
 
Lean Enterprise, Microservices and Big Data
Lean Enterprise, Microservices and Big DataLean Enterprise, Microservices and Big Data
Lean Enterprise, Microservices and Big DataStylight
 
Cloud-Native Data: What data questions to ask when building cloud-native apps
Cloud-Native Data: What data questions to ask when building cloud-native appsCloud-Native Data: What data questions to ask when building cloud-native apps
Cloud-Native Data: What data questions to ask when building cloud-native appsVMware Tanzu
 
Cloud Computing and Virtualization Overview by Amr Ali
Cloud Computing and Virtualization Overview by Amr AliCloud Computing and Virtualization Overview by Amr Ali
Cloud Computing and Virtualization Overview by Amr AliAmr Ali
 
Building data intensive applications
Building data intensive applicationsBuilding data intensive applications
Building data intensive applicationsAmit Kejriwal
 

Similar a Dori Exterman, Considerations for choosing the parallel computing strategy that fits your needs (20)

Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture
 
Strata SC 2014: Apache Mesos as an SDK for Building Distributed Frameworks
Strata SC 2014: Apache Mesos as an SDK for Building Distributed FrameworksStrata SC 2014: Apache Mesos as an SDK for Building Distributed Frameworks
Strata SC 2014: Apache Mesos as an SDK for Building Distributed Frameworks
 
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
 
Microservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problemsMicroservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problems
 
Declare Victory with Big Data
Declare Victory with Big DataDeclare Victory with Big Data
Declare Victory with Big Data
 
The Effectiveness, Efficiency and Legitimacy of Outsourcing Your Data
The Effectiveness, Efficiency and Legitimacy of Outsourcing Your Data The Effectiveness, Efficiency and Legitimacy of Outsourcing Your Data
The Effectiveness, Efficiency and Legitimacy of Outsourcing Your Data
 
AWS Sydney Summit 2013 - Big Data Analytics
AWS Sydney Summit 2013 - Big Data AnalyticsAWS Sydney Summit 2013 - Big Data Analytics
AWS Sydney Summit 2013 - Big Data Analytics
 
SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud Computing
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Multithreading 101
Multithreading 101Multithreading 101
Multithreading 101
 
Deliver Best-in-Class HPC Cloud Solutions Without Losing Your Mind
Deliver Best-in-Class HPC Cloud Solutions Without Losing Your MindDeliver Best-in-Class HPC Cloud Solutions Without Losing Your Mind
Deliver Best-in-Class HPC Cloud Solutions Without Losing Your Mind
 
Scaling apps for the big time
Scaling apps for the big timeScaling apps for the big time
Scaling apps for the big time
 
Scaling Systems: Architectures that grow
Scaling Systems: Architectures that growScaling Systems: Architectures that grow
Scaling Systems: Architectures that grow
 
Technology insights: Decision Science Platform
Technology insights: Decision Science PlatformTechnology insights: Decision Science Platform
Technology insights: Decision Science Platform
 
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling StoryPHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
 
Lean Enterprise, Microservices and Big Data
Lean Enterprise, Microservices and Big DataLean Enterprise, Microservices and Big Data
Lean Enterprise, Microservices and Big Data
 
Cloud-Native Data: What data questions to ask when building cloud-native apps
Cloud-Native Data: What data questions to ask when building cloud-native appsCloud-Native Data: What data questions to ask when building cloud-native apps
Cloud-Native Data: What data questions to ask when building cloud-native apps
 
Cloud Computing and Virtualization Overview by Amr Ali
Cloud Computing and Virtualization Overview by Amr AliCloud Computing and Virtualization Overview by Amr Ali
Cloud Computing and Virtualization Overview by Amr Ali
 
try
trytry
try
 
Building data intensive applications
Building data intensive applicationsBuilding data intensive applications
Building data intensive applications
 

Más de Sergey Platonov

Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионалов
Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионаловПолухин Антон, Как делать не надо: C++ велосипедостроение для профессионалов
Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионаловSergey Platonov
 
Григорий Демченко, Универсальный адаптер
Григорий Демченко, Универсальный адаптерГригорий Демченко, Универсальный адаптер
Григорий Демченко, Универсальный адаптерSergey Platonov
 
Антон Бикинеев, Reflection in C++Next
Антон Бикинеев,  Reflection in C++NextАнтон Бикинеев,  Reflection in C++Next
Антон Бикинеев, Reflection in C++NextSergey Platonov
 
Evgeniy Muralev, Mark Vince, Working with the compiler, not against it
Evgeniy Muralev, Mark Vince, Working with the compiler, not against itEvgeniy Muralev, Mark Vince, Working with the compiler, not against it
Evgeniy Muralev, Mark Vince, Working with the compiler, not against itSergey Platonov
 
Василий Сорокин, Простой REST сервер на Qt с рефлексией
Василий Сорокин, Простой REST сервер на Qt с рефлексиейВасилий Сорокин, Простой REST сервер на Qt с рефлексией
Василий Сорокин, Простой REST сервер на Qt с рефлексиейSergey Platonov
 
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и Javascript
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и JavascriptСергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и Javascript
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и JavascriptSergey Platonov
 
Лев Казаркин, Удивительные приключения регистров SSE или в поисках одного бага
Лев Казаркин, Удивительные приключения регистров SSE или в поисках одного багаЛев Казаркин, Удивительные приключения регистров SSE или в поисках одного бага
Лев Казаркин, Удивительные приключения регистров SSE или в поисках одного багаSergey Platonov
 
Антон Бикинеев, Writing good std::future< C++ >
Антон Бикинеев, Writing good std::future< C++ >Антон Бикинеев, Writing good std::future< C++ >
Антон Бикинеев, Writing good std::future< C++ >Sergey Platonov
 
Павел Филонов, Разделяй и управляй вместе с Conan.io
Павел Филонов, Разделяй и управляй вместе с Conan.ioПавел Филонов, Разделяй и управляй вместе с Conan.io
Павел Филонов, Разделяй и управляй вместе с Conan.ioSergey Platonov
 
Григорий Демченко, Асинхронность и неблокирующая синхронизация
Григорий Демченко, Асинхронность и неблокирующая синхронизацияГригорий Демченко, Асинхронность и неблокирующая синхронизация
Григорий Демченко, Асинхронность и неблокирующая синхронизацияSergey Platonov
 
Антон Полухин. C++17
Антон Полухин. C++17Антон Полухин. C++17
Антон Полухин. C++17Sergey Platonov
 
Павел Беликов, Как избежать ошибок, используя современный C++
Павел Беликов, Как избежать ошибок, используя современный C++Павел Беликов, Как избежать ошибок, используя современный C++
Павел Беликов, Как избежать ошибок, используя современный C++Sergey Platonov
 
Денис Кандров, Пушкова Евгения, QSpec: тестирование графических приложений на Qt
Денис Кандров, Пушкова Евгения, QSpec: тестирование графических приложений на QtДенис Кандров, Пушкова Евгения, QSpec: тестирование графических приложений на Qt
Денис Кандров, Пушкова Евгения, QSpec: тестирование графических приложений на QtSergey Platonov
 
Алексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhereАлексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhereSergey Platonov
 
Дмитрий Нестерук, Паттерны проектирования в XXI веке
Дмитрий Нестерук, Паттерны проектирования в XXI векеДмитрий Нестерук, Паттерны проектирования в XXI веке
Дмитрий Нестерук, Паттерны проектирования в XXI векеSergey Platonov
 
Александр Тарасенко, Использование python для автоматизации отладки С/C++ код...
Александр Тарасенко, Использование python для автоматизации отладки С/C++ код...Александр Тарасенко, Использование python для автоматизации отладки С/C++ код...
Александр Тарасенко, Использование python для автоматизации отладки С/C++ код...Sergey Platonov
 
Павел Довгалюк, Обратная отладка
Павел Довгалюк, Обратная отладкаПавел Довгалюк, Обратная отладка
Павел Довгалюк, Обратная отладкаSergey Platonov
 
Никита Глушков, К вопросу о реализации кроссплатформенных фреймворков
Никита Глушков, К вопросу о реализации кроссплатформенных фреймворковНикита Глушков, К вопросу о реализации кроссплатформенных фреймворков
Никита Глушков, К вопросу о реализации кроссплатформенных фреймворковSergey Platonov
 
Александр Гранин, Функциональная 'Жизнь': параллельные клеточные автоматы и к...
Александр Гранин, Функциональная 'Жизнь': параллельные клеточные автоматы и к...Александр Гранин, Функциональная 'Жизнь': параллельные клеточные автоматы и к...
Александр Гранин, Функциональная 'Жизнь': параллельные клеточные автоматы и к...Sergey Platonov
 
Александр Фокин, Рефлексия в C++
Александр Фокин, Рефлексия в C++Александр Фокин, Рефлексия в C++
Александр Фокин, Рефлексия в C++Sergey Platonov
 

Más de Sergey Platonov (20)

Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионалов
Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионаловПолухин Антон, Как делать не надо: C++ велосипедостроение для профессионалов
Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионалов
 
Григорий Демченко, Универсальный адаптер
Григорий Демченко, Универсальный адаптерГригорий Демченко, Универсальный адаптер
Григорий Демченко, Универсальный адаптер
 
Антон Бикинеев, Reflection in C++Next
Антон Бикинеев,  Reflection in C++NextАнтон Бикинеев,  Reflection in C++Next
Антон Бикинеев, Reflection in C++Next
 
Evgeniy Muralev, Mark Vince, Working with the compiler, not against it
Evgeniy Muralev, Mark Vince, Working with the compiler, not against itEvgeniy Muralev, Mark Vince, Working with the compiler, not against it
Evgeniy Muralev, Mark Vince, Working with the compiler, not against it
 
Василий Сорокин, Простой REST сервер на Qt с рефлексией
Василий Сорокин, Простой REST сервер на Qt с рефлексиейВасилий Сорокин, Простой REST сервер на Qt с рефлексией
Василий Сорокин, Простой REST сервер на Qt с рефлексией
 
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и Javascript
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и JavascriptСергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и Javascript
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и Javascript
 
Лев Казаркин, Удивительные приключения регистров SSE или в поисках одного бага
Лев Казаркин, Удивительные приключения регистров SSE или в поисках одного багаЛев Казаркин, Удивительные приключения регистров SSE или в поисках одного бага
Лев Казаркин, Удивительные приключения регистров SSE или в поисках одного бага
 
Антон Бикинеев, Writing good std::future< C++ >
Антон Бикинеев, Writing good std::future< C++ >Антон Бикинеев, Writing good std::future< C++ >
Антон Бикинеев, Writing good std::future< C++ >
 
Павел Филонов, Разделяй и управляй вместе с Conan.io
Павел Филонов, Разделяй и управляй вместе с Conan.ioПавел Филонов, Разделяй и управляй вместе с Conan.io
Павел Филонов, Разделяй и управляй вместе с Conan.io
 
Григорий Демченко, Асинхронность и неблокирующая синхронизация
Григорий Демченко, Асинхронность и неблокирующая синхронизацияГригорий Демченко, Асинхронность и неблокирующая синхронизация
Григорий Демченко, Асинхронность и неблокирующая синхронизация
 
Антон Полухин. C++17
Антон Полухин. C++17Антон Полухин. C++17
Антон Полухин. C++17
 
Павел Беликов, Как избежать ошибок, используя современный C++
Павел Беликов, Как избежать ошибок, используя современный C++Павел Беликов, Как избежать ошибок, используя современный C++
Павел Беликов, Как избежать ошибок, используя современный C++
 
Денис Кандров, Пушкова Евгения, QSpec: тестирование графических приложений на Qt
Денис Кандров, Пушкова Евгения, QSpec: тестирование графических приложений на QtДенис Кандров, Пушкова Евгения, QSpec: тестирование графических приложений на Qt
Денис Кандров, Пушкова Евгения, QSpec: тестирование графических приложений на Qt
 
Алексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhereАлексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhere
 
Дмитрий Нестерук, Паттерны проектирования в XXI веке
Дмитрий Нестерук, Паттерны проектирования в XXI векеДмитрий Нестерук, Паттерны проектирования в XXI веке
Дмитрий Нестерук, Паттерны проектирования в XXI веке
 
Александр Тарасенко, Использование python для автоматизации отладки С/C++ код...
Александр Тарасенко, Использование python для автоматизации отладки С/C++ код...Александр Тарасенко, Использование python для автоматизации отладки С/C++ код...
Александр Тарасенко, Использование python для автоматизации отладки С/C++ код...
 
Павел Довгалюк, Обратная отладка
Павел Довгалюк, Обратная отладкаПавел Довгалюк, Обратная отладка
Павел Довгалюк, Обратная отладка
 
Никита Глушков, К вопросу о реализации кроссплатформенных фреймворков
Никита Глушков, К вопросу о реализации кроссплатформенных фреймворковНикита Глушков, К вопросу о реализации кроссплатформенных фреймворков
Никита Глушков, К вопросу о реализации кроссплатформенных фреймворков
 
Александр Гранин, Функциональная 'Жизнь': параллельные клеточные автоматы и к...
Александр Гранин, Функциональная 'Жизнь': параллельные клеточные автоматы и к...Александр Гранин, Функциональная 'Жизнь': параллельные клеточные автоматы и к...
Александр Гранин, Функциональная 'Жизнь': параллельные клеточные автоматы и к...
 
Александр Фокин, Рефлексия в C++
Александр Фокин, Рефлексия в C++Александр Фокин, Рефлексия в C++
Александр Фокин, Рефлексия в C++
 

Último

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 

Último (20)

Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 

Dori Exterman, Considerations for choosing the parallel computing strategy that fits your needs

  • 1. Parallel Computing: Strategies and Implications Dori Exterman CTO IncrediBuild.
  • 2. In this session we will discuss… Multi-threaded vs. Multi-Process Choosing between Multi-Core or Multi- Threaded development Considerations in making your choices Scalability Summary and Q&A
  • 3. Moore’s Law Going Multicore Instead of doing everything in a linear fashion, programmers need to ensure applications are designed for parallel tasking. Increase in clock speed, allowing software to automatically run faster. No longer obliged to Moore’s law
  • 4. Multi-threaded Development: Pros Easy and fast to communicate and share data between threads. Easy to communicate with parent process. Beneficial for large datasets that can’t be divided to sub sets. Supported by many libraries.
  • 5. Multi-threaded Development: Cons One thread crashes  the whole process crashes Multi-threaded apps are hard to debug Shared data requires a set of (difficult to maintain) locks Too many threads  too much time in context- switching. Not scalable to other machines / public cloud
  • 6. Multi-process Development: Pros Includes multi-threaded by definition. Process crash won’t harm other processes. Easier to debug Less lock issues – depending on the infrastructure/API used. Scalable – distributed computing public cloud
  • 7. Multi-process Development: Cons Custom development required in order to communicate between processes Requires special mechanism to share memory data between processes Smaller set of supporting libraries
  • 8. Synch/no-synch Large data sets Ease of development Scaling - Compute time and intensity Multi-threaded vs. Multi-core: List of Considerations
  • 9. Easier in multi-threaded Easier debug in multi-threaded In multi-process, will require custom development Many mechanisms exists to allow this -- both for multi-process and multi-threaded Synchronization/State Maintenance
  • 10. Pre-made libraries for multi-threaded MP - Easier debug/maintenance/code understanding / less bugs will be introduced with new commits MP - Can be developed and maintained by less experienced developers MP - Requires developer to maintain encapsulation Bugs are less complicated to solve when MT is not involved Ease of Development – Multi-Threaded vs. Multi-Process
  • 11. How many tasks do I have to execute in parallel – dozens /millions How many tasks will my product need to support in the future? How much time will each task take? Milliseconds or minutes? How much memory will each task require? How large is the data that each task requires? Throughput & scalability - 1/2
  • 12. How complex is each task’s code? Is my system real-time Would you benefit from scalability? Business wise - scalability as a service? Offloading Throughput & scalability - 2/2
  • 13. Do my tasks require special hardware? Will my tasks perform better with specific hardware? Connection to a database Other Questions
  • 14. Let’s have a look at a real-life scenario Maven vs Make (What are these?) • Common • Many tasks • Tasks are atomic • Minimal communication • Small dataset • Scalability
  • 15. Scenarios – Build system approach: Maven • Multi-threaded code was only added recently:
  • 16. Scenarios – build system approach: Maven • Not Scalable: Users are asking for it, but it is still missing multi-process invocation.
  • 18. Single Machine – Multi-Core 8 cores, 15:45 minutes
  • 19. Make • Multi-process (same as other modern build tools) • Better memory usage • Scalable – 3rd party solutions (DistCC, IceCC, IncrediBuild)
  • 20. Single Machine – Multi-Core (predicted) 8 cores, 11 minutes
  • 21. QT on multiple machines, multi-core 130 cores, 1:40 minutes
  • 22. QT on multiple machines, multi-core 130 cores, 1:40 minutes
  • 24. Common high-throughput scenarios and decision Multi-threaded: • Large Mesh – Memory (CAD, AI (connections between objects), weather forecasting, genetic algorithms) – Needs all the data to be in-memory and accessible for all tasks.
  • 25. Common high-throughput scenarios and decision Multi-threaded: • Real time – financial transactions, defense systems Latency and initialization time are very important.
  • 26. Common high-throughput scenarios and decision Multi-Threading: • Applications which most of the calculation (business logic) is DB related (stored procedures) CRM, ERP, SAP
  • 27. Common high-throughput scenarios and decisions Multi-threaded code: • Simple scenarios • Real-time applications • Long initialization time with short computation time • Communication, synchs and states • Only a few highly intensive tasks.
  • 28. Common high-throughput scenarios and decision Multi-Processing: Large independent dataset: when we don’t need all data in-memory at the same time. Low dependencies between data entities. • Simulations (transient analysis) – Ansys, PSCad • Financial derivatives – Morgan Stanley • Rendering
  • 29. Common high-throughput scenarios and decision Multi-Processing: When we have Many calculations with small business units. Solution: batch tasks • Compilations • Testing (unit tests, API tests, stress tests) • Code analysis • Asset builds • Math calculations (Banking, Insurance, Diamond industry).
  • 30. Common high-throughput scenarios and decision Multi-Processing: • GPU – applications that scale to use many GPUs (CUDA, OpenCL)
  • 31. Common high-throughput scenarios and decision Multi-Processing: • When applications stream output of computation: NVIDIA Shield, Onlive Service, Netflix
  • 32. Common high-throughput scenarios and decision Multi-Processing: • Scalability • Offloading • Full cloud solution • SAAS
  • 34. Summary - Writing Scalable Apps: Architectural considerations : • Can my execution be broken to many independent tasks? • Can the work be divided over more than a single host? • Do I have large datasets I need to work with? • How many relations are in my dataset? • How much time would it take my customers to execute a large scenario – do I have large scenarios?
  • 35. Summary - Writing Scalable app: Technical considerations: • Do I have any special communication and synchronization requirements? • Dev Complexity - What risks can we have in terms of race-conditions, timing issues, sharing violations – does it justify multi-threading programming? • Would I like to scale processing performance by using the cloud or cluster?
  • 36. Moving to multi-core Some of the known infrastructures to using multi-core/multi-machine solutions: • MapReduce (Google – dedicated grid) • Hadoop (Open source – dedicated grid) • Univa Grid Engine(Propriety – dedicated grid) • IncrediBuild (Propriety - ad-hoc process virtualization grid)
  • 37.
  • 38. Dori Exterman, IncrediBuild CTO dori.exterman@incredibuild.com Download IncrediBuild today – free on 4 core local machine http://www.incredibuild.com

Notas del editor

  1. Good morning everyone, my name is Dori Exterman. I’m the CTO at IncrediBuild
  2. In this session we will discuss the advantages and disadvantages of multi-threaded programming vs multi-process programming. We will discuss major differences, common scenarios and considerations of choosing one over another. Finally, We will discuss architectural and design considerations on writing scalable applications.
  3. Lets talk a bit about Moore Law: The main guide lines of this law declares that the processor power will be doubled every 2 years. This leads the software developer to believe that if some tasks are slow today, soon the processors clock time will become faster and the problem will be solved by itself. For the past few years the processors clock time remained more or less the same and it’s obvious today that Moor’s law is not going to stay for long and that the entire industry is going for multiple processing power. However, unlike the past - In order to benefit from multi-core infrastructure your executions should be designed in a manner that will allow them to utilize multiple core, utilizing multiple cores means Parallelizing execution tasks, which translates into Reducing dependencies Scalable design
  4. Let’s talk about multi-threaded code. Multi-threading has its merits. First, everyone has a single core computer. Modern OS utilize a single core in a way that simulate multi-threaded apps. The user is led to believe that several apps run at once. For example, When one thread is waiting for I/O to complete another thread can run. I should note that this is not actual multi-processing since the threads are not all active at the same time. Yes, this does allow simulation of multi-core. I call it simulation of multi-core for the poor. Bad simulation. Since this is not actual multi-core and no apps are actually running in parallel. even with a standard 4 cores desktop machine there are still too many threads to run in parallel. While running multi-threaded application on one machine all data can be shared by all threads. This is done by means such as variables and classes. There is no need to replicate data. Another advantage of multi-threaded apps is library support. many available libraries today support multi-threaded apps by providing a ‘thread-safe’ interface. Build-blocks with supporting libraries enabled us to easily construct our own multi-threaded code. Finally, Multi-threaded code has great benefits when using large dataset.
  5. There are also disadvantages in Multi-threaded code. As mentioned earlier Multi-threaded code is not real multi-core. it is not multi core in the sense of parallel computing. Unless appropriate solutions are used. Another problem rises when too many threads are all used at once. Processor has to spend too much time content switching on the expense of actual processing. Yes, multi-threaded code does allow us to easily share data. But this data is maintained with a set of locks. I should mention that locks are only required when writing is involved. In case of read-only. No locks are required. It is also difficult to debug multi-threaded apps. Not only difficult but almost impossible. For example, when setting a breakpoint in one of the threads. When this breakpoint occurs it stops not only the thread we wanted but also stops all the others.
  6. Why go multi-core? multi-core does not necessarily mean not multi-threaded. Our code can be both multi-core and multi-threaded. You also get a real multi-core. you can actually write applications that run in parallel. This is no simulation. This is the real thing. process is independent of other processes in the system – easier to implement stand-alone or independent components in the system using processes. You also have less lock issues. Yes, if the application is implemented as if it was combined as two threads you will suffer the same complexities. But if the data is replicated (and then merged back – when and if needed) the lock issues no longer exist. Another important advantage concerns crashing – when a thread crash it crases the whole process. But a process crashing hardly harm other processes. That is, of course, Unless this is a kernel-space process we are talking about… Finally, if the right infrastructure is used and the code is scalable. You can just add another machine and your performance easily increases. No need to throw away the old machines!
  7. There are also disadvantages in Multi-process code: multi-process code requires custom development in order to communicate between processes, in order to share data and in order to maintain locks and synchronization (where needed). Also, the number of supporting libraries, comparting to thread-safe libraries is relatively small.
  8. Now for one of the more important parts of the talk: can we divide our code and still conquer? Does most of our code need to be in sync with other parts? maybe we can cut it into hundreds of small pieces which run in parallel and put it back together? is it important for us to maintain our code easily? Debug it easily? Is it important for us to scale it? Another questions that rises - should compute intensive tasks be treated differently?
  9. If your parallel elements (either threads or processes) require large synchronization and are not encapsulated elements , MT (multi-thread) can be a benefit in terms of ease of development because you can easily share information between threads. Sharing information and maintaining states between multiple processes can be more of a challenge as the developer will need to apply his own logical mechanisms. In order to achieve the same in multi-process architecture the developer should implement an element through which the processes will be able to communicate \ synch – such as server application, shared memory, direct (peer 2 peer) tcp communications, database, etc Achieving this in multi-threading is easier both in development and in debugging
  10. ***** Developing multi-threaded code is easier since many libraries already contain thread-safe methods. On the other hand, it is easier to debug a single process in multi-process environment. Developing for multi process is easier. It is easier to maintaining encapsulation. Less experienced developers can maintain the code with less difficulty. Easier to debug, easier to maintain, easier to understand and less bugs are likely to happen. When bugs do happen – they are much easier to solve.
  11. How many tasks do I have to run in parallel? What are the present and the future requirements? What is the duration of the tasks? What are the dependencies between the tasks. What are the resource requirements for each task? In term of Memory, CPU and dataset Scalability offers not only more CPU but can offer more GPU, memory, cumulative I/O power and more and more.
  12. Simple tasks are easier to scale, on the contrary we might not want to scale real-time tasks due to lower latency of inter-process communication. Multi-process code provides an easier way to get scalability. When working with multi process code you can more easily use clusters \ grid solutions or the public cloud to get more compute resources on demand. When using a multi-process code you can transform your code from working on a single machine to multiple-machine. There are even some solutions that allow you to scale and use idle machines and cores across your network or public cloud without you needing to code anything in order to achieve this scalability. If we'll have time later on I'll be able to elaborate a bit on that. In order to verify whether this scenario is relevant for your product you’ll need to consider to points above. It is highly important to consider future requirements as well, because once the product is mature, it will be much more difficult to change its architecture (although doable). If you have millions of very short tasks (5 milli for example), can you batch them together? For real-time performance you might want to consider multi-threaded especially in scenarios in which the tasks require data to be loaded to work with. If scalability can be beneficial to your customers, you can consider selling it separately, as a service. Such as cloud services are doing today. There is also the possibility of complete offloading (all heavy tasks will be executed remotely leaving the machine ready for work and also enables a faster tasks completion ). One example is grapics rendering. Where rendering on a local desktop it can be important in graphic rendering). -- add explanation that multi-threaded must all be off-loaded. Multi-core can benefit also from local machine or off-load some of the tasks.
  13. What about tasks which require special hardware? In case that my tasks have mandatory need for special hardware - it might be impossible to scale it. If the hardware is only used to accelerate some of the tasks, it is easier to scale it. Although the impact of scaling is not as efficient. What if the process requires connection to database? Too many db connections per process may suffocate your DB. Perhaps it is possible to have a single connection per machine? Multi-process application can be idle when you have to wait for other process to complete. For example when some of the processes are using special hardware.
  14. Let’s take a look at a real-life scenario: automatic build scripts. In particular make and maven. Both of them are used to build a big project out of small files. Small files – many tasks – where most of them are independent. Once a decision to run a task is made, the task runs independently of other tasks in the same build. Sometimes there is a minimal communication while the tasks are running. We also have a small dataset. Which is mostly read-only. Most of the data is composed of included files and source code. Hence the whole process is scalable. At least of for the local machine.
  15. One of the approaches to system build is maven – maven build configuration is a structured xml with known phases, each phase with a specific (recommended) role. Multi-threaded code support was only added about 18 months ago. What about multi-process?
  16. Unfortunately – Maven does not support multi-processing. In this slide you can see users asking for mutli-process support to increase build speed. Unfortunately for them – the platform lacks the support. This raises the question: do users really need multi-core? The answer is yes, users need multi-core for several reasons. First . Programmers building with open-source too often need to compile open-source code as part of their project. Hence They have larger and larger source code which one machine however powerful is slow to compile which impact their productivity and time-to-market a lot! Especially when moving to Agile continuous integration . Another example is DevOps which requires a build to include more tasks such as automated testing, staging, etc Finally , They require multi-core in order for 3rd parties to develop solution for tasks distribution
  17. This is a slide from the incredibuild’ GUI. In this slide we can see a representation of a Visual Studio build building QT with a single core. To the left we can see machine IP and core id, to the right in colors we see build’s tasks.
  18. This slide visualizes a Visual Studio build building QT with 8 cores. We can see that there are some inefficient utilization of multiple cores
  19. Each solution has its own benefits but that essentially, these solutions could be and were implemented because Make was developed in a multi-process manner. Process distribution can be only applied to multi process and not multi-threaded solutions. We should also note that most modern build system are multi-process and not multi-threaded. Modern popular multi-process build tools – such as – Visual Studio, Scons, Ninja, JAM, MSBuild, JOM, Gradle, WAF, Ruby and many more. IncrediBuild’s generic process distribution technology supports all these tools out-of-the-box for example but it is unable to support Maven.
  20. This slide visualizes a Visual Studio build building QT with 8 cores. We can see that performance was improved by 30% due to better dependency detection and task parallelization and ordering
  21. This slide visualizes a Visual Studio build building QT with 130 cores, from which 122 are remote cores from other machines. We can see that performance was improved by and additional 1000% due to better parallelization and resource utilization
  22. This slide visualizes a Visual Studio build building QT with 130 cores, from which 122 are remote cores from other machines. We can see that performance was improved by and additional 1000% due to better parallelization and resource utilization
  23. Lets talk about more scenarios: how about an application that requires all data to be in-memory at the same time? For example scientific applications, weather forecast simulation and so on.
  24. Some applications are heavily dependent on DB queries. Where most of the queries is read-only and the minority are write-operations. Such applications are CRM, ERP and SAP. It is possible to split the calculation between several processing units – which are processes hence have a multi-process application.
  25. Another scenarios include real-time applications. Which might include long initialization time comparing to short computation. Inter-process communication overhead. In this kind of scenario a multi-process code would impact performance severally.
  26. Sometimes we have large dataset with small to no dependencies. In this case it is easier to write a mutli-processing code. For example, code that does billing during a night-job. It has to maintain bookkeeping for all activities of several customers all at once. While there is no dependencies between the customers. This provides a great chance to increase performance by splitting small tasks to many CPUs.
  27. In some cases we need to have many operations on the same input data. In those cases we could split the calculation into many small business units. One example is Sarin. Sarin sells software that analyses diamonds and other gems according to images of the gem. They had thousands of small calculation and were able to parallel all the tasks and achieve significant performance increase.
  28. Another great example is an application which use GPU, GPU usage by nature is off-loading processing from the CPU to the GPU where the more processing units the GPU owns the faster the processing is. Most graphic card manufactures allows seamlessly increase in performance using SLI configurations. SLI configuration allows to put more than one graphic card to the machine in order to increase the number of available GPU processing units. While the driver and the sdk makes the increase of processing units seamless. Another great example is An application made to run with GPUs is highly scalable.
  29. What about streaming services? The nvidia shield which was announces recently is a set-top box which allows anyone to play high-quality heavy processing graphic games at the ease of their home using remote farm of high-performance computers. The onlive service is similar, enabling you to install the OnLive application on any machine. Even aged one and being able to play the best and most graphics intensive games. Without having to add additional hardware. As for Netflix, I believe that I don’t need to elaborate on this one. When the output is remote we can always distribute the computation and stream out the results.
  30. Why go multi-core? When you need more performance – just add another machine. No need to throw away the old ones. You also get a real multi-core. you can actually write apps that run in parallel. This is no simulation. This is the real thing. Each process is independent of other processes in the system – easier to implement stand-alone or independent components in the system. Last – multi-core does not necessarily mean not multi-threaded. App can be both multi-core and multi-threaded. Why not go multi-core? first – as mentioned earlier each process is independent of another. It is hared to predict the behavior of the code. Second – we need to write our code in a way that the inter-communication take advantage of multi-core. while some support for multi-threaded code was added to C++11, for example. None was added to support multi-core.