SlideShare a Scribd company logo
Performance Modeling and
Simulation for Accumulo
Applications
Adam Fuchs
CTO, Sqrrl Data, Inc.
October 16, 2017
© 2017 Sqrrl Data, Inc. All rights reserved. 2
Modeling and Simulation with Accumulo
Goals:
Optimize performance in code and configuration
Discover unexpected factors affecting performance and scalability
Reduce risk when extrapolating performance to large customer sizes (10+PB) over long periods of
time (years)
Types used by Sqrrl:
Micro-benchmarking
Drive scoped-down tests with actual code
Iterate with code changes to optimize
Analog Simulator
Track scheduling and side-effects of operations without actually running them
Simulate large clusters and long periods of time quickly on a single machine
Predictive model validation
Predict performance and scalability mathematically (e.g. spreadsheet model)
Full-scope tests instrumented with measurements to validate model
© 2017 Sqrrl Data, Inc. All rights reserved. 3
Technique #1: Micro-Benchmarking
Optimize the crap out of operations in tight loops
Isolate components to simplify interpretation of results
Example: RFileSortingOutputFormat
Produce RFiles from randomly ordered Key/Value Pairs
Input
Data
(Split)
Record
Reader
Mapper
Context
(Collector)
In-Memory
Buffer
(~1GB)
Sorted
RFile1
Sorted
RFileN
Sort / Spill
...
Micro-Benchmarking
Candidates
© 2017 Sqrrl Data, Inc. All rights reserved. 4
Micro Benchmarking Setup
Process:
1. Benchmark
2. Compare
3. Rewrite
4. Repeat
UsefulTools:
• JMH (Java Microbenchmarking Harness)
• Sampling profiler, like JVisualVM
main() {
startTime = now()
for(i = 0; i < many; i++) {
do.thing()
}
endTime = now()
print(endTime - startTime)
}
© 2017 Sqrrl Data, Inc. All rights reserved. 5
Insights GainedThrough Micro-Benchmarking
Serialization/deserialization of Keys can be very expensive
Holding onto objects makes Java sad
Sort boils down to compare and swap
minimize the number of bytes to compare for sorting via hierarchical organization
minimize the cost of swapping
Other attempted optimization: Quicksort vs. merge sort
Merge sort has tighter worst-case bound
Quicksort faster in practice (probably dominated by cache fetches)
Quicker to merge in ideas like this with micro-benchmarking
Next steps:
1. Code with best known algorithms and design patterns
2. Measure again
© 2017 Sqrrl Data, Inc. All rights reserved. 6
RFileSortingOutputFormat Sort Buffer Design
Key/Value Buffer
tuple(CQ,Vis)
value length
value
Metadata Buffers
...
tuple(CQ,Vis)
value length
value
...
Row ColFam
Length Offset
Length Offset
Length Offset
Length Offset
Length Offset
Length Offset
...
...
Row ColFam
Length Offset
Length Offset
Length Offset
Length Offset
Length Offset
Length Offset
...
...
© 2017 Sqrrl Data, Inc. All rights reserved. 7
Micro-Benchmarking: RFileSortingOutputFormat Performance
10 million random keys sorted and written in 17-20 seconds per thread
Up to ~588,000 key/value pairs per second per thread
On one 20-core node, scaled up to ~7,000,000 key/value pairs per second
generated, sorted, and written to disk
© 2017 Sqrrl Data, Inc. All rights reserved. 8
Technique #2: Analog Simulation
Test bigger than you can afford to test!
Example: Optimize Query and Compaction I/O
Explore performance of various key designs and configuration
Optimize Write-Amplification Factor (WAF) due to long-term compactions
Optimize query latency, tied to number of RFiles per tablet at any time
Input Organization and
Maintenance
Output
© 2017 Sqrrl Data, Inc. All rights reserved. 9
Document-Distributed IndexTable Design
Document Query
Ingest	Process Query	Process
Document StoreTable
Forward Index
Inverted Index
Forward Index
Inverted Index
Forward Index
Inverted Index
Forward Index
Inverted Index
Forward Index
Inverted Index
© 2017 Sqrrl Data, Inc. All rights reserved. 10
Tablet Files
Compaction Algorithm
File
Size
1. Pick the maximal set of files F that satisfies:
sum(f) / max(f) > Ratio
2. Compact F into a new file f’
Candidate Set F
4.92
1.52
= 3.24 > 3.0 þ
© 2017 Sqrrl Data, Inc. All rights reserved. 11
LSMTree
RFile
RFile
RFile
RFile
RFile
RFile
Compact!
Compact!
Time
© 2017 Sqrrl Data, Inc. All rights reserved. 12
Simulator Loop
main() { ...
while (queue not
empty) {
event =
queue.pop();
event.process();
}
}
Event {
final long eventTime;
process() {
modState();
genEvents();
...
}
}
PriorityQueue<Event>
(ordered by time)
© 2017 Sqrrl Data, Inc. All rights reserved. 13
Simulator Design
Simulate:
Ingest
Triggered compactions
Timed events for:
Bulk load of new files
Compaction start, end
Measure:
Files to tablet counts over time
Total input
Total bytes
Designs to explore:
Key design, partitioning
Compaction strategies
Ingest Event
Generator
Compaction
Simulator
Ingest
Simulator
Tablet State
Model
Measurement
Apparatus
Event Queue
© 2017 Sqrrl Data, Inc. All rights reserved. 14
Example Simulator Execution
• Inputs from default configs,
micro-benchmarking, and
other simulations
• Intermediate measurements
give hints about possible
issues
• Simplified optimization
scores focus on small
number of dimensions
• 7 days and 20GB simulated
in under a second
Input Parameters:
Compaction ratio: 4.0
Compaction rate: 2643.0 bytes/ms
Max compacted file size: 1073741824000 bytes
Last input time: 604800000 ms
Num files per drop: 1.1
Bytes per drop: 10485760
File size stddev: 1048576
File drop period: 300000 ms
Results:
Last Input Time: 604800000 ms
End time: 604800000 ms
Time compacting: 35179342 ms
Compaction portion: 0.058166901455026454
Active tablets supported per compaction thread: 17
Max concurrent files: 32
Max files per compaction: 20
Max compaction size: 16211724213 bytes
Max compaction time: 6133834 ms
Final file count: 7
Total Events: 2486
Total Compactions: 469
Total MajC Writes: 92979631364 bytes
Total Input Writes: 21204489777 bytes
Final Size (GB): 19.748220012523234
Write Amplification Factor: 5.384903024870363
Average files over time: 8.666971808862433
© 2017 Sqrrl Data, Inc. All rights reserved. 15
Simulator Insights
Different compression codec for small vs. large compactions
Limit maximum file size for compaction
WAF optimized with roughly 1-week time partitioning in our application
Other recent uses of simulators:
Query readahead threadpool improvements
Secondary compaction threadpool
Bulk index creation partitioning optimization
© 2017 Sqrrl Data, Inc. All rights reserved. 16
Technique #3: Predictive ModelValidation
Use knowledge of application to build predictive performance model
Avoid “explaining” observations
Minimize model fitting parameters
Instrument whole-stack application with key performance indicators
Run performance tests with enough variety to fit parameter and validate model
Extra credit: include some factors that aren’t model parameters
Validates non-relevance
Prioritize by “most likely relevant”
Analyze the difference between the prediction and the observations
Refine model
Iterate
© 2017 Sqrrl Data, Inc. All rights reserved. 17
Predictive ModelValidation: Example
Query: filtered graph search
implemented in Accumulo iterators
Accumulo’s iterators support both
next() and seek()
Time to call next() and seek() is
relatively uniform (big hand-wave here)
Prediction: I/O-bound query runtime
proportional to total next and seek calls
Modeling performance ó accounting
for next() and seek() calls
SPREADSHEETS
FOR
BIG DATA!
© 2017 Sqrrl Data, Inc. All rights reserved. 19
Predictive ModelValidation: Spreadsheets!
Model Version 7:
© 2017 Sqrrl Data, Inc. All rights reserved. 20
Predictive ModelValidation: Insights
Some iterators are seeking/scanning more than optimal
Logic tweak cuts seeks in half
Total of all scans and seeks is way more than expected
Re-ordering filter hierarchy allows for fewer, bigger seeks
Next steps:
1. Improve the code
2. Re-validate with new code
© 2017 Sqrrl Data, Inc. All rights reserved. 21
Predictive ModelValidation: Improvements
25X Predicted
Improvement
New Iterator
Model Version 12:
© 2017 Sqrrl Data, Inc. All rights reserved. 22
Takeaways
Performance is not good until you prove it!
Don’t expect performance to be optimal the first time
Measure early
Leave time for optimization
Measure often
Micro-benchmarking, simulation, and predictive model validation:
Learn ’em
Use ’em
Love ’em
Ping me if you want help getting organized or getting started with code and
spreadsheets

