SlideShare a Scribd company logo
Locality
of
Reference
2017.10.28 NAGOYA.BIN #1 KOUJI MATSUI (@KEKYO2)
Kouji Matsui - kekyo
• NAGOYA city, AICHI pref., JP
• Twitter – @kekyo2 / Facebook
• ux-spiral corporation
• Microsoft Most Valuable Professional VS
and DevTech 2015-
• Certified Scrum master / Scrum product
owner
• Center CLR organizer.
• .NET/C#/F#/IL/metaprogramming or like…
• Bike rider
Agenda
•Physical side scales
•Logical side scales
•Data stream between physicals and logicals
•Locality of reference
•Anti-locality of reference
•Conclusion
Physical side scales
Physical side scales
Processor #1
Physical Core #4
Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #3
Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #2
Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #1
Logical Core #1Logical Core #1Logical Core #1Logical Core #1
Processor #2
Physical Core #8
Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #7
Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #6
Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #5
Logical Core #1Logical Core #1Logical Core #1Logical Core #17
Processor #3
Physical Core #12
Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #11
Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #10
Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #9
Logical Core #1Logical Core #1Logical Core #1Logical Core #33
Physical side scales
The memory/IO bind at
the fixed CPU/Core
(Non configurable)
Physical side scales
The “shared cache memory” bind at the fixed
CPU/Core
(Non configurable)
Physical side scales
The “cache memory” bind at the fixed CPU/Core
(Non configurable)
The “shared cache memory” bind at the fixed
CPU/Core
(Non configurable)
Agenda
•Physical side scales
•Logical side scales
•Data stream between physicals and logicals
•Locality of reference
•Anti-locality of reference
•Conclusion
Logical side scales
Process #1
Virtual
Memory
Space
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Process #2
Virtual
Memory
Space
Thread #1
Thread #1
Thread #1
Thread #1
Thread #11
Process #3
Virtual
Memory
Space
Thread #1
Thread #1
Thread #1
Thread #1
Thread #21
Process #4
Virtual
Memory
Space
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Process #5
Virtual
Memory
Space
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical side scales
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #11
Thread #1
Thread #1
Thread #1
Thread #1
Thread #21
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical Core #4
Logical Core #3
Logical Core #2
Logical Core #1
This is true story
Execution context
Logical side scales
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #11
Thread #1
Thread #1
Thread #1
Thread #1
Thread #21
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical Core #4
Logical Core #3
Logical Core #2
Logical Core #1
Switch execution
context
Agenda
•Physical side scales
•Logical side scales
•Data stream between physicals and logicals
•Locality of reference
•Anti-locality of reference
•Conclusion
Data stream between physicals and logicals
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #11
Thread #1
Thread #1
Thread #1
Thread #1
Thread #21
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical Core #4
Logical Core #3
Logical Core #2
Logical Core #1
L1/L2 cache #1
L1/L2 cache #2 L1/L2 cache #4
L1/L2 cache #3
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #11
Thread #1
Thread #1
Thread #1
Thread #1
Thread #21
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical Core #4
Logical Core #3
Logical Core #2
Logical Core #1
L1/L2 cache #1
L1/L2 cache #2 L1/L2 cache #4
L3 cache #1 L3 cache #2
L1/L2 cache #3
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Thread #11
Thread #1
Thread #1
Thread #1
Thread #1
Thread #21
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical Core #4
Logical Core #3
Logical Core #2
Logical Core #1
L1/L2 cache #1
L1/L2 cache #2
L1/L2 cache #3
L1/L2 cache #4
L3 cache #1 L3 cache #2
NUMA node bound memory
Agenda
•Physical side scales
•Logical side scales
•Data stream between physicals and logicals
•Locality of reference
•Anti-locality of reference
•Conclusion
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical Core #4
L1/L2 cache #4
L3 cache #2
NUMA node bound memory
declaredType
currentType
stopType
field
FieldInfo[]
Thread #33 context
Load/Preload
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical Core #4
L1/L2 cache #4
L3 cache #2
NUMA node bound memory
__stack0_0
Thread #42 context
__stack0_1
__stack0_2
__stack1_0
declaredType
currentType
local0
local1
field
Load/Preload
Switch
Thread #1
Thread #1
Thread #1
Thread #1
Thread #21
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical Core #4
Logical Core #3
L1/L2 cache #3
L1/L2 cache #4
L3 cache #2
NUMA node bound memory
declaredType
currentType
stopType
field
FieldInfo[]
Thread #1
Thread #1
Thread #1
Thread #1
Thread #21
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical Core #4
Logical Core #3
L1/L2 cache #3
L1/L2 cache #4
L3 cache #2
NUMA node bound memory
declaredType
currentType
stopType
field
FieldInfo[]
stopType
field
FieldInfo[]
field
Load/Preload
Switch
Agenda
•Physical side scales
•Logical side scales
•Data stream between physicals and logicals
•Locality of reference
•Anti-locality of reference
•Conclusion
Thread #1
Thread #1
Thread #1
Thread #1
Thread #21
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical Core #4
Logical Core #3
L1/L2 cache #3
L1/L2 cache #4
L3 cache #2
NUMA node bound memory
Common value
Common value
Common value
Load/Preload
Load/Preload
These threads access
common value
Thread #1
Thread #1
Thread #1
Thread #1
Thread #21
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical Core #4
Logical Core #3
L1/L2 cache #3
L1/L2 cache #4
L3 cache #2
NUMA node bound memory
Common value
Common value
Common value
Race condition
(Receive coherence penalty)
STRATEGY:
• Turn to immutable
• Hashed indexer
Writeback
Writeback
Agenda
•Physical side scales
•Logical side scales
•Data stream between physicals and logicals
•Locality of reference
•Anti-locality of reference
•Conclusion
Conclusion
The execution context bounds not THREAD. The code executor is
CPU CORE.
CPU cores have structuable nested cache system.
Cache miss penalty is large.
Cache coherency penalty is large.
Both I/O systems too.
Important cache-related architecture:
◦ Locality of reference
◦ Immutable
Thanks join!
My blog
◦ http://www.kekyo.net/
Current active project:
◦ IL2C - A translator implementation of .NET intermediate language to C
language.
◦ YouTube: http://bit.ly/2xtu4MH
◦ GitHub: https://github.com/kekyo/IL2C

