SlideShare a Scribd company logo
1 of 70
Download to read offline
PERFORMANCE AND 
PREDICTABILITY 
Richard Warburton 
@richardwarburto 
insightfullogic.com
Why care about low level rubbish? 
Branch Prediction 
Memory Access 
Storage 
Conclusions
Technology or Principles 
“60 messages per second.” 
“8 ElasticSearch servers on AWS, 26 front end proxy 
serves. Double that in backend app servers.” 
60 / (8 + 26 + 2 * 26) = 0.7 messages / server / second. 
http://highscalability.com/blog/2014/1/6/how-hipchat-stores-and-indexes-billions-of-messages-using- 
el.html
“What we need is less hipsters and more 
geeks” 
- Martin Thompson
Performance Discussion 
Product Solutions 
“Just use our library/tool/framework, and everything is web-scale!” 
Architecture Advocacy 
“Always design your software like this.” 
Methodology & Fundamentals 
“Here are some principles and knowledge, use your brain“
Case Study: Messaging 
● 1 Thread reading network data 
● 1 Thread writing network data 
● 1 Thread conducting admin tasks
Unifying Theme: Be Predictable 
An opportunity for an underlying system: 
○ Branch Prediction 
○ Memory Access 
○ Hard Disks
Do you care? 
Many problems not Predictability Related 
Networking 
Database or External Service 
Minimising I/O 
Garbage Collection 
Insufficient Parallelism 
Use an Optimisation Omen
Why care about low level rubbish? 
Branch Prediction 
Memory Access 
Storage 
Conclusions
What 4 things do CPUs actually do?
Fetch, Decode, Execute, Writeback
Pipelined
Super-pipelined & Superscalar
What about branches? 
public static int simple(int x, int y, int z) { 
int ret; 
if (x > 5) { 
ret = y + z; 
} else { 
ret = y; 
} 
return ret; 
}
Branches cause stalls, stalls kill performance
Can we eliminate branches?
Strategy: predict branches and speculatively 
execute
Static Prediction 
A forward branch defaults to not taken 
A backward branch defaults to taken
Conditional Branches 
if(x == 0) { 
x = 1; 
} 
x++; 
mov eax, $x 
cmp eax, 0 
jne end 
mov eax, 1 
end: 
inc eax 
mov $x, eax
Static Hints (Pentium 4 or later) 
__emit 0x3E defaults to taken 
__emit 0x2E defaults to not taken 
don’t use them, flip the branch
Dynamic prediction: record history and 
predict future
Branch Target Buffer (BTB) 
a log of the history of each branch 
also stores the program counter address 
its finite!
Local 
record per conditional branch histories 
Global 
record shared history of conditional jumps
Loop 
specialised predictor when there’s a loop (jumping in a 
cycle n times) 
Function 
specialised buffer for predicted nearby function returns 
N level Adaptive Predictor 
accounts for up patterns of up to N+1 if statements
Optimisation Omen 
Use Performance Event Counters (Model Specific 
Registers) 
Can be configured to store branch prediction 
information 
Profilers & Tooling: perf (linux), VTune, AMD Code 
Analyst, Visual Studio, Oracle Performance Studio
Demo perf
Summary 
CPUs are Super-pipelined and Superscalar 
Branches cause stalls 
Simplify your code! Especially branching logic and 
megamorphic callsites
Why care about low level rubbish? 
Branch Prediction 
Memory Access 
Storage 
Conclusions
The Problem Very Fast 
Relatively Slow
The Solution: CPU Cache 
Core Demands Data, looks at its cache 
If present (a "hit") then data returned to register 
If absent (a "miss") then data looked up from 
memory and stored in the cache 
Fast memory is expensive, a small amount is affordable
Multilevel Cache: Intel Sandybridge 
Physical Core 0 
HT: 2 Logical Cores 
Level 1 
Instruction 
Cache 
Shared Level 3 Cache 
Level 1 
Data 
Cache 
Level 2 Cache 
.... 
Physical Core N 
HT: 2 Logical Cores 
Level 1 
Data 
Cache 
Level 1 
Instruction 
Cache 
Level 2 Cache
How bad is a miss? 
Location Latency in Clockcycles 
Register 0 
L1 Cache 3 
L2 Cache 9 
L3 Cache 21 
Main Memory 150-400
Prefetching 
Eagerly load data 
Adjacent & Streaming Prefetches 
Arrange Data so accesses are predictable
Temporal Locality 
Repeatedly referring to same data in a short time span 
Spatial Locality 
Referring to data that is close together in memory 
Sequential Locality 
Referring to data that is arranged linearly in memory
General Principles 
Use smaller data types (-XX:+UseCompressedOops) 
Avoid 'big holes' in your data 
Make accesses as linear as possible
Primitive Arrays 
// Sequential Access = Predictable 
for (int i=0; i<someArray.length; i++) 
someArray[i]++;
Primitive Arrays - Skipping Elements 
// Holes Hurt 
for (int i=0; i<someArray.length; i += SKIP) 
someArray[i]++;
Primitive Arrays - Skipping Elements
Multidimensional Arrays 
Multidimensional Arrays are really Arrays of 
Arrays in Java. (Unlike C) 
Some people realign their accesses: 
for (int col=0; col<COLS; col++) { 
for (int row=0; row<ROWS; row++) { 
array[ROWS * col + row]++; 
} 
}
Bad Access Alignment 
Strides the wrong way, bad 
locality. 
array[COLS * row + col]++; 
Strides the right way, good 
locality. 
array[ROWS * col + row]++;
Full Random Access 
L1D - 5 clocks 
L2 - 37 clocks 
Memory - 280 clocks 
Sequential Access 
L1D - 5 clocks 
L2 - 14 clocks 
Memory - 28 clocks
Data Layout Principles 
Primitive Collections (GNU Trove, GS-Coll, FastUtil, HPPC) 
Arrays > Linked Lists 
Hashtable > Search Tree 
Avoid Code bloating (Loop Unrolling)
Custom Data Structures 
Judy Arrays 
an associative array/map 
kD-Trees 
generalised Binary Space Partitioning 
Z-Order Curve 
multidimensional data in one dimension
Data Locality vs Java Heap Layout 
0 
1 
2 
class Foo { 
Integer count; 
Bar bar; 
Baz baz; 
} 
// No alignment guarantees 
for (Foo foo : foos) { 
foo.count = 5; 
foo.bar.visit(); 
} 
3 
... 
Foo 
count 
bar 
baz
Data Locality vs Java Heap Layout 
Serious Java Weakness 
Location of objects in memory hard to 
guarantee. 
GC also interferes 
Copying 
Compaction
Optimisation Omen 
Again Use Performance Event Counters 
Measure for cache hit/miss rates 
Correlate with Pipeline Stalls to identify where this is 
relevant
Object Layout Control 
On Heap 
http://objectlayout.github.io/ObjectLayout 
Off Heap 
- Data Structures: Chronicle or JCTools Experimental 
- Serialisation: SBE, Cap’n’p, Flatbuffers
Summary 
Cache misses cause stalls, which kill performance 
Measurable via Performance Event Counters 
Common Techniques for optimizing code
Why care about low level rubbish? 
Branch Prediction 
Memory Access 
Storage 
Conclusions
Hard Disks 
Commonly used persistent storage 
Spinning Rust, with a head to read/write 
Constant Angular Velocity - rotations per minute stays 
constant 
Sectors size differs between device
A simple model 
Zone Constant Angular Velocity (ZCAV) / 
Zoned Bit Recording (ZBR) 
Operation Time = 
Time to process the command 
Time to seek 
Rotational speed latency 
Sequential Transfer TIme
ZBR implies faster transfer at limits than 
centre (~25%)
Seeking vs Sequential reads 
Seek and Rotation times dominate on small values of 
data 
Random writes of 4kb can be 300 times slower than 
theoretical max data transfer 
Consider the impact of context switching between 
applications or threads
Fragmentation causes unnecessary seeks
Sector (Mis) Alignment
Optimisation Omen 
1. Application Spending time waiting on I/O 
2. I/O Subsystem not transferring much data
Summary 
Simple, sequential access patterns win 
Fragmentation is your enemy 
Alignment can be important
Why care about low level rubbish? 
Branch Prediction 
Memory Access 
Storage 
Conclusions
Speedups 
● Possible 20 cycle stall for a mispredict (example 5x 
slowdown) 
● 200x for L1 cache hit vs Main Memory 
● 300x for sequential vs random on disk 
● Theoretical Max
Latency Numbers 
L1 cache reference 0.5 ns 
Branch mispredict 5 ns 
L2 cache reference 7 ns 
14x L1 cache 
Mutex lock/unlock 25 ns 
Main memory reference 100 ns 
20x L2 cache, 200x L1 cache 
Compress 1K bytes with Zippy 3,000 ns 
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms 
Read 4K randomly from SSD* 150,000 ns 0.15 ms 
Read 1 MB sequentially from memory 250,000 ns 0.25 ms 
Round trip within same datacenter 500,000 ns 0.5 ms 
Read 1 MB sequentially from SSD* 1,000,000 ns 1 ms 
Disk seek 10,000,000 ns 10 ms 
Read 1 MB sequentially from disk 20,000,000 ns 20 ms 
Send packet CA->Netherlands->CA 150,000,000 ns 150 ms 
Stolen (cited) from https://gist.github.com/jboner/2841832
Common Themes 
● Principles over Tools 
● Data over Unsubstantiated Claims 
● Simple over Complex 
● Predictable Access over Random Access
More information 
Articles 
http://www.akkadia.org/drepper/cpumemory.pdf 
https://gmplib.org/~tege/x86-timing.pdf 
http://psy-lob-saw.blogspot.co.uk/ 
http://www.intel.com/content/www/us/en/architecture-and-technology/64- 
ia-32-architectures-optimization-manual.html 
http://mechanical-sympathy.blogspot.co.uk 
http://www.agner.org/optimize/microarchitecture.pdf 
Mailing Lists: 
https://groups.google.com/forum/#!forum/mechanical-sympathy 
https://groups.google.com/a/jclarity.com/forum/#!forum/friends 
http://gee.cs.oswego.edu/dl/concurrency-interest/
http://java8training.com 
http://is.gd/javalambdas
Q & A 
@richardwarburto 
insightfullogic.com 
tinyurl.com/java8lambdas

