Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lecture materials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
generic software skills
lecture materials
Commits
94c2ce8a
Commit
94c2ce8a
authored
9 months ago
by
Dominik Zobel
Browse files
Options
Downloads
Patches
Plain Diff
Add chapters, intended takeaway and some reformatting
parent
2c7ca7e2
No related branches found
Branches containing commit
No related tags found
1 merge request
!74
Memory hierarchies lecture
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lectures/memory-hierarchies/slides.qmd
+112
-18
112 additions, 18 deletions
lectures/memory-hierarchies/slides.qmd
with
112 additions
and
18 deletions
lectures/memory-hierarchies/slides.qmd
+
112
−
18
View file @
94c2ce8a
...
...
@@ -11,6 +11,15 @@ author: "Dominik Zobel and Florian Ziemen"
## Intended Takeaways
- Locality matters: data-centric view
- Think workbench: Operating with parts of the data
- Processor tries to be busy all the time (prefetching)
- Latency and memory sizes of components
## Questions {.handson .incremental}
- Why not keep everything in memory?
...
...
@@ -19,6 +28,8 @@ author: "Dominik Zobel and Florian Ziemen"
# Speed and access time
## Processor speed vs. memory speed
{width=70%}
...
...
@@ -135,12 +146,12 @@ new_data = operate_on_data(data=data,
```
-->
| | Levante (Fixed) | L
ocal
(Fixed)
| Levante (Random) | L
ocal
(Random)
|
| | Levante (Fixed) | L
aptop
(Fixed) | Levante (Random) | L
aptop
(Random) |
| -------------------------- | ----------------- | ----------------- | ----------------- | ----------------- |
| Create data | 0.56
07
| 0.2
280
| 1.66
23
| 0.8
759
|
| Load data | 0.76
05
| 0.8
767
| 0.76
15
| 0.92
25
|
| Store data | 2.23
17
| 4.04
27
| 2.23
27
| 3.4
378
|
| Process data | 0.76
18
| 0.3
792
| 0.7
572
| 0.37
47
|
| Create data | 0.56
| 0.2
3
| 1.66
| 0.8
8
|
| Load data | 0.76
| 0.8
8
| 0.76
| 0.92
|
| Store data | 2.23
| 4.04
| 2.23
| 3.4
4
|
| Process data | 0.76
| 0.3
8
| 0.7
6
| 0.37
|
:::{.smaller}
Time in seconds using a 2 GB numpy array ($128 \times 128 \times 128 \times 128$) either with a fixed number or random number in each entry
...
...
@@ -156,6 +167,9 @@ Time in seconds using a 2 GB numpy array ($128 \times 128 \times 128 \times 128$
# Theory
## Techniques
- Caching
...
...
@@ -248,6 +262,8 @@ T_{avg,s} &= H_1 T_1 + ((1-H_1)\cdot H_2)\cdot(T_1+T_2)\\
# Visualizations
## Memory Pyramid (upwards)
...
...
@@ -269,14 +285,25 @@ T_{avg,s} &= H_1 T_1 + ((1-H_1)\cdot H_2)\cdot(T_1+T_2)\\
## Memory Pyramid (downwards)
- check numbers
{auto-animate=true}
## Memory Pyramid (downwards) {auto-animate=true}
Order of magnitude on Levante (AMD EPYC 7763)
- Base frequency: 2.45 GHz
## Memory Pyramid (downwards) - check numbers {auto-animate=true}
## Memory Pyramid (downwards) {auto-animate=true}
::::::::{.r-stack}
:::{.normal style="color: #ffcccc; font-size: 3em; font-weight: bold; rotate: -30deg; opacity: 0.5;"}
Check numbers
:::
:::{.normal}
Order of magnitude on Levante (AMD EPYC 7763)
...
...
@@ -284,6 +311,9 @@ Order of magnitude on Levante (AMD EPYC 7763)
------------ ----------------- ---------
Register ~0.4 1 KB
:::
::::::::
:::{.incremental}
...
...
@@ -292,7 +322,17 @@ Register ~0.4 1 KB
:::
## Memory Pyramid (downwards) - check numbers {auto-animate=true}
## Memory Pyramid (downwards) {auto-animate=true}
::::::::{.r-stack}
:::{.normal style="color: #ffcccc; font-size: 3em; font-weight: bold; rotate: -30deg; opacity: 0.5;"}
Check numbers
:::
:::{.normal}
Order of magnitude on Levante (AMD EPYC 7763)
...
...
@@ -301,6 +341,10 @@ Order of magnitude on Levante (AMD EPYC 7763)
Register ~0.4 1 KB
L1 Cache ~1.1 32 KB
:::
::::::::
:::{.incremental}
- Same factors for L2 and L3
...
...
@@ -308,7 +352,17 @@ L1 Cache ~1.1 32 KB
:::
## Memory Pyramid (downwards) - check numbers {auto-animate=true}
## Memory Pyramid (downwards) {auto-animate=true}
::::::::{.r-stack}
:::{.normal style="color: #ffcccc; font-size: 3em; font-weight: bold; rotate: -30deg; opacity: 0.5;"}
Check numbers
:::
:::{.normal}
Order of magnitude on Levante (AMD EPYC 7763)
...
...
@@ -319,6 +373,10 @@ L1 Cache ~1.1 32 KB
L2 Cache ~3.3 512 KB
L3 Cache ~12.8 32 MB
:::
::::::::
:::{.incremental}
- 256 GB of main memory (default) with a theoretical memory bandwidth of ~200 GB/s
...
...
@@ -327,7 +385,17 @@ L3 Cache ~12.8 32 MB
## Memory Pyramid (downwards) - check numbers {auto-animate=true}
## Memory Pyramid (downwards) {auto-animate=true}
::::::::{.r-stack}
:::{.normal style="color: #ffcccc; font-size: 3em; font-weight: bold; rotate: -30deg; opacity: 0.5;"}
Check numbers
:::
:::{.normal}
Order of magnitude on Levante (AMD EPYC 7763)
...
...
@@ -339,6 +407,10 @@ L2 Cache ~3.3 512 KB
L3 Cache ~12.8 32 MB
Main Memory 60 256 GB
:::
::::::::
:::{.incremental}
- Fast Data as Flash based file system
...
...
@@ -347,7 +419,17 @@ Main Memory 60 256 GB
## Memory Pyramid (downwards) - check numbers {auto-animate=true}
## Memory Pyramid (downwards) {auto-animate=true}
::::::::{.r-stack}
:::{.normal style="color: #ffcccc; font-size: 3em; font-weight: bold; rotate: -30deg; opacity: 0.5;"}
Check numbers
:::
:::{.normal}
Order of magnitude on Levante (AMD EPYC 7763)
...
...
@@ -358,7 +440,11 @@ L1 Cache ~1.1 32 KB
L2 Cache ~3.3 512 KB
L3 Cache ~12.8 32 MB
Main Memory 60 256 GB
SSD 100 1 PB
SSD 100 200 TB
:::
::::::::
:::{.incremental}
...
...
@@ -368,7 +454,17 @@ SSD 100 1 PB
## Memory Pyramid (downwards) - check numbers {auto-animate=true}
## Memory Pyramid (downwards) {auto-animate=true}
::::::::{.r-stack}
:::{.normal style="color: #ffcccc; font-size: 3em; font-weight: bold; rotate: -30deg; opacity: 0.5;"}
Check numbers
:::
:::{.normal}
Order of magnitude on Levante (AMD EPYC 7763)
...
...
@@ -379,15 +475,13 @@ L1 Cache ~1.1 32 KB
L2 Cache ~3.3 512 KB
L3 Cache ~12.8 32 MB
Main Memory ~60 256 GB
SSD ~100
1 P
B
SSD ~100
200 T
B
Hard disk ~3000 130 PB
:::{.incremental}
- Tape backup also possible
:::
::::::::
## Memory Mountain (1/2)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment