SlideShare ist ein Scribd-Unternehmen logo
1 von 40
SoC HPC: Design and Optimization
Mark Delgado
BS in Nuclear Engineering From NC State
Python User
Presentation Topics
 Why?
 SoC Choices and Economics
 Software and IT Stack
 Cluster Design and Decisions
 Optimizations and Improvements
 What has been done today
 What will be done tomorrow
Not Presentation Topics
 Calculation and Data Decisions
 Data Acquisition
 Parameter Selections
 Application Strategies
 Broker Selection and Integration
 Heavy Quantitative Finance
 Cluster Application Strategies
 Source Code
Why?
 Professional Curiosity, New Challenges, New
Technologies
Project Hypothesis
 Can I build a system that can perform
massive amounts of calculations?
 Can I then use this system to solve problems,
find relationships, and find strategies?
 Can I build or modify the system to take any
strategies and apply them?
What Kind of System? What is HPC?
Titan Supercomputer
Titan Economics
 18,688 Nodes with 16 Cores per Node
 299,008 Total CPU Cores
 18,688 GPUs
 Total Cost: $97,000,000
 Individual Unit? Only $15,000!
SoC Choices and Economics
 Raspberry Pi 3
 1.2 GHz Quad Core ARM, 1GB RAM, $35
 Parallella
 Dual Core ARM, 16 Core RISC CPU, $150
 Odroid-XU4
 Quad Core ARM 1.5 GHz, Quad Core ARM 2.0GHz,
2GB RAM, $75
SoC vs Server?
 XU4 Energy Requirements:
 20 Watts
 Server Energy Requirements:
 750 Watts
 Total Yearly Cost of Server
 ~$725
 Total Yearly Cost of XU4
 ~$89
Software and IT Stack
Software and IT Stack
 1 Gbps switch
 Cat6 Cables
 1 Gbps Supporting SoC and Laptop
 Configured and Mounted NFSv4 Folders and
Partitions
 SSH access
Software and IT Stack
 What is the System Being Designed for?
 Ease of Use and Support?


 Less Ease, less support, more performance?
Software and IT Stack
 Pure and Raw Performance?




 Less Support, More Difficult to Use
 Difficult to Setup, Difficult to Hand-off
 5-10% increase, modern software
Software and IT Stack
 Languages Used:
 Python, Cython, C/C++
 Message Passing
 OpenMPI, 0mq
 Networking
 0mq
 Database
 MongoDB
Software and IT Stack
 Python Modules:
 Message Passing
 Pyzmq, mpi4py
 Networking
 pyzmq
 Database
 PyMongo
All Modules found on PIP!
Software and IT Stack
Cluster Design and Decisions
 The Buy Strategy: MACD Cross Over
 The Sell Strategy: TP/SL
 Timeframe: Weekly
 Data Resolution: Minute
 Question: Using a MACD Cross Over as a buy
strategy, and a TP/SL as a sell strategy, is
there a combination that yields higher ROI vs
the weekly ROI of that equity?
Cluster Design and Decisions
 Hypothesis: YES!
 Problem:
 f(a,b,c,tp,sl) a=2..100, b=2..100, c=2..100, tp=1..10,
sl=1..10
 98**3*10**2*37s = ~6600 years of calculations
 Solution:
 Parallelization, Network Optimization, Algo
Optimization

Cluster Design and Decisions
 Lesson 0: Memory > Database
 15 second query done every calculation
 New time: ~4000 years
Cluster Design and Decisions
 0mq Pub/Sub Network Architecture
Cluster Design and Decision
 Lesson 1: Avoid ‘Pre-Processing’ Data
More Gbps = More Time
Cluster Design and Decisions
 New Calculation time, ~2s
 New Total time, 11.1 years
Cluster Design and Decisions
 Lesson 2: Memory > Network
Cluster Design and Decisions
 Lesson 3: Parallelize Everything
Cluster Design and Decisions
 Different Designs Yield Different Results
 Control time = 0.6s
 Pub/Sub = ~1s = 11.1 years
 Pub/Sub/Modified = 0.83s = 10.2 years
 Pub/Sub/Modified/Parallel = 0.78s = 9.5 years
Cluster Design and Decisions
 Lesson 4: Cython isn’t always the answer
Still slow, worth exploring?
Cluster Design and Decisions
 Different types of clusters for different
problems
 Previous cluster designs = Centralized
Streaming and Centralized Storage
Cluster Design and Decisions
 Introducing Decentralized Streaming and
Centralized Storage
Cluster Design and Decision
 Lesson 5: Good Memory Management = Good