More Related Content

What's hot

Changing the tires on a big data racecar
Changing the tires on a big data racecarChanging the tires on a big data racecar
Changing the tires on a big data racecar
David McNelis
 
Ultra Fast Deep Learning in Hybrid Cloud Using Intel Analytics Zoo & Alluxio
Ultra Fast Deep Learning in Hybrid Cloud Using Intel Analytics Zoo & AlluxioUltra Fast Deep Learning in Hybrid Cloud Using Intel Analytics Zoo & Alluxio
Ultra Fast Deep Learning in Hybrid Cloud Using Intel Analytics Zoo & Alluxio
Alluxio, Inc.
 
Deep Learning in the Cloud at Scale: A Data Orchestration Story
Deep Learning in the Cloud at Scale: A Data Orchestration StoryDeep Learning in the Cloud at Scale: A Data Orchestration Story
Deep Learning in the Cloud at Scale: A Data Orchestration Story
Alluxio, Inc.
 
C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...
C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...
C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...
DataStax
 
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
Altinity Ltd
 
53
5353
Distributed deep learning
Distributed deep learningDistributed deep learning
Distributed deep learning
Mehdi Shibahara
 
Greenplum for Kubernetes - Greenplum Summit 2019
Greenplum for Kubernetes - Greenplum Summit 2019Greenplum for Kubernetes - Greenplum Summit 2019
Greenplum for Kubernetes - Greenplum Summit 2019
VMware Tanzu
 