More Related Content

What's hot

Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Marcos García
 
Effective testing for spark programs Strata NY 2015
Effective testing for spark programs   Strata NY 2015Effective testing for spark programs   Strata NY 2015
Effective testing for spark programs Strata NY 2015Holden Karau
 
Debugging Your Production JVM
Debugging Your Production JVMDebugging Your Production JVM
Debugging Your Production JVMkensipe
 
Why GC is eating all my CPU?
Why GC is eating all my CPU?Why GC is eating all my CPU?
Why GC is eating all my CPU?Roman Elizarov
 
Beyond parallelize and collect - Spark Summit East 2016
Beyond parallelize and collect - Spark Summit East 2016Beyond parallelize and collect - Spark Summit East 2016
Beyond parallelize and collect - Spark Summit East 2016Holden Karau
 
Beyond Shuffling, Tips and Tricks for Scaling Apache Spark updated for Spark ...
Beyond Shuffling, Tips and Tricks for Scaling Apache Spark updated for Spark ...Beyond Shuffling, Tips and Tricks for Scaling Apache Spark updated for Spark ...
Beyond Shuffling, Tips and Tricks for Scaling Apache Spark updated for Spark ...Holden Karau
 
Compilers Are Databases
Compilers Are DatabasesCompilers Are Databases
Compilers Are DatabasesMartin Odersky
 
