All Notes
What every programmer should know about memory
I was going through the Redhat paper “What every programmer should know about memory”. Just collecting some topics that interested me when it comes to low-latency techniques. Not sure yet if I’ll do a deep dive on some or all of what I collect here. Paper review is definitely going to be done.
- Intro
- RAM (tbh not sure how useful for low-latency programming in my day2day)
- SRAM v DRAM useful, remaining not too useful
- Read-access protocol, DDR1->DDR2 might not be useful
- CPU (important)
- program on disk, how does it get to ram and moves between caches
- cache lines
- Walk through memory hierarchy of computer
- various levels of cache
- l1 cache seperate between data and instructions
- associativity - important
- virtualisation and virtual memory (important)
- how does OS provide illusion that we have more resources to play with than available on hardware
- address translation, mulitilevel page tables, tlb
- NUMA hardware (important)
- topoplogy of CPU cores relative to memory
- uma v numa
- different data access patterns - how does it affect performance
- 6.4 concurrency optimisations
- context swithces
- sw v hw threads
- oversubscribing
- atomics e.g. cas
- cost of threads
- perf degradation
Other notes about Low Latency
- 🌱C++ low-latency design patterns
A brief description of what this note covers