Introducing the Hub for Data Orchestration
Introducing the Hub for Data OrchestrationIntroducing the Hub for Data Orchestration
Introducing the Hub for Data Orchestration
Alluxio, Inc.
 
Spark Summit EU talk by Ahsan Javed Awan
Spark Summit EU talk by Ahsan Javed AwanSpark Summit EU talk by Ahsan Javed Awan
Spark Summit EU talk by Ahsan Javed Awan
Spark Summit
 
How Adobe uses Structured Streaming at Scale
How Adobe uses Structured Streaming at ScaleHow Adobe uses Structured Streaming at Scale
How Adobe uses Structured Streaming at Scale
Databricks
 
Hadoop + GPU
Hadoop + GPUHadoop + GPU
Hadoop + GPU
Vladimir Starostenkov
 
Machine learning at scale with Google Cloud Platform
Machine learning at scale with Google Cloud PlatformMachine learning at scale with Google Cloud Platform
Machine learning at scale with Google Cloud Platform
Matthias Feys
 
Pivotal Greenplum Cloud Marketplaces - Greenplum Summit 2019
Pivotal Greenplum Cloud Marketplaces - Greenplum Summit 2019Pivotal Greenplum Cloud Marketplaces - Greenplum Summit 2019
Pivotal Greenplum Cloud Marketplaces - Greenplum Summit 2019
VMware Tanzu
 
On-Prem Solution for the Selection of Wind Energy Models
On-Prem Solution for the Selection of Wind Energy ModelsOn-Prem Solution for the Selection of Wind Energy Models
On-Prem Solution for the Selection of Wind Energy Models
Databricks
 