Statistical Learning and Text Classification with NLTK and scikit-learn
Statistical Learning and Text Classification with NLTK and scikit-learnStatistical Learning and Text Classification with NLTK and scikit-learn
Statistical Learning and Text Classification with NLTK and scikit-learnOlivier Grisel
 
Statistical Machine Learning for Text Classification with scikit-learn and NLTK
Statistical Machine Learning for Text Classification with scikit-learn and NLTKStatistical Machine Learning for Text Classification with scikit-learn and NLTK
Statistical Machine Learning for Text Classification with scikit-learn and NLTKOlivier Grisel
 
Best practices in Java
Best practices in JavaBest practices in Java
Best practices in JavaMudit Gupta
 
Getting the best performance with PySpark - Spark Summit West 2016
Getting the best performance with PySpark - Spark Summit West 2016Getting the best performance with PySpark - Spark Summit West 2016
Getting the best performance with PySpark - Spark Summit West 2016Holden Karau
 
Introduction to Spark Datasets - Functional and relational together at last
Introduction to Spark Datasets - Functional and relational together at lastIntroduction to Spark Datasets - Functional and relational together at last
Introduction to Spark Datasets - Functional and relational together at lastHolden Karau
 
How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01
How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01
How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01Jérôme Rocheteau
 
Testing and validating spark programs - Strata SJ 2016
Testing and validating spark programs - Strata SJ 2016Testing and validating spark programs - Strata SJ 2016
Testing and validating spark programs - Strata SJ 2016Holden Karau
 
Effective testing for spark programs scala bay preview (pre-strata ny 2015)
Effective testing for spark programs scala bay preview (pre-strata ny 2015)Effective testing for spark programs scala bay preview (pre-strata ny 2015)
Effective testing for spark programs scala bay preview (pre-strata ny 2015)Holden Karau
 
Wait for your fortune without Blocking!
Wait for your fortune without Blocking!Wait for your fortune without Blocking!
Wait for your fortune without Blocking!Roman Elizarov
 