More Related Content

Similar to Locality of Reference

main memory
main memorymain memory
main memory
Mavoori Soshmitha
 
Bin carver
Bin carverBin carver
.NET Fest 2018. Денис Резник. Почему мой запрос тормозит и как это исправить
.NET Fest 2018. Денис Резник. Почему мой запрос тормозит и как это исправить.NET Fest 2018. Денис Резник. Почему мой запрос тормозит и как это исправить
.NET Fest 2018. Денис Резник. Почему мой запрос тормозит и как это исправить
NETFest
 
50 Shades of Fail KScope16
50 Shades of Fail KScope1650 Shades of Fail KScope16
50 Shades of Fail KScope16
Christian Berg
 
Approximate "Now" is Better Than Accurate "Later"
Approximate "Now" is Better Than Accurate "Later"Approximate "Now" is Better Than Accurate "Later"
Approximate "Now" is Better Than Accurate "Later"
NUS-ISS
 
Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"
Fwdays
 
Trouble-shooting Tips for Primo (2013)
Trouble-shooting Tips for Primo (2013)Trouble-shooting Tips for Primo (2013)
Trouble-shooting Tips for Primo (2013)
Alison Hitchens
 
Are Java Programmers Transitioning to Multicore?
Are Java Programmers Transitioning to Multicore? Are Java Programmers Transitioning to Multicore?
Are Java Programmers Transitioning to Multicore? UFPA
 
Cassandra introduction mars jug
Cassandra introduction mars jugCassandra introduction mars jug
Cassandra introduction mars jug
Duyhai Doan
 
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecks
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecksKernel Recipes 2015: Solving the Linux storage scalability bottlenecks
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecks
Anne Nicolas
 