Enterprise Distributed Query Service powered by Presto & Alluxio across cloud...
Enterprise Distributed Query Service powered by Presto & Alluxio across cloud...Enterprise Distributed Query Service powered by Presto & Alluxio across cloud...
Enterprise Distributed Query Service powered by Presto & Alluxio across cloud...
Alluxio, Inc.
 
Spark Summit EU talk by Kaarthik Sivashanmugam
Spark Summit EU talk by Kaarthik SivashanmugamSpark Summit EU talk by Kaarthik Sivashanmugam
Spark Summit EU talk by Kaarthik Sivashanmugam
Spark Summit
 
Blue Pill/Red Pill: The Matrix of Thousands of Data Streams
Blue Pill/Red Pill: The Matrix of Thousands of Data StreamsBlue Pill/Red Pill: The Matrix of Thousands of Data Streams
Blue Pill/Red Pill: The Matrix of Thousands of Data Streams
Databricks
 
Spark and the Future of Advanced Analytics by Thomas Dinsmore
Spark and the Future of Advanced Analytics by Thomas DinsmoreSpark and the Future of Advanced Analytics by Thomas Dinsmore
Spark and the Future of Advanced Analytics by Thomas Dinsmore
Spark Summit
 
Apache Spark vs Apache Spark: An On-Prem Comparison of Databricks and Open-So...
Apache Spark vs Apache Spark: An On-Prem Comparison of Databricks and Open-So...Apache Spark vs Apache Spark: An On-Prem Comparison of Databricks and Open-So...
Apache Spark vs Apache Spark: An On-Prem Comparison of Databricks and Open-So...
Databricks
 

What's hot (20)

Changing the tires on a big data racecar
Changing the tires on a big data racecarChanging the tires on a big data racecar
Changing the tires on a big data racecar
 
Ultra Fast Deep Learning in Hybrid Cloud Using Intel Analytics Zoo & Alluxio
Ultra Fast Deep Learning in Hybrid Cloud Using Intel Analytics Zoo & AlluxioUltra Fast Deep Learning in Hybrid Cloud Using Intel Analytics Zoo & Alluxio
Ultra Fast Deep Learning in Hybrid Cloud Using Intel Analytics Zoo & Alluxio
 
Deep Learning in the Cloud at Scale: A Data Orchestration Story
Deep Learning in the Cloud at Scale: A Data Orchestration StoryDeep Learning in the Cloud at Scale: A Data Orchestration Story
Deep Learning in the Cloud at Scale: A Data Orchestration Story
 
C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...
C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...
C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...
 
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
ClickHouse Paris Meetup. Pragma Analytics Software Suite w/ClickHouse, by Mat...
 
53
5353
53
 
Distributed deep learning
Distributed deep learningDistributed deep learning
Distributed deep learning
 
Greenplum for Kubernetes - Greenplum Summit 2019
Greenplum for Kubernetes - Greenplum Summit 2019Greenplum for Kubernetes - Greenplum Summit 2019
Greenplum for Kubernetes - Greenplum Summit 2019
 
Introducing the Hub for Data Orchestration
Introducing the Hub for Data OrchestrationIntroducing the Hub for Data Orchestration
Introducing the Hub for Data Orchestration
 
Spark Summit EU talk by Ahsan Javed Awan
Spark Summit EU talk by Ahsan Javed AwanSpark Summit EU talk by Ahsan Javed Awan
Spark Summit EU talk by Ahsan Javed Awan
 
How Adobe uses Structured Streaming at Scale
How Adobe uses Structured Streaming at ScaleHow Adobe uses Structured Streaming at Scale
How Adobe uses Structured Streaming at Scale
 
Hadoop + GPU
Hadoop + GPUHadoop + GPU
Hadoop + GPU
 
Machine learning at scale with Google Cloud Platform
Machine learning at scale with Google Cloud PlatformMachine learning at scale with Google Cloud Platform
Machine learning at scale with Google Cloud Platform
 