Results

Cluster Design and Decision
 Removing the network stream reduces the
data transmission time to 0s
 New Calculation time = 1s
 New Total time = 5.56years
Optimizations and Improvements
 Lesson 6: Profile Profile Profile
 What are the pain points in the algo?
 Given the current algo design, what can be
ported to C/Cython?
 Are the parameters ‘good’ ?
Optimizations and Improvements
 Choosing ‘good’ parameters = .5s
 New time = 2.78 years
 Exporting math to C/Cython = .2s
 New time = 1.1 years
 Combining C/Cython and Pypy = .09s
 New time = 0.5 years
 Choosing ‘actually good’ parameters = .06s
***Speculating***
 New Time = .33 years
Optimizations and Improvements
 The problem:
 98**3*10**2*.06s = Total Time
 98**3*10**2 = C
 0.06 = t
 C*t = Total Time
Optimizations and Improvements
 Total Calculation number = 98**3*10**2 =
94,119,200 = C
 Decrease Resolution of C = Cn
 Cn = C*.99
 New time after Cn = .021 years
Optimizations and Improvements
 Lesson 7: IT Automation is Awesome!
Especially when applied to math!
 Use IT automation to determine new values of
Cn and automatically parallelize calculations
 New time=***0.005-0.01 years***
Optimizations and Improvements
 New Estimated Total Time: .01 years
 .01 years = 3.6 days
From 6600 years to 3.6 days
Optimizations and Improvements
 What did we just do?
 S(M1,M2,M3,TP,SL)
 M1=x1→x1*
 M2=x2→x2*
 M3=x3→x3*
 TP=x4→x4*
 SL=x5→x5*

What Has Been Done Today
 Everything except Pypy and C/Cython merge,
IT Automation, and IT Automation + Math
 What can I show you?
 Fully functioning cluster without automation
 Real performance differences between Python and
Pypy
 NFS to aggregate the results
What Will Be Done Tomorrow?
 Pypy and C/Cython merge, IT Automation,
and IT Automation + Math
 Pandas to handle data
 Matplotlib to graph potential strategies
Questions?
 Thanks

Weitere ähnliche Inhalte

Andere mochten auch

Quantum Computers
Quantum ComputersQuantum Computers
Quantum ComputersDeepti.B
 
Distributed computing
Distributed computingDistributed computing
Distributed computingshivli0769
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed SystemsRupsee
 
Soft Skills as Critical Success factors
Soft Skills as Critical Success factorsSoft Skills as Critical Success factors
Soft Skills as Critical Success factorsmanishpn
 
Best topics for seminar
Best topics for seminarBest topics for seminar
Best topics for seminarshilpi nagpal
 
You can create word clouds in PowerPoint
You can create word clouds in PowerPointYou can create word clouds in PowerPoint
You can create word clouds in PowerPointpptcraft.com
 

Andere mochten auch (8)

Quantum Computers
Quantum ComputersQuantum Computers
Quantum Computers
 
Quantum computer ppt
Quantum computer pptQuantum computer ppt
Quantum computer ppt
 
Distributed computing
Distributed computingDistributed computing
Distributed computing
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Distributed Computing
Distributed ComputingDistributed Computing
Distributed Computing
 
Soft Skills as Critical Success factors
Soft Skills as Critical Success factorsSoft Skills as Critical Success factors
Soft Skills as Critical Success factors
 
Best topics for seminar
Best topics for seminarBest topics for seminar
Best topics for seminar
 
You can create word clouds in PowerPoint
You can create word clouds in PowerPointYou can create word clouds in PowerPoint
You can create word clouds in PowerPoint
 

Ähnlich wie SoC HPC: Design, Optimization, and Application to Algorithmic Trading

Adtech scala-performance-tuning-150323223738-conversion-gate01
Adtech scala-performance-tuning-150323223738-conversion-gate01Adtech scala-performance-tuning-150323223738-conversion-gate01
Adtech scala-performance-tuning-150323223738-conversion-gate01Giridhar Addepalli
 
Adtech x Scala x Performance tuning
Adtech x Scala x Performance tuningAdtech x Scala x Performance tuning
Adtech x Scala x Performance tuningYosuke Mizutani
 
Scaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, GoalsScaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, Goalskamaelian
 
Computer architecture short note (version 8)
Computer architecture short note (version 8)Computer architecture short note (version 8)
Computer architecture short note (version 8)Nimmi Weeraddana
 
Prespective analytics with DOcplex and pandas
Prespective analytics with DOcplex and pandasPrespective analytics with DOcplex and pandas
Prespective analytics with DOcplex and pandasPyDataParis
 