Elixir@SFI
Elixir@SFIElixir@SFI
.NET Memory Primer (Martin Kulov)
.NET Memory Primer (Martin Kulov).NET Memory Primer (Martin Kulov)
.NET Memory Primer (Martin Kulov)
ITCamp
 
The Road to Reproducible Computational Research
The Road to Reproducible Computational ResearchThe Road to Reproducible Computational Research
The Road to Reproducible Computational ResearchAndrey Moskalenko
 
Java 8 -12: da Oracle a Eclipse. Due anni e una rivoluzione
Java 8 -12: da Oracle a Eclipse. Due anni e una rivoluzioneJava 8 -12: da Oracle a Eclipse. Due anni e una rivoluzione
Java 8 -12: da Oracle a Eclipse. Due anni e una rivoluzione
ThinkOpen
 
The Pill for Your Migration Hell
The Pill for Your Migration HellThe Pill for Your Migration Hell
The Pill for Your Migration Hell
Databricks
 
Deep Dive into Spark
Deep Dive into SparkDeep Dive into Spark
Deep Dive into Spark
Eric Xiao
 
It5304 syllabus
It5304 syllabusIt5304 syllabus
It5304 syllabus
nimal83
 
.NET Fest 2019. Денис Резник. Когда SQL Server Best Practices не работают
.NET Fest 2019. Денис Резник. Когда SQL Server Best Practices не работают.NET Fest 2019. Денис Резник. Когда SQL Server Best Practices не работают
.NET Fest 2019. Денис Резник. Когда SQL Server Best Practices не работают
NETFest
 
COBOL to Apache Spark
COBOL to Apache SparkCOBOL to Apache Spark
COBOL to Apache Spark
Rakuten Group, Inc.
 
Conceptos básicos. Seminario web 1: Introducción a NoSQL
Conceptos básicos. Seminario web 1: Introducción a NoSQLConceptos básicos. Seminario web 1: Introducción a NoSQL
Conceptos básicos. Seminario web 1: Introducción a NoSQL
MongoDB
 

Similar to Locality of Reference (20)

main memory
main memorymain memory
main memory
 
Bin carver
Bin carverBin carver
Bin carver
 
.NET Fest 2018. Денис Резник. Почему мой запрос тормозит и как это исправить
.NET Fest 2018. Денис Резник. Почему мой запрос тормозит и как это исправить.NET Fest 2018. Денис Резник. Почему мой запрос тормозит и как это исправить
.NET Fest 2018. Денис Резник. Почему мой запрос тормозит и как это исправить
 
50 Shades of Fail KScope16
50 Shades of Fail KScope1650 Shades of Fail KScope16
50 Shades of Fail KScope16
 
Approximate "Now" is Better Than Accurate "Later"
Approximate "Now" is Better Than Accurate "Later"Approximate "Now" is Better Than Accurate "Later"
Approximate "Now" is Better Than Accurate "Later"
 
Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"
 
Trouble-shooting Tips for Primo (2013)
Trouble-shooting Tips for Primo (2013)Trouble-shooting Tips for Primo (2013)
Trouble-shooting Tips for Primo (2013)
 
Are Java Programmers Transitioning to Multicore?
Are Java Programmers Transitioning to Multicore? Are Java Programmers Transitioning to Multicore?
Are Java Programmers Transitioning to Multicore?
 
Cassandra introduction mars jug
Cassandra introduction mars jugCassandra introduction mars jug
Cassandra introduction mars jug
 
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecks
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecksKernel Recipes 2015: Solving the Linux storage scalability bottlenecks
Kernel Recipes 2015: Solving the Linux storage scalability bottlenecks
 
Elixir@SFI
Elixir@SFIElixir@SFI
Elixir@SFI
 
.NET Memory Primer (Martin Kulov)
.NET Memory Primer (Martin Kulov).NET Memory Primer (Martin Kulov)
.NET Memory Primer (Martin Kulov)
 