Pivotal Greenplum Cloud Marketplaces - Greenplum Summit 2019
Pivotal Greenplum Cloud Marketplaces - Greenplum Summit 2019Pivotal Greenplum Cloud Marketplaces - Greenplum Summit 2019
Pivotal Greenplum Cloud Marketplaces - Greenplum Summit 2019
 
On-Prem Solution for the Selection of Wind Energy Models
On-Prem Solution for the Selection of Wind Energy ModelsOn-Prem Solution for the Selection of Wind Energy Models
On-Prem Solution for the Selection of Wind Energy Models
 
Enterprise Distributed Query Service powered by Presto & Alluxio across cloud...
Enterprise Distributed Query Service powered by Presto & Alluxio across cloud...Enterprise Distributed Query Service powered by Presto & Alluxio across cloud...
Enterprise Distributed Query Service powered by Presto & Alluxio across cloud...
 
Spark Summit EU talk by Kaarthik Sivashanmugam
Spark Summit EU talk by Kaarthik SivashanmugamSpark Summit EU talk by Kaarthik Sivashanmugam
Spark Summit EU talk by Kaarthik Sivashanmugam
 
Blue Pill/Red Pill: The Matrix of Thousands of Data Streams
Blue Pill/Red Pill: The Matrix of Thousands of Data StreamsBlue Pill/Red Pill: The Matrix of Thousands of Data Streams
Blue Pill/Red Pill: The Matrix of Thousands of Data Streams
 
Spark and the Future of Advanced Analytics by Thomas Dinsmore
Spark and the Future of Advanced Analytics by Thomas DinsmoreSpark and the Future of Advanced Analytics by Thomas Dinsmore
Spark and the Future of Advanced Analytics by Thomas Dinsmore
 
Apache Spark vs Apache Spark: An On-Prem Comparison of Databricks and Open-So...
Apache Spark vs Apache Spark: An On-Prem Comparison of Databricks and Open-So...Apache Spark vs Apache Spark: An On-Prem Comparison of Databricks and Open-So...
Apache Spark vs Apache Spark: An On-Prem Comparison of Databricks and Open-So...
 

Similar to Performance modeling and simulation for accumulo applications

TensorFlow 16: Building a Data Science Platform
TensorFlow 16: Building a Data Science Platform TensorFlow 16: Building a Data Science Platform
TensorFlow 16: Building a Data Science Platform
Seldon
 
Webinar: Cutting Time, Complexity and Cost from Data Science to Production
Webinar: Cutting Time, Complexity and Cost from Data Science to ProductionWebinar: Cutting Time, Complexity and Cost from Data Science to Production
Webinar: Cutting Time, Complexity and Cost from Data Science to Production
iguazio
 
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
CA Technologies
 
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
CA Technologies
 
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
Giridhar Addepalli
 
Adtech x Scala x Performance tuning
Adtech x Scala x Performance tuningAdtech x Scala x Performance tuning
Adtech x Scala x Performance tuning
Yosuke Mizutani
 
Presentation mongo db munich
Presentation mongo db munichPresentation mongo db munich
Presentation mongo db munichMongoDB
 
The CAOS framework: Democratize the acceleration of compute intensive applica...
The CAOS framework: Democratize the acceleration of compute intensive applica...The CAOS framework: Democratize the acceleration of compute intensive applica...
The CAOS framework: Democratize the acceleration of compute intensive applica...
NECST Lab @ Politecnico di Milano
 
Applying Cloud Techniques to Address Complexity in HPC System Integrations
Applying Cloud Techniques to Address Complexity in HPC System IntegrationsApplying Cloud Techniques to Address Complexity in HPC System Integrations
Applying Cloud Techniques to Address Complexity in HPC System Integrations
inside-BigData.com
 
LEGaTO: Use cases
LEGaTO: Use casesLEGaTO: Use cases
LEGaTO: Use cases
LEGATO project
 
Intelligent Monitoring
Intelligent MonitoringIntelligent Monitoring
Intelligent Monitoring
Intelie
 
Challenges in Embedded Development
Challenges in Embedded DevelopmentChallenges in Embedded Development
Challenges in Embedded Development
SQABD
 