Master's Thesis - climateprediction.net: A Cloudy Approach
Master's Thesis - climateprediction.net: A Cloudy ApproachMaster's Thesis - climateprediction.net: A Cloudy Approach
Master's Thesis - climateprediction.net: A Cloudy Approachkabute
 
High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...
High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...
High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...EUDAT
 
What’s eating python performance
What’s eating python performanceWhat’s eating python performance
What’s eating python performancePiotr Przymus
 
Qualcomm Webinar: Solving Unsolvable Combinatorial Problems with AI
Qualcomm Webinar: Solving Unsolvable Combinatorial Problems with AIQualcomm Webinar: Solving Unsolvable Combinatorial Problems with AI
Qualcomm Webinar: Solving Unsolvable Combinatorial Problems with AIQualcomm Research
 
Volodymyr Lyubinets. One startup's journey of building ML pipelines for text ...
Volodymyr Lyubinets. One startup's journey of building ML pipelines for text ...Volodymyr Lyubinets. One startup's journey of building ML pipelines for text ...
Volodymyr Lyubinets. One startup's journey of building ML pipelines for text ...Lviv Startup Club
 
Forecasting database performance
Forecasting database performanceForecasting database performance
Forecasting database performanceShenglin Du
 
Kusto (Azure Data Explorer) Training for R&D - January 2019
Kusto (Azure Data Explorer) Training for R&D - January 2019 Kusto (Azure Data Explorer) Training for R&D - January 2019
Kusto (Azure Data Explorer) Training for R&D - January 2019 Tal Bar-Zvi
 
In datacenter performance analysis of a tensor processing unit
In datacenter performance analysis of a tensor processing unitIn datacenter performance analysis of a tensor processing unit
In datacenter performance analysis of a tensor processing unitJinwon Lee
 
HPC Cluster Computing from 64 to 156,000 Cores 
HPC Cluster Computing from 64 to 156,000 Cores HPC Cluster Computing from 64 to 156,000 Cores 
HPC Cluster Computing from 64 to 156,000 Cores inside-BigData.com
 
Unit i-introduction
Unit i-introductionUnit i-introduction
Unit i-introductionakruthi k
 
