Linux Tutorials - Herong's Tutorial Examples - v5.45, by Herong Yang
Layers of Memory and Access Speed
This section describes layers of memory: CPU Register, CPU Caches, RAM and hard disk.
What Is Memory? - Memory is just a form of data storage. On a typical Linux system, there are 4 layers of storage with different access speeds:
1. CPU Registers - CPU (Central Computing Unit) registers is a set of data holding places built inside the CPU. In a 64-bit CPU, each register is 64 bits in length. Access speed on CPU registers is 1 CPU cycle.
2. CPU Cache - A CPU cache is a smaller, faster storage, located next to the CPU. A computer system may have multiple CPU caches organized in a hierarchy of cache levels. Access speed on CPU caches is about 3 to 14 CPU cycles.
3. RAM - RAM (Random Access Memory) is storage located next to the CPU. RAM is used store data and machine code of running processes. Access speed on RAM is about 250 CPU cycles cycles.
4. Hard disk - A hard disk is a larger and slower storage that can store data Permanently. Access speed on disk is about 40,000,000 CPU cycles.
The diagram below shows the 4 layers of storage in 2-CPU computer systems.
Table of Contents
Cockpit - Web Portal for Administrator
►Layers of Memory and Access Speed
List CPU Caches and Their Sizes
Virtual Memory vs. Physical Memory
Buffer Memory and Cache Memory
Verify Cache Memory with "cp" Command
Virtual Memory Mapping and Page Table
"ps -o rss,drs,trs,vsz,sz" - Process Status Options
smem - Process Memory Usage Report
/proc/{id}/maps - Process Memory Map
/proc/{id}/smaps - Process Memory Map Details
SELinux - Security-Enhanced Linux
SSH Protocol and ssh/scp Commands
Software Package Manager on CentOS - DNF and YUM
vsftpd - Very Secure FTP Daemon