Tuning for Systematic Trading: Talk 2: Deep Learning
Tuning for Systematic Trading: Talk 2: Deep LearningTuning for Systematic Trading: Talk 2: Deep Learning
Tuning for Systematic Trading: Talk 2: Deep Learning
SigOpt
 
Bridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven EngineeringBridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven Engineering
Rafael Ferreira da Silva
 
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Intel® Software
 
Parallel Application Performance Prediction of Using Analysis Based Modeling
Parallel Application Performance Prediction of Using Analysis Based ModelingParallel Application Performance Prediction of Using Analysis Based Modeling
Parallel Application Performance Prediction of Using Analysis Based Modeling
Jason Liu
 

Similar to Performance modeling and simulation for accumulo applications (20)

TensorFlow 16: Building a Data Science Platform
TensorFlow 16: Building a Data Science Platform TensorFlow 16: Building a Data Science Platform
TensorFlow 16: Building a Data Science Platform
 
Dst
DstDst
Dst
 
Webinar: Cutting Time, Complexity and Cost from Data Science to Production
Webinar: Cutting Time, Complexity and Cost from Data Science to ProductionWebinar: Cutting Time, Complexity and Cost from Data Science to Production
Webinar: Cutting Time, Complexity and Cost from Data Science to Production
 
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
 
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
Case Study: How CA Went From 40 Days to Three Days Building Crystal-Clear Tes...
 
Patterns for distributed systems
Patterns for distributed systemsPatterns for distributed systems
Patterns for distributed systems
 
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
 
Presentation mongo db munich
Presentation mongo db munichPresentation mongo db munich
Presentation mongo db munich
 
The CAOS framework: Democratize the acceleration of compute intensive applica...
The CAOS framework: Democratize the acceleration of compute intensive applica...The CAOS framework: Democratize the acceleration of compute intensive applica...
The CAOS framework: Democratize the acceleration of compute intensive applica...
 
Ch1
Ch1Ch1
Ch1
 
Ch1
Ch1Ch1
Ch1
 
Applying Cloud Techniques to Address Complexity in HPC System Integrations
Applying Cloud Techniques to Address Complexity in HPC System IntegrationsApplying Cloud Techniques to Address Complexity in HPC System Integrations
Applying Cloud Techniques to Address Complexity in HPC System Integrations
 
LEGaTO: Use cases
LEGaTO: Use casesLEGaTO: Use cases
LEGaTO: Use cases
 
Intelligent Monitoring
Intelligent MonitoringIntelligent Monitoring
Intelligent Monitoring
 
Challenges in Embedded Development
Challenges in Embedded DevelopmentChallenges in Embedded Development
Challenges in Embedded Development
 
Tuning for Systematic Trading: Talk 2: Deep Learning
Tuning for Systematic Trading: Talk 2: Deep LearningTuning for Systematic Trading: Talk 2: Deep Learning
Tuning for Systematic Trading: Talk 2: Deep Learning
 
Bridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven EngineeringBridging Concepts and Practice in eScience via Simulation-driven Engineering
Bridging Concepts and Practice in eScience via Simulation-driven Engineering
 
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
 
Parallel Application Performance Prediction of Using Analysis Based Modeling
Parallel Application Performance Prediction of Using Analysis Based ModelingParallel Application Performance Prediction of Using Analysis Based Modeling
Parallel Application Performance Prediction of Using Analysis Based Modeling
 

Recently uploaded

一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
ahzuo
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Linda486226
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
NABLAS株式会社
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 

Recently uploaded (20)

一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 