The Road to Reproducible Computational Research
The Road to Reproducible Computational ResearchThe Road to Reproducible Computational Research
The Road to Reproducible Computational Research
 
Java 8 -12: da Oracle a Eclipse. Due anni e una rivoluzione
Java 8 -12: da Oracle a Eclipse. Due anni e una rivoluzioneJava 8 -12: da Oracle a Eclipse. Due anni e una rivoluzione
Java 8 -12: da Oracle a Eclipse. Due anni e una rivoluzione
 
The Pill for Your Migration Hell
The Pill for Your Migration HellThe Pill for Your Migration Hell
The Pill for Your Migration Hell
 
Deep Dive into Spark
Deep Dive into SparkDeep Dive into Spark
Deep Dive into Spark
 
It5304 syllabus
It5304 syllabusIt5304 syllabus
It5304 syllabus
 
.NET Fest 2019. Денис Резник. Когда SQL Server Best Practices не работают
.NET Fest 2019. Денис Резник. Когда SQL Server Best Practices не работают.NET Fest 2019. Денис Резник. Когда SQL Server Best Practices не работают
.NET Fest 2019. Денис Резник. Когда SQL Server Best Practices не работают
 
COBOL to Apache Spark
COBOL to Apache SparkCOBOL to Apache Spark
COBOL to Apache Spark
 
Conceptos básicos. Seminario web 1: Introducción a NoSQL
Conceptos básicos. Seminario web 1: Introducción a NoSQLConceptos básicos. Seminario web 1: Introducción a NoSQL
Conceptos básicos. Seminario web 1: Introducción a NoSQL
 

More from Kouji Matsui

パターンでわかる! .NET Coreの非同期処理
パターンでわかる! .NET Coreの非同期処理パターンでわかる! .NET Coreの非同期処理
パターンでわかる! .NET Coreの非同期処理
Kouji Matsui
 
Making archive IL2C #6-55 dotnet600 2018
Making archive IL2C #6-55 dotnet600 2018Making archive IL2C #6-55 dotnet600 2018
Making archive IL2C #6-55 dotnet600 2018
Kouji Matsui
 
Matrix signal controller and BrainPad overview
Matrix signal controller and BrainPad overviewMatrix signal controller and BrainPad overview
Matrix signal controller and BrainPad overview
Kouji Matsui
 
Fun with BrainPad
Fun with BrainPadFun with BrainPad
Fun with BrainPad
Kouji Matsui
 
What's Functional?
What's Functional?What's Functional?
What's Functional?
Kouji Matsui
 
Pitfall for WioLTE
Pitfall for WioLTEPitfall for WioLTE
Pitfall for WioLTE
Kouji Matsui
 
How to make the calculator
How to make the calculatorHow to make the calculator
How to make the calculator
Kouji Matsui
 
Write common, run anywhere
Write common, run anywhereWrite common, run anywhere
Write common, run anywhere
Kouji Matsui
 
Nespのコード生成
Nespのコード生成Nespのコード生成
Nespのコード生成
Kouji Matsui
 
You will be assimilated. Resistance is futile.
You will be assimilated. Resistance is futile.You will be assimilated. Resistance is futile.
You will be assimilated. Resistance is futile.
Kouji Matsui
 
How to meets Async and Task
How to meets Async and TaskHow to meets Async and Task
How to meets Async and Task
Kouji Matsui
 
Beachhead implements new opcode on CLR JIT
Beachhead implements new opcode on CLR JITBeachhead implements new opcode on CLR JIT
Beachhead implements new opcode on CLR JIT
Kouji Matsui
 
Async deepdive before de:code
Async deepdive before de:codeAsync deepdive before de:code
Async deepdive before de:code
Kouji Matsui
 
Thread affinity and CPS
Thread affinity and CPSThread affinity and CPS
Thread affinity and CPS
Kouji Matsui
 
Async DeepDive basics
Async DeepDive basicsAsync DeepDive basics
Async DeepDive basics
Kouji Matsui
 
continuatioN Linking
continuatioN LinkingcontinuatioN Linking
continuatioN Linking
Kouji Matsui
 