Performance Analysis and Optimizations of CAE Applications (Case Study: STAR_...
Performance Analysis and Optimizations of CAE Applications (Case Study: STAR_...Performance Analysis and Optimizations of CAE Applications (Case Study: STAR_...
Performance Analysis and Optimizations of CAE Applications (Case Study: STAR_...Fisnik Kraja
 
Augmenting Amdahl's Second Law for Cost-Effective and Balanced HPC Infrastruc...
Augmenting Amdahl's Second Law for Cost-Effective and Balanced HPC Infrastruc...Augmenting Amdahl's Second Law for Cost-Effective and Balanced HPC Infrastruc...
Augmenting Amdahl's Second Law for Cost-Effective and Balanced HPC Infrastruc...Arghya Kusum Das
 

Ähnlich wie SoC HPC: Design, Optimization, and Application to Algorithmic Trading (20)

Adtech scala-performance-tuning-150323223738-conversion-gate01
Adtech scala-performance-tuning-150323223738-conversion-gate01Adtech scala-performance-tuning-150323223738-conversion-gate01
Adtech scala-performance-tuning-150323223738-conversion-gate01
 
Adtech x Scala x Performance tuning
Adtech x Scala x Performance tuningAdtech x Scala x Performance tuning
Adtech x Scala x Performance tuning
 
Scaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, GoalsScaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, Goals
 
Computer architecture short note (version 8)
Computer architecture short note (version 8)Computer architecture short note (version 8)
Computer architecture short note (version 8)
 
Prespective analytics with DOcplex and pandas
Prespective analytics with DOcplex and pandasPrespective analytics with DOcplex and pandas
Prespective analytics with DOcplex and pandas
 
Master's Thesis - climateprediction.net: A Cloudy Approach
Master's Thesis - climateprediction.net: A Cloudy ApproachMaster's Thesis - climateprediction.net: A Cloudy Approach
Master's Thesis - climateprediction.net: A Cloudy Approach
 
Ch1
Ch1Ch1
Ch1
 
Ch1
Ch1Ch1
Ch1
 
High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...
High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...
High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...
 
OpenPOWER Boot camp in Zurich
OpenPOWER Boot camp in ZurichOpenPOWER Boot camp in Zurich
OpenPOWER Boot camp in Zurich
 
What’s eating python performance
What’s eating python performanceWhat’s eating python performance
What’s eating python performance
 
Qualcomm Webinar: Solving Unsolvable Combinatorial Problems with AI
Qualcomm Webinar: Solving Unsolvable Combinatorial Problems with AIQualcomm Webinar: Solving Unsolvable Combinatorial Problems with AI
Qualcomm Webinar: Solving Unsolvable Combinatorial Problems with AI
 
Volodymyr Lyubinets. One startup's journey of building ML pipelines for text ...
Volodymyr Lyubinets. One startup's journey of building ML pipelines for text ...Volodymyr Lyubinets. One startup's journey of building ML pipelines for text ...
Volodymyr Lyubinets. One startup's journey of building ML pipelines for text ...
 
Forecasting database performance
Forecasting database performanceForecasting database performance
Forecasting database performance
 
Kusto (Azure Data Explorer) Training for R&D - January 2019
Kusto (Azure Data Explorer) Training for R&D - January 2019 Kusto (Azure Data Explorer) Training for R&D - January 2019
Kusto (Azure Data Explorer) Training for R&D - January 2019
 
In datacenter performance analysis of a tensor processing unit
In datacenter performance analysis of a tensor processing unitIn datacenter performance analysis of a tensor processing unit
In datacenter performance analysis of a tensor processing unit
 
HPC Cluster Computing from 64 to 156,000 Cores 
HPC Cluster Computing from 64 to 156,000 Cores HPC Cluster Computing from 64 to 156,000 Cores 
HPC Cluster Computing from 64 to 156,000 Cores 
 
Unit i-introduction
Unit i-introductionUnit i-introduction
Unit i-introduction
 
Performance Analysis and Optimizations of CAE Applications (Case Study: STAR_...
Performance Analysis and Optimizations of CAE Applications (Case Study: STAR_...Performance Analysis and Optimizations of CAE Applications (Case Study: STAR_...
Performance Analysis and Optimizations of CAE Applications (Case Study: STAR_...
 
Augmenting Amdahl's Second Law for Cost-Effective and Balanced HPC Infrastruc...
Augmenting Amdahl's Second Law for Cost-Effective and Balanced HPC Infrastruc...Augmenting Amdahl's Second Law for Cost-Effective and Balanced HPC Infrastruc...
Augmenting Amdahl's Second Law for Cost-Effective and Balanced HPC Infrastruc...
 

Kürzlich hochgeladen

Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimaginedpanagenda
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastUXDXConf
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsStefano
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 

Kürzlich hochgeladen (20)

Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 

SoC HPC: Design, Optimization, and Application to Algorithmic Trading

  • 1. SoC HPC: Design and Optimization Mark Delgado BS in Nuclear Engineering From NC State Python User
  • 2. Presentation Topics  Why?  SoC Choices and Economics  Software and IT Stack  Cluster Design and Decisions  Optimizations and Improvements  What has been done today  What will be done tomorrow
  • 3. Not Presentation Topics  Calculation and Data Decisions  Data Acquisition  Parameter Selections  Application Strategies  Broker Selection and Integration  Heavy Quantitative Finance  Cluster Application Strategies  Source Code
  • 4. Why?  Professional Curiosity, New Challenges, New Technologies
  • 5. Project Hypothesis  Can I build a system that can perform massive amounts of calculations?  Can I then use this system to solve problems, find relationships, and find strategies?  Can I build or modify the system to take any strategies and apply them?
  • 6. What Kind of System? What is HPC? Titan Supercomputer
  • 7. Titan Economics  18,688 Nodes with 16 Cores per Node  299,008 Total CPU Cores  18,688 GPUs  Total Cost: $97,000,000  Individual Unit? Only $15,000!
  • 8. SoC Choices and Economics  Raspberry Pi 3  1.2 GHz Quad Core ARM, 1GB RAM, $35  Parallella  Dual Core ARM, 16 Core RISC CPU, $150  Odroid-XU4  Quad Core ARM 1.5 GHz, Quad Core ARM 2.0GHz, 2GB RAM, $75
  • 9. SoC vs Server?  XU4 Energy Requirements:  20 Watts  Server Energy Requirements:  750 Watts  Total Yearly Cost of Server  ~$725  Total Yearly Cost of XU4  ~$89
  • 11. Software and IT Stack  1 Gbps switch  Cat6 Cables  1 Gbps Supporting SoC and Laptop  Configured and Mounted NFSv4 Folders and Partitions  SSH access
  • 12. Software and IT Stack  What is the System Being Designed for?  Ease of Use and Support?    Less Ease, less support, more performance?
  • 13. Software and IT Stack  Pure and Raw Performance?      Less Support, More Difficult to Use  Difficult to Setup, Difficult to Hand-off  5-10% increase, modern software
  • 14. Software and IT Stack  Languages Used:  Python, Cython, C/C++  Message Passing  OpenMPI, 0mq  Networking  0mq  Database  MongoDB
  • 15. Software and IT Stack  Python Modules:  Message Passing  Pyzmq, mpi4py  Networking  pyzmq  Database  PyMongo All Modules found on PIP!
  • 17. Cluster Design and Decisions  The Buy Strategy: MACD Cross Over  The Sell Strategy: TP/SL  Timeframe: Weekly  Data Resolution: Minute  Question: Using a MACD Cross Over as a buy strategy, and a TP/SL as a sell strategy, is there a combination that yields higher ROI vs the weekly ROI of that equity?
  • 18. Cluster Design and Decisions  Hypothesis: YES!  Problem:  f(a,b,c,tp,sl) a=2..100, b=2..100, c=2..100, tp=1..10, sl=1..10  98**3*10**2*37s = ~6600 years of calculations  Solution:  Parallelization, Network Optimization, Algo Optimization 
  • 19. Cluster Design and Decisions  Lesson 0: Memory > Database  15 second query done every calculation  New time: ~4000 years
  • 20. Cluster Design and Decisions  0mq Pub/Sub Network Architecture
  • 21. Cluster Design and Decision  Lesson 1: Avoid ‘Pre-Processing’ Data More Gbps = More Time
  • 22. Cluster Design and Decisions  New Calculation time, ~2s  New Total time, 11.1 years
  • 23. Cluster Design and Decisions  Lesson 2: Memory > Network
  • 24. Cluster Design and Decisions  Lesson 3: Parallelize Everything
  • 25. Cluster Design and Decisions  Different Designs Yield Different Results  Control time = 0.6s  Pub/Sub = ~1s = 11.1 years  Pub/Sub/Modified = 0.83s = 10.2 years  Pub/Sub/Modified/Parallel = 0.78s = 9.5 years
  • 26. Cluster Design and Decisions  Lesson 4: Cython isn’t always the answer Still slow, worth exploring?
  • 27. Cluster Design and Decisions  Different types of clusters for different problems  Previous cluster designs = Centralized Streaming and Centralized Storage
  • 28. Cluster Design and Decisions  Introducing Decentralized Streaming and Centralized Storage
  • 29. Cluster Design and Decision  Lesson 5: Good Memory Management = Good Results 
  • 30. Cluster Design and Decision  Removing the network stream reduces the data transmission time to 0s  New Calculation time = 1s  New Total time = 5.56years
  • 31. Optimizations and Improvements  Lesson 6: Profile Profile Profile  What are the pain points in the algo?  Given the current algo design, what can be ported to C/Cython?  Are the parameters ‘good’ ?
  • 32. Optimizations and Improvements  Choosing ‘good’ parameters = .5s  New time = 2.78 years  Exporting math to C/Cython = .2s  New time = 1.1 years  Combining C/Cython and Pypy = .09s  New time = 0.5 years  Choosing ‘actually good’ parameters = .06s ***Speculating***  New Time = .33 years
  • 33. Optimizations and Improvements  The problem:  98**3*10**2*.06s = Total Time  98**3*10**2 = C  0.06 = t  C*t = Total Time
  • 34. Optimizations and Improvements  Total Calculation number = 98**3*10**2 = 94,119,200 = C  Decrease Resolution of C = Cn  Cn = C*.99  New time after Cn = .021 years
  • 35. Optimizations and Improvements  Lesson 7: IT Automation is Awesome! Especially when applied to math!  Use IT automation to determine new values of Cn and automatically parallelize calculations  New time=***0.005-0.01 years***
  • 36. Optimizations and Improvements  New Estimated Total Time: .01 years  .01 years = 3.6 days From 6600 years to 3.6 days
  • 37. Optimizations and Improvements  What did we just do?  S(M1,M2,M3,TP,SL)  M1=x1→x1*  M2=x2→x2*  M3=x3→x3*  TP=x4→x4*  SL=x5→x5* 
  • 38. What Has Been Done Today  Everything except Pypy and C/Cython merge, IT Automation, and IT Automation + Math  What can I show you?  Fully functioning cluster without automation  Real performance differences between Python and Pypy  NFS to aggregate the results
  • 39. What Will Be Done Tomorrow?  Pypy and C/Cython merge, IT Automation, and IT Automation + Math  Pandas to handle data  Matplotlib to graph potential strategies