Performance modeling and simulation for accumulo applications

  • 1. Performance Modeling and Simulation for Accumulo Applications Adam Fuchs CTO, Sqrrl Data, Inc. October 16, 2017
  • 2. © 2017 Sqrrl Data, Inc. All rights reserved. 2 Modeling and Simulation with Accumulo Goals: Optimize performance in code and configuration Discover unexpected factors affecting performance and scalability Reduce risk when extrapolating performance to large customer sizes (10+PB) over long periods of time (years) Types used by Sqrrl: Micro-benchmarking Drive scoped-down tests with actual code Iterate with code changes to optimize Analog Simulator Track scheduling and side-effects of operations without actually running them Simulate large clusters and long periods of time quickly on a single machine Predictive model validation Predict performance and scalability mathematically (e.g. spreadsheet model) Full-scope tests instrumented with measurements to validate model
  • 3. © 2017 Sqrrl Data, Inc. All rights reserved. 3 Technique #1: Micro-Benchmarking Optimize the crap out of operations in tight loops Isolate components to simplify interpretation of results Example: RFileSortingOutputFormat Produce RFiles from randomly ordered Key/Value Pairs Input Data (Split) Record Reader Mapper Context (Collector) In-Memory Buffer (~1GB) Sorted RFile1 Sorted RFileN Sort / Spill ... Micro-Benchmarking Candidates
  • 4. © 2017 Sqrrl Data, Inc. All rights reserved. 4 Micro Benchmarking Setup Process: 1. Benchmark 2. Compare 3. Rewrite 4. Repeat UsefulTools: • JMH (Java Microbenchmarking Harness) • Sampling profiler, like JVisualVM main() { startTime = now() for(i = 0; i < many; i++) { do.thing() } endTime = now() print(endTime - startTime) }
  • 5. © 2017 Sqrrl Data, Inc. All rights reserved. 5 Insights GainedThrough Micro-Benchmarking Serialization/deserialization of Keys can be very expensive Holding onto objects makes Java sad Sort boils down to compare and swap minimize the number of bytes to compare for sorting via hierarchical organization minimize the cost of swapping Other attempted optimization: Quicksort vs. merge sort Merge sort has tighter worst-case bound Quicksort faster in practice (probably dominated by cache fetches) Quicker to merge in ideas like this with micro-benchmarking Next steps: 1. Code with best known algorithms and design patterns 2. Measure again
  • 6. © 2017 Sqrrl Data, Inc. All rights reserved. 6 RFileSortingOutputFormat Sort Buffer Design Key/Value Buffer tuple(CQ,Vis) value length value Metadata Buffers ... tuple(CQ,Vis) value length value ... Row ColFam Length Offset Length Offset Length Offset Length Offset Length Offset Length Offset ... ... Row ColFam Length Offset Length Offset Length Offset Length Offset Length Offset Length Offset ... ...
  • 7. © 2017 Sqrrl Data, Inc. All rights reserved. 7 Micro-Benchmarking: RFileSortingOutputFormat Performance 10 million random keys sorted and written in 17-20 seconds per thread Up to ~588,000 key/value pairs per second per thread On one 20-core node, scaled up to ~7,000,000 key/value pairs per second generated, sorted, and written to disk
  • 8. © 2017 Sqrrl Data, Inc. All rights reserved. 8 Technique #2: Analog Simulation Test bigger than you can afford to test! Example: Optimize Query and Compaction I/O Explore performance of various key designs and configuration Optimize Write-Amplification Factor (WAF) due to long-term compactions Optimize query latency, tied to number of RFiles per tablet at any time Input Organization and Maintenance Output
  • 9. © 2017 Sqrrl Data, Inc. All rights reserved. 9 Document-Distributed IndexTable Design Document Query Ingest Process Query Process Document StoreTable Forward Index Inverted Index Forward Index Inverted Index Forward Index Inverted Index Forward Index Inverted Index Forward Index Inverted Index
  • 10. © 2017 Sqrrl Data, Inc. All rights reserved. 10 Tablet Files Compaction Algorithm File Size 1. Pick the maximal set of files F that satisfies: sum(f) / max(f) > Ratio 2. Compact F into a new file f’ Candidate Set F 4.92 1.52 = 3.24 > 3.0 þ
  • 11. © 2017 Sqrrl Data, Inc. All rights reserved. 11 LSMTree RFile RFile RFile RFile RFile RFile Compact! Compact! Time
  • 12. © 2017 Sqrrl Data, Inc. All rights reserved. 12 Simulator Loop main() { ... while (queue not empty) { event = queue.pop(); event.process(); } } Event { final long eventTime; process() { modState(); genEvents(); ... } } PriorityQueue<Event> (ordered by time)
  • 13. © 2017 Sqrrl Data, Inc. All rights reserved. 13 Simulator Design Simulate: Ingest Triggered compactions Timed events for: Bulk load of new files Compaction start, end Measure: Files to tablet counts over time Total input Total bytes Designs to explore: Key design, partitioning Compaction strategies Ingest Event Generator Compaction Simulator Ingest Simulator Tablet State Model Measurement Apparatus Event Queue
  • 14. © 2017 Sqrrl Data, Inc. All rights reserved. 14 Example Simulator Execution • Inputs from default configs, micro-benchmarking, and other simulations • Intermediate measurements give hints about possible issues • Simplified optimization scores focus on small number of dimensions • 7 days and 20GB simulated in under a second Input Parameters: Compaction ratio: 4.0 Compaction rate: 2643.0 bytes/ms Max compacted file size: 1073741824000 bytes Last input time: 604800000 ms Num files per drop: 1.1 Bytes per drop: 10485760 File size stddev: 1048576 File drop period: 300000 ms Results: Last Input Time: 604800000 ms End time: 604800000 ms Time compacting: 35179342 ms Compaction portion: 0.058166901455026454 Active tablets supported per compaction thread: 17 Max concurrent files: 32 Max files per compaction: 20 Max compaction size: 16211724213 bytes Max compaction time: 6133834 ms Final file count: 7 Total Events: 2486 Total Compactions: 469 Total MajC Writes: 92979631364 bytes Total Input Writes: 21204489777 bytes Final Size (GB): 19.748220012523234 Write Amplification Factor: 5.384903024870363 Average files over time: 8.666971808862433
  • 15. © 2017 Sqrrl Data, Inc. All rights reserved. 15 Simulator Insights Different compression codec for small vs. large compactions Limit maximum file size for compaction WAF optimized with roughly 1-week time partitioning in our application Other recent uses of simulators: Query readahead threadpool improvements Secondary compaction threadpool Bulk index creation partitioning optimization
  • 16. © 2017 Sqrrl Data, Inc. All rights reserved. 16 Technique #3: Predictive ModelValidation Use knowledge of application to build predictive performance model Avoid “explaining” observations Minimize model fitting parameters Instrument whole-stack application with key performance indicators Run performance tests with enough variety to fit parameter and validate model Extra credit: include some factors that aren’t model parameters Validates non-relevance Prioritize by “most likely relevant” Analyze the difference between the prediction and the observations Refine model Iterate
  • 17. © 2017 Sqrrl Data, Inc. All rights reserved. 17 Predictive ModelValidation: Example Query: filtered graph search implemented in Accumulo iterators Accumulo’s iterators support both next() and seek() Time to call next() and seek() is relatively uniform (big hand-wave here) Prediction: I/O-bound query runtime proportional to total next and seek calls Modeling performance ó accounting for next() and seek() calls
  • 19. © 2017 Sqrrl Data, Inc. All rights reserved. 19 Predictive ModelValidation: Spreadsheets! Model Version 7:
  • 20. © 2017 Sqrrl Data, Inc. All rights reserved. 20 Predictive ModelValidation: Insights Some iterators are seeking/scanning more than optimal Logic tweak cuts seeks in half Total of all scans and seeks is way more than expected Re-ordering filter hierarchy allows for fewer, bigger seeks Next steps: 1. Improve the code 2. Re-validate with new code
  • 21. © 2017 Sqrrl Data, Inc. All rights reserved. 21 Predictive ModelValidation: Improvements 25X Predicted Improvement New Iterator Model Version 12:
  • 22. © 2017 Sqrrl Data, Inc. All rights reserved. 22 Takeaways Performance is not good until you prove it! Don’t expect performance to be optimal the first time Measure early Leave time for optimization Measure often Micro-benchmarking, simulation, and predictive model validation: Learn ’em Use ’em Love ’em Ping me if you want help getting organized or getting started with code and spreadsheets