真Intermediate languageのキホン
真Intermediate languageのキホン真Intermediate languageのキホン
真Intermediate languageのキホン
Kouji Matsui
 
.NET Coreから概観する.NETのOSSへの取り組み
.NET Coreから概観する.NETのOSSへの取り組み.NET Coreから概観する.NETのOSSへの取り組み
.NET Coreから概観する.NETのOSSへの取り組み
Kouji Matsui
 
Win32 APIをてなずけよう
Win32 APIをてなずけようWin32 APIをてなずけよう
Win32 APIをてなずけよう
Kouji Matsui
 
式の体を成して無い式を式の体を成すように式と式木で何とかする式
式の体を成して無い式を式の体を成すように式と式木で何とかする式式の体を成して無い式を式の体を成すように式と式木で何とかする式
式の体を成して無い式を式の体を成すように式と式木で何とかする式
Kouji Matsui
 

More from Kouji Matsui (20)

パターンでわかる! .NET Coreの非同期処理
パターンでわかる! .NET Coreの非同期処理パターンでわかる! .NET Coreの非同期処理
パターンでわかる! .NET Coreの非同期処理
 
Making archive IL2C #6-55 dotnet600 2018
Making archive IL2C #6-55 dotnet600 2018Making archive IL2C #6-55 dotnet600 2018
Making archive IL2C #6-55 dotnet600 2018
 
Matrix signal controller and BrainPad overview
Matrix signal controller and BrainPad overviewMatrix signal controller and BrainPad overview
Matrix signal controller and BrainPad overview
 
Fun with BrainPad
Fun with BrainPadFun with BrainPad
Fun with BrainPad
 
What's Functional?
What's Functional?What's Functional?
What's Functional?
 
Pitfall for WioLTE
Pitfall for WioLTEPitfall for WioLTE
Pitfall for WioLTE
 
How to make the calculator
How to make the calculatorHow to make the calculator
How to make the calculator
 
Write common, run anywhere
Write common, run anywhereWrite common, run anywhere
Write common, run anywhere
 
Nespのコード生成
Nespのコード生成Nespのコード生成
Nespのコード生成
 
You will be assimilated. Resistance is futile.
You will be assimilated. Resistance is futile.You will be assimilated. Resistance is futile.
You will be assimilated. Resistance is futile.
 
How to meets Async and Task
How to meets Async and TaskHow to meets Async and Task
How to meets Async and Task
 
Beachhead implements new opcode on CLR JIT
Beachhead implements new opcode on CLR JITBeachhead implements new opcode on CLR JIT
Beachhead implements new opcode on CLR JIT
 
Async deepdive before de:code
Async deepdive before de:codeAsync deepdive before de:code
Async deepdive before de:code
 
Thread affinity and CPS
Thread affinity and CPSThread affinity and CPS
Thread affinity and CPS
 
Async DeepDive basics
Async DeepDive basicsAsync DeepDive basics
Async DeepDive basics
 
continuatioN Linking
continuatioN LinkingcontinuatioN Linking
continuatioN Linking
 
真Intermediate languageのキホン
真Intermediate languageのキホン真Intermediate languageのキホン
真Intermediate languageのキホン
 
.NET Coreから概観する.NETのOSSへの取り組み
.NET Coreから概観する.NETのOSSへの取り組み.NET Coreから概観する.NETのOSSへの取り組み
.NET Coreから概観する.NETのOSSへの取り組み
 
Win32 APIをてなずけよう
Win32 APIをてなずけようWin32 APIをてなずけよう
Win32 APIをてなずけよう
 
式の体を成して無い式を式の体を成すように式と式木で何とかする式
式の体を成して無い式を式の体を成すように式と式木で何とかする式式の体を成して無い式を式の体を成すように式と式木で何とかする式
式の体を成して無い式を式の体を成すように式と式木で何とかする式
 

Recently uploaded

2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Yara Milbes
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 

Recently uploaded (20)

2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 