Beyond Shuffling - Effective Tips and Tricks for Scaling Spark (Vancouver Sp...
Beyond Shuffling  - Effective Tips and Tricks for Scaling Spark (Vancouver Sp...Beyond Shuffling  - Effective Tips and Tricks for Scaling Spark (Vancouver Sp...
Beyond Shuffling - Effective Tips and Tricks for Scaling Spark (Vancouver Sp...Holden Karau
 
Unit testing of spark applications
Unit testing of spark applicationsUnit testing of spark applications
Unit testing of spark applicationsKnoldus Inc.
 
Clojure for Java developers
Clojure for Java developersClojure for Java developers
Clojure for Java developersJohn Stevenson
 
Improving PySpark Performance - Spark Beyond the JVM @ PyData DC 2016
Improving PySpark Performance - Spark Beyond the JVM @ PyData DC 2016Improving PySpark Performance - Spark Beyond the JVM @ PyData DC 2016
Improving PySpark Performance - Spark Beyond the JVM @ PyData DC 2016Holden Karau
 

What's hot (20)

Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)
 
Effective testing for spark programs Strata NY 2015
Effective testing for spark programs   Strata NY 2015Effective testing for spark programs   Strata NY 2015
Effective testing for spark programs Strata NY 2015
 
Debugging Your Production JVM
Debugging Your Production JVMDebugging Your Production JVM
Debugging Your Production JVM
 
Why GC is eating all my CPU?
Why GC is eating all my CPU?Why GC is eating all my CPU?
Why GC is eating all my CPU?
 
Beyond parallelize and collect - Spark Summit East 2016
Beyond parallelize and collect - Spark Summit East 2016Beyond parallelize and collect - Spark Summit East 2016
Beyond parallelize and collect - Spark Summit East 2016
 
Beyond Shuffling, Tips and Tricks for Scaling Apache Spark updated for Spark ...
Beyond Shuffling, Tips and Tricks for Scaling Apache Spark updated for Spark ...Beyond Shuffling, Tips and Tricks for Scaling Apache Spark updated for Spark ...
Beyond Shuffling, Tips and Tricks for Scaling Apache Spark updated for Spark ...
 
Compilers Are Databases
Compilers Are DatabasesCompilers Are Databases
Compilers Are Databases
 
Statistical Learning and Text Classification with NLTK and scikit-learn
Statistical Learning and Text Classification with NLTK and scikit-learnStatistical Learning and Text Classification with NLTK and scikit-learn
Statistical Learning and Text Classification with NLTK and scikit-learn
 
Statistical Machine Learning for Text Classification with scikit-learn and NLTK
Statistical Machine Learning for Text Classification with scikit-learn and NLTKStatistical Machine Learning for Text Classification with scikit-learn and NLTK
Statistical Machine Learning for Text Classification with scikit-learn and NLTK
 
Best practices in Java
Best practices in JavaBest practices in Java
Best practices in Java
 
Getting the best performance with PySpark - Spark Summit West 2016
Getting the best performance with PySpark - Spark Summit West 2016Getting the best performance with PySpark - Spark Summit West 2016
Getting the best performance with PySpark - Spark Summit West 2016
 
Introduction to Spark Datasets - Functional and relational together at last
Introduction to Spark Datasets - Functional and relational together at lastIntroduction to Spark Datasets - Functional and relational together at last
Introduction to Spark Datasets - Functional and relational together at last
 
How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01
How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01
How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01
 
Testing and validating spark programs - Strata SJ 2016
Testing and validating spark programs - Strata SJ 2016Testing and validating spark programs - Strata SJ 2016
Testing and validating spark programs - Strata SJ 2016
 
Effective testing for spark programs scala bay preview (pre-strata ny 2015)
Effective testing for spark programs scala bay preview (pre-strata ny 2015)Effective testing for spark programs scala bay preview (pre-strata ny 2015)
Effective testing for spark programs scala bay preview (pre-strata ny 2015)
 
Wait for your fortune without Blocking!
Wait for your fortune without Blocking!Wait for your fortune without Blocking!
Wait for your fortune without Blocking!
 
Beyond Shuffling - Effective Tips and Tricks for Scaling Spark (Vancouver Sp...
Beyond Shuffling  - Effective Tips and Tricks for Scaling Spark (Vancouver Sp...Beyond Shuffling  - Effective Tips and Tricks for Scaling Spark (Vancouver Sp...
Beyond Shuffling - Effective Tips and Tricks for Scaling Spark (Vancouver Sp...
 
Unit testing of spark applications
Unit testing of spark applicationsUnit testing of spark applications
Unit testing of spark applications
 
Clojure for Java developers
Clojure for Java developersClojure for Java developers
Clojure for Java developers
 
Improving PySpark Performance - Spark Beyond the JVM @ PyData DC 2016
Improving PySpark Performance - Spark Beyond the JVM @ PyData DC 2016Improving PySpark Performance - Spark Beyond the JVM @ PyData DC 2016
Improving PySpark Performance - Spark Beyond the JVM @ PyData DC 2016
 

Similar to Performance and predictability (1)

Performance and predictability
Performance and predictabilityPerformance and predictability
Performance and predictabilityRichardWarburton
 
Memory Optimization
Memory OptimizationMemory Optimization
Memory OptimizationWei Lin
 
Memory Optimization
Memory OptimizationMemory Optimization
Memory Optimizationguest3eed30
 
Project Tungsten Phase II: Joining a Billion Rows per Second on a Laptop
Project Tungsten Phase II: Joining a Billion Rows per Second on a LaptopProject Tungsten Phase II: Joining a Billion Rows per Second on a Laptop
Project Tungsten Phase II: Joining a Billion Rows per Second on a LaptopDatabricks
 
Sql server scalability fundamentals
Sql server scalability fundamentalsSql server scalability fundamentals
Sql server scalability fundamentalsChris Adkin
 
Project Tungsten: Bringing Spark Closer to Bare Metal
Project Tungsten: Bringing Spark Closer to Bare MetalProject Tungsten: Bringing Spark Closer to Bare Metal
Project Tungsten: Bringing Spark Closer to Bare MetalDatabricks
 
Caching in (DevoxxUK 2013)
Caching in (DevoxxUK 2013)Caching in (DevoxxUK 2013)
Caching in (DevoxxUK 2013)RichardWarburton
 
Super scaling singleton inserts
Super scaling singleton insertsSuper scaling singleton inserts
Super scaling singleton insertsChris Adkin
 
Sql server engine cpu cache as the new ram
Sql server engine cpu cache as the new ramSql server engine cpu cache as the new ram
Sql server engine cpu cache as the new ramChris Adkin
 
Sql sever engine batch mode and cpu architectures
Sql sever engine batch mode and cpu architecturesSql sever engine batch mode and cpu architectures
Sql sever engine batch mode and cpu architecturesChris Adkin
 
Low level java programming
Low level java programmingLow level java programming
Low level java programmingPeter Lawrey
 
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...Chester Chen
 
An introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeAn introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeChris Adkin
 
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...Lucidworks
 
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...Maarten Balliauw
 
In-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesIn-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesHazelcast
 

Similar to Performance and predictability (1) (20)

Performance and predictability
Performance and predictabilityPerformance and predictability
Performance and predictability
 
Memory Optimization
Memory OptimizationMemory Optimization
Memory Optimization
 
Memory Optimization
Memory OptimizationMemory Optimization
Memory Optimization
 
Project Tungsten Phase II: Joining a Billion Rows per Second on a Laptop
Project Tungsten Phase II: Joining a Billion Rows per Second on a LaptopProject Tungsten Phase II: Joining a Billion Rows per Second on a Laptop
Project Tungsten Phase II: Joining a Billion Rows per Second on a Laptop
 
Sql server scalability fundamentals
Sql server scalability fundamentalsSql server scalability fundamentals
Sql server scalability fundamentals
 
Project Tungsten: Bringing Spark Closer to Bare Metal
Project Tungsten: Bringing Spark Closer to Bare MetalProject Tungsten: Bringing Spark Closer to Bare Metal
Project Tungsten: Bringing Spark Closer to Bare Metal
 
Caching in (DevoxxUK 2013)
Caching in (DevoxxUK 2013)Caching in (DevoxxUK 2013)
Caching in (DevoxxUK 2013)
 
Super scaling singleton inserts
Super scaling singleton insertsSuper scaling singleton inserts
Super scaling singleton inserts
 
Sql server engine cpu cache as the new ram
Sql server engine cpu cache as the new ramSql server engine cpu cache as the new ram
Sql server engine cpu cache as the new ram
 
Sql sever engine batch mode and cpu architectures
Sql sever engine batch mode and cpu architecturesSql sever engine batch mode and cpu architectures
Sql sever engine batch mode and cpu architectures
 
Performance
PerformancePerformance
Performance
 
Low level java programming
Low level java programmingLow level java programming
Low level java programming
 
Caching in
Caching inCaching in
Caching in
 
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...
 
An introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeAn introduction to column store indexes and batch mode
An introduction to column store indexes and batch mode
 
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
 
Vault2016
Vault2016Vault2016
Vault2016
 
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
 
Java Memory Model
Java Memory ModelJava Memory Model
Java Memory Model
 
In-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesIn-memory Data Management Trends & Techniques
In-memory Data Management Trends & Techniques
 

More from RichardWarburton

Fantastic performance and where to find it
Fantastic performance and where to find itFantastic performance and where to find it
Fantastic performance and where to find itRichardWarburton
 
Production profiling what, why and how technical audience (3)
Production profiling  what, why and how   technical audience (3)Production profiling  what, why and how   technical audience (3)
Production profiling what, why and how technical audience (3)RichardWarburton
 
Production profiling: What, Why and How
Production profiling: What, Why and HowProduction profiling: What, Why and How
Production profiling: What, Why and HowRichardWarburton
 
Production profiling what, why and how (JBCN Edition)
Production profiling  what, why and how (JBCN Edition)Production profiling  what, why and how (JBCN Edition)
Production profiling what, why and how (JBCN Edition)RichardWarburton
 
Production Profiling: What, Why and How
Production Profiling: What, Why and HowProduction Profiling: What, Why and How
Production Profiling: What, Why and HowRichardWarburton
 
Pragmatic functional refactoring with java 8 (1)
Pragmatic functional refactoring with java 8 (1)Pragmatic functional refactoring with java 8 (1)
Pragmatic functional refactoring with java 8 (1)RichardWarburton
 
Twins: Object Oriented Programming and Functional Programming
Twins: Object Oriented Programming and Functional ProgrammingTwins: Object Oriented Programming and Functional Programming
Twins: Object Oriented Programming and Functional ProgrammingRichardWarburton
 
Pragmatic functional refactoring with java 8
Pragmatic functional refactoring with java 8Pragmatic functional refactoring with java 8
Pragmatic functional refactoring with java 8RichardWarburton
 
Introduction to lambda behave
Introduction to lambda behaveIntroduction to lambda behave
Introduction to lambda behaveRichardWarburton
 
Introduction to lambda behave
Introduction to lambda behaveIntroduction to lambda behave
Introduction to lambda behaveRichardWarburton
 
Simplifying java with lambdas (short)
Simplifying java with lambdas (short)Simplifying java with lambdas (short)
Simplifying java with lambdas (short)RichardWarburton
 
Lambdas myths-and-mistakes
Lambdas myths-and-mistakesLambdas myths-and-mistakes
Lambdas myths-and-mistakesRichardWarburton
 
Lambdas: Myths and Mistakes
Lambdas: Myths and MistakesLambdas: Myths and Mistakes
Lambdas: Myths and MistakesRichardWarburton
 

More from RichardWarburton (20)

Fantastic performance and where to find it
Fantastic performance and where to find itFantastic performance and where to find it
Fantastic performance and where to find it
 
Production profiling what, why and how technical audience (3)
Production profiling  what, why and how   technical audience (3)Production profiling  what, why and how   technical audience (3)
Production profiling what, why and how technical audience (3)
 
Production profiling: What, Why and How
Production profiling: What, Why and HowProduction profiling: What, Why and How
Production profiling: What, Why and How
 
Production profiling what, why and how (JBCN Edition)
Production profiling  what, why and how (JBCN Edition)Production profiling  what, why and how (JBCN Edition)
Production profiling what, why and how (JBCN Edition)
 
Production Profiling: What, Why and How
Production Profiling: What, Why and HowProduction Profiling: What, Why and How
Production Profiling: What, Why and How
 
How to run a hackday
How to run a hackdayHow to run a hackday
How to run a hackday
 
Pragmatic functional refactoring with java 8 (1)
Pragmatic functional refactoring with java 8 (1)Pragmatic functional refactoring with java 8 (1)
Pragmatic functional refactoring with java 8 (1)
 
Twins: Object Oriented Programming and Functional Programming
Twins: Object Oriented Programming and Functional ProgrammingTwins: Object Oriented Programming and Functional Programming
Twins: Object Oriented Programming and Functional Programming
 
Pragmatic functional refactoring with java 8
Pragmatic functional refactoring with java 8Pragmatic functional refactoring with java 8
Pragmatic functional refactoring with java 8
 
Introduction to lambda behave
Introduction to lambda behaveIntroduction to lambda behave
Introduction to lambda behave
 
Introduction to lambda behave
Introduction to lambda behaveIntroduction to lambda behave
Introduction to lambda behave
 
Simplifying java with lambdas (short)
Simplifying java with lambdas (short)Simplifying java with lambdas (short)
Simplifying java with lambdas (short)
 
Twins: OOP and FP
Twins: OOP and FPTwins: OOP and FP
Twins: OOP and FP
 
Twins: OOP and FP
Twins: OOP and FPTwins: OOP and FP
Twins: OOP and FP
 
The Bleeding Edge
The Bleeding EdgeThe Bleeding Edge
The Bleeding Edge
 
Lambdas myths-and-mistakes
Lambdas myths-and-mistakesLambdas myths-and-mistakes
Lambdas myths-and-mistakes
 
Caching in
Caching inCaching in
Caching in
 
Lambdas: Myths and Mistakes
Lambdas: Myths and MistakesLambdas: Myths and Mistakes
Lambdas: Myths and Mistakes
 
Better than a coin toss
Better than a coin tossBetter than a coin toss
Better than a coin toss
 
Devoxx uk lambdas hackday
Devoxx uk lambdas hackdayDevoxx uk lambdas hackday
Devoxx uk lambdas hackday
 

Recently uploaded

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Recently uploaded (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Performance and predictability (1)

  • 1. PERFORMANCE AND PREDICTABILITY Richard Warburton @richardwarburto insightfullogic.com
  • 2.
  • 3. Why care about low level rubbish? Branch Prediction Memory Access Storage Conclusions
  • 4. Technology or Principles “60 messages per second.” “8 ElasticSearch servers on AWS, 26 front end proxy serves. Double that in backend app servers.” 60 / (8 + 26 + 2 * 26) = 0.7 messages / server / second. http://highscalability.com/blog/2014/1/6/how-hipchat-stores-and-indexes-billions-of-messages-using- el.html
  • 5. “What we need is less hipsters and more geeks” - Martin Thompson
  • 6. Performance Discussion Product Solutions “Just use our library/tool/framework, and everything is web-scale!” Architecture Advocacy “Always design your software like this.” Methodology & Fundamentals “Here are some principles and knowledge, use your brain“
  • 7.
  • 8. Case Study: Messaging ● 1 Thread reading network data ● 1 Thread writing network data ● 1 Thread conducting admin tasks
  • 9. Unifying Theme: Be Predictable An opportunity for an underlying system: ○ Branch Prediction ○ Memory Access ○ Hard Disks
  • 10. Do you care? Many problems not Predictability Related Networking Database or External Service Minimising I/O Garbage Collection Insufficient Parallelism Use an Optimisation Omen
  • 11. Why care about low level rubbish? Branch Prediction Memory Access Storage Conclusions
  • 12. What 4 things do CPUs actually do?
  • 15.
  • 17. What about branches? public static int simple(int x, int y, int z) { int ret; if (x > 5) { ret = y + z; } else { ret = y; } return ret; }
  • 18. Branches cause stalls, stalls kill performance
  • 19. Can we eliminate branches?
  • 20. Strategy: predict branches and speculatively execute
  • 21. Static Prediction A forward branch defaults to not taken A backward branch defaults to taken
  • 22.
  • 23. Conditional Branches if(x == 0) { x = 1; } x++; mov eax, $x cmp eax, 0 jne end mov eax, 1 end: inc eax mov $x, eax
  • 24. Static Hints (Pentium 4 or later) __emit 0x3E defaults to taken __emit 0x2E defaults to not taken don’t use them, flip the branch
  • 25. Dynamic prediction: record history and predict future
  • 26. Branch Target Buffer (BTB) a log of the history of each branch also stores the program counter address its finite!
  • 27. Local record per conditional branch histories Global record shared history of conditional jumps
  • 28. Loop specialised predictor when there’s a loop (jumping in a cycle n times) Function specialised buffer for predicted nearby function returns N level Adaptive Predictor accounts for up patterns of up to N+1 if statements
  • 29. Optimisation Omen Use Performance Event Counters (Model Specific Registers) Can be configured to store branch prediction information Profilers & Tooling: perf (linux), VTune, AMD Code Analyst, Visual Studio, Oracle Performance Studio
  • 31. Summary CPUs are Super-pipelined and Superscalar Branches cause stalls Simplify your code! Especially branching logic and megamorphic callsites
  • 32. Why care about low level rubbish? Branch Prediction Memory Access Storage Conclusions
  • 33. The Problem Very Fast Relatively Slow
  • 34. The Solution: CPU Cache Core Demands Data, looks at its cache If present (a "hit") then data returned to register If absent (a "miss") then data looked up from memory and stored in the cache Fast memory is expensive, a small amount is affordable
  • 35. Multilevel Cache: Intel Sandybridge Physical Core 0 HT: 2 Logical Cores Level 1 Instruction Cache Shared Level 3 Cache Level 1 Data Cache Level 2 Cache .... Physical Core N HT: 2 Logical Cores Level 1 Data Cache Level 1 Instruction Cache Level 2 Cache
  • 36. How bad is a miss? Location Latency in Clockcycles Register 0 L1 Cache 3 L2 Cache 9 L3 Cache 21 Main Memory 150-400
  • 37. Prefetching Eagerly load data Adjacent & Streaming Prefetches Arrange Data so accesses are predictable
  • 38. Temporal Locality Repeatedly referring to same data in a short time span Spatial Locality Referring to data that is close together in memory Sequential Locality Referring to data that is arranged linearly in memory
  • 39. General Principles Use smaller data types (-XX:+UseCompressedOops) Avoid 'big holes' in your data Make accesses as linear as possible
  • 40. Primitive Arrays // Sequential Access = Predictable for (int i=0; i<someArray.length; i++) someArray[i]++;
  • 41. Primitive Arrays - Skipping Elements // Holes Hurt for (int i=0; i<someArray.length; i += SKIP) someArray[i]++;
  • 42. Primitive Arrays - Skipping Elements
  • 43. Multidimensional Arrays Multidimensional Arrays are really Arrays of Arrays in Java. (Unlike C) Some people realign their accesses: for (int col=0; col<COLS; col++) { for (int row=0; row<ROWS; row++) { array[ROWS * col + row]++; } }
  • 44. Bad Access Alignment Strides the wrong way, bad locality. array[COLS * row + col]++; Strides the right way, good locality. array[ROWS * col + row]++;
  • 45. Full Random Access L1D - 5 clocks L2 - 37 clocks Memory - 280 clocks Sequential Access L1D - 5 clocks L2 - 14 clocks Memory - 28 clocks
  • 46. Data Layout Principles Primitive Collections (GNU Trove, GS-Coll, FastUtil, HPPC) Arrays > Linked Lists Hashtable > Search Tree Avoid Code bloating (Loop Unrolling)
  • 47. Custom Data Structures Judy Arrays an associative array/map kD-Trees generalised Binary Space Partitioning Z-Order Curve multidimensional data in one dimension
  • 48. Data Locality vs Java Heap Layout 0 1 2 class Foo { Integer count; Bar bar; Baz baz; } // No alignment guarantees for (Foo foo : foos) { foo.count = 5; foo.bar.visit(); } 3 ... Foo count bar baz
  • 49. Data Locality vs Java Heap Layout Serious Java Weakness Location of objects in memory hard to guarantee. GC also interferes Copying Compaction
  • 50. Optimisation Omen Again Use Performance Event Counters Measure for cache hit/miss rates Correlate with Pipeline Stalls to identify where this is relevant
  • 51. Object Layout Control On Heap http://objectlayout.github.io/ObjectLayout Off Heap - Data Structures: Chronicle or JCTools Experimental - Serialisation: SBE, Cap’n’p, Flatbuffers
  • 52. Summary Cache misses cause stalls, which kill performance Measurable via Performance Event Counters Common Techniques for optimizing code
  • 53. Why care about low level rubbish? Branch Prediction Memory Access Storage Conclusions
  • 54. Hard Disks Commonly used persistent storage Spinning Rust, with a head to read/write Constant Angular Velocity - rotations per minute stays constant Sectors size differs between device
  • 55. A simple model Zone Constant Angular Velocity (ZCAV) / Zoned Bit Recording (ZBR) Operation Time = Time to process the command Time to seek Rotational speed latency Sequential Transfer TIme
  • 56. ZBR implies faster transfer at limits than centre (~25%)
  • 57. Seeking vs Sequential reads Seek and Rotation times dominate on small values of data Random writes of 4kb can be 300 times slower than theoretical max data transfer Consider the impact of context switching between applications or threads
  • 60.
  • 61.
  • 62. Optimisation Omen 1. Application Spending time waiting on I/O 2. I/O Subsystem not transferring much data
  • 63. Summary Simple, sequential access patterns win Fragmentation is your enemy Alignment can be important
  • 64. Why care about low level rubbish? Branch Prediction Memory Access Storage Conclusions
  • 65. Speedups ● Possible 20 cycle stall for a mispredict (example 5x slowdown) ● 200x for L1 cache hit vs Main Memory ● 300x for sequential vs random on disk ● Theoretical Max
  • 66. Latency Numbers L1 cache reference 0.5 ns Branch mispredict 5 ns L2 cache reference 7 ns 14x L1 cache Mutex lock/unlock 25 ns Main memory reference 100 ns 20x L2 cache, 200x L1 cache Compress 1K bytes with Zippy 3,000 ns Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms Read 4K randomly from SSD* 150,000 ns 0.15 ms Read 1 MB sequentially from memory 250,000 ns 0.25 ms Round trip within same datacenter 500,000 ns 0.5 ms Read 1 MB sequentially from SSD* 1,000,000 ns 1 ms Disk seek 10,000,000 ns 10 ms Read 1 MB sequentially from disk 20,000,000 ns 20 ms Send packet CA->Netherlands->CA 150,000,000 ns 150 ms Stolen (cited) from https://gist.github.com/jboner/2841832
  • 67. Common Themes ● Principles over Tools ● Data over Unsubstantiated Claims ● Simple over Complex ● Predictable Access over Random Access
  • 68. More information Articles http://www.akkadia.org/drepper/cpumemory.pdf https://gmplib.org/~tege/x86-timing.pdf http://psy-lob-saw.blogspot.co.uk/ http://www.intel.com/content/www/us/en/architecture-and-technology/64- ia-32-architectures-optimization-manual.html http://mechanical-sympathy.blogspot.co.uk http://www.agner.org/optimize/microarchitecture.pdf Mailing Lists: https://groups.google.com/forum/#!forum/mechanical-sympathy https://groups.google.com/a/jclarity.com/forum/#!forum/friends http://gee.cs.oswego.edu/dl/concurrency-interest/
  • 70. Q & A @richardwarburto insightfullogic.com tinyurl.com/java8lambdas