Locality of Reference

  • 2. Kouji Matsui - kekyo • NAGOYA city, AICHI pref., JP • Twitter – @kekyo2 / Facebook • ux-spiral corporation • Microsoft Most Valuable Professional VS and DevTech 2015- • Certified Scrum master / Scrum product owner • Center CLR organizer. • .NET/C#/F#/IL/metaprogramming or like… • Bike rider
  • 3. Agenda •Physical side scales •Logical side scales •Data stream between physicals and logicals •Locality of reference •Anti-locality of reference •Conclusion
  • 5. Physical side scales Processor #1 Physical Core #4 Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #3 Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #2 Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #1 Logical Core #1Logical Core #1Logical Core #1Logical Core #1 Processor #2 Physical Core #8 Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #7 Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #6 Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #5 Logical Core #1Logical Core #1Logical Core #1Logical Core #17 Processor #3 Physical Core #12 Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #11 Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #10 Logical Core #1Logical Core #1Logical Core #1Logical Core #1Physical Core #9 Logical Core #1Logical Core #1Logical Core #1Logical Core #33
  • 6. Physical side scales The memory/IO bind at the fixed CPU/Core (Non configurable)
  • 7. Physical side scales The “shared cache memory” bind at the fixed CPU/Core (Non configurable)
  • 8. Physical side scales The “cache memory” bind at the fixed CPU/Core (Non configurable) The “shared cache memory” bind at the fixed CPU/Core (Non configurable)
  • 9. Agenda •Physical side scales •Logical side scales •Data stream between physicals and logicals •Locality of reference •Anti-locality of reference •Conclusion
  • 10. Logical side scales Process #1 Virtual Memory Space Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Process #2 Virtual Memory Space Thread #1 Thread #1 Thread #1 Thread #1 Thread #11 Process #3 Virtual Memory Space Thread #1 Thread #1 Thread #1 Thread #1 Thread #21 Process #4 Virtual Memory Space Thread #1 Thread #1 Thread #1 Thread #1 Thread #31 Process #5 Virtual Memory Space Thread #1 Thread #1 Thread #1 Thread #1 Thread #41
  • 11. Logical side scales Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #11 Thread #1 Thread #1 Thread #1 Thread #1 Thread #21 Thread #1 Thread #1 Thread #1 Thread #1 Thread #31 Thread #1 Thread #1 Thread #1 Thread #1 Thread #41 Logical Core #4 Logical Core #3 Logical Core #2 Logical Core #1 This is true story Execution context
  • 12. Logical side scales Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #11 Thread #1 Thread #1 Thread #1 Thread #1 Thread #21 Thread #1 Thread #1 Thread #1 Thread #1 Thread #31 Thread #1 Thread #1 Thread #1 Thread #1 Thread #41 Logical Core #4 Logical Core #3 Logical Core #2 Logical Core #1 Switch execution context
  • 13. Agenda •Physical side scales •Logical side scales •Data stream between physicals and logicals •Locality of reference •Anti-locality of reference •Conclusion
  • 14. Data stream between physicals and logicals Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #11 Thread #1 Thread #1 Thread #1 Thread #1 Thread #21 Thread #1 Thread #1 Thread #1 Thread #1 Thread #31 Thread #1 Thread #1 Thread #1 Thread #1 Thread #41 Logical Core #4 Logical Core #3 Logical Core #2 Logical Core #1 L1/L2 cache #1 L1/L2 cache #2 L1/L2 cache #4 L1/L2 cache #3
  • 15. Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #11 Thread #1 Thread #1 Thread #1 Thread #1 Thread #21 Thread #1 Thread #1 Thread #1 Thread #1 Thread #31 Thread #1 Thread #1 Thread #1 Thread #1 Thread #41 Logical Core #4 Logical Core #3 Logical Core #2 Logical Core #1 L1/L2 cache #1 L1/L2 cache #2 L1/L2 cache #4 L3 cache #1 L3 cache #2 L1/L2 cache #3
  • 16. Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #1 Thread #11 Thread #1 Thread #1 Thread #1 Thread #1 Thread #21 Thread #1 Thread #1 Thread #1 Thread #1 Thread #31 Thread #1 Thread #1 Thread #1 Thread #1 Thread #41 Logical Core #4 Logical Core #3 Logical Core #2 Logical Core #1 L1/L2 cache #1 L1/L2 cache #2 L1/L2 cache #3 L1/L2 cache #4 L3 cache #1 L3 cache #2 NUMA node bound memory
  • 17. Agenda •Physical side scales •Logical side scales •Data stream between physicals and logicals •Locality of reference •Anti-locality of reference •Conclusion
  • 18. Thread #1 Thread #1 Thread #1 Thread #1 Thread #31 Thread #1 Thread #1 Thread #1 Thread #1 Thread #41 Logical Core #4 L1/L2 cache #4 L3 cache #2 NUMA node bound memory declaredType currentType stopType field FieldInfo[] Thread #33 context Load/Preload
  • 19. Thread #1 Thread #1 Thread #1 Thread #1 Thread #31 Thread #1 Thread #1 Thread #1 Thread #1 Thread #41 Logical Core #4 L1/L2 cache #4 L3 cache #2 NUMA node bound memory __stack0_0 Thread #42 context __stack0_1 __stack0_2 __stack1_0 declaredType currentType local0 local1 field Load/Preload Switch
  • 20. Thread #1 Thread #1 Thread #1 Thread #1 Thread #21 Thread #1 Thread #1 Thread #1 Thread #1 Thread #31 Thread #1 Thread #1 Thread #1 Thread #1 Thread #41 Logical Core #4 Logical Core #3 L1/L2 cache #3 L1/L2 cache #4 L3 cache #2 NUMA node bound memory declaredType currentType stopType field FieldInfo[]
  • 21. Thread #1 Thread #1 Thread #1 Thread #1 Thread #21 Thread #1 Thread #1 Thread #1 Thread #1 Thread #31 Thread #1 Thread #1 Thread #1 Thread #1 Thread #41 Logical Core #4 Logical Core #3 L1/L2 cache #3 L1/L2 cache #4 L3 cache #2 NUMA node bound memory declaredType currentType stopType field FieldInfo[] stopType field FieldInfo[] field Load/Preload Switch
  • 22. Agenda •Physical side scales •Logical side scales •Data stream between physicals and logicals •Locality of reference •Anti-locality of reference •Conclusion
  • 23. Thread #1 Thread #1 Thread #1 Thread #1 Thread #21 Thread #1 Thread #1 Thread #1 Thread #1 Thread #31 Thread #1 Thread #1 Thread #1 Thread #1 Thread #41 Logical Core #4 Logical Core #3 L1/L2 cache #3 L1/L2 cache #4 L3 cache #2 NUMA node bound memory Common value Common value Common value Load/Preload Load/Preload These threads access common value
  • 24. Thread #1 Thread #1 Thread #1 Thread #1 Thread #21 Thread #1 Thread #1 Thread #1 Thread #1 Thread #31 Thread #1 Thread #1 Thread #1 Thread #1 Thread #41 Logical Core #4 Logical Core #3 L1/L2 cache #3 L1/L2 cache #4 L3 cache #2 NUMA node bound memory Common value Common value Common value Race condition (Receive coherence penalty) STRATEGY: • Turn to immutable • Hashed indexer Writeback Writeback
  • 25. Agenda •Physical side scales •Logical side scales •Data stream between physicals and logicals •Locality of reference •Anti-locality of reference •Conclusion
  • 26. Conclusion The execution context bounds not THREAD. The code executor is CPU CORE. CPU cores have structuable nested cache system. Cache miss penalty is large. Cache coherency penalty is large. Both I/O systems too. Important cache-related architecture: ◦ Locality of reference ◦ Immutable
  • 27. Thanks join! My blog ◦ http://www.kekyo.net/ Current active project: ◦ IL2C - A translator implementation of .NET intermediate language to C language. ◦ YouTube: http://bit.ly/2xtu4MH ◦ GitHub: https://github.com/kekyo/IL2C