Skip to content

Instantly share code, notes, and snippets.

@auriza
Last active March 5, 2019 09:06
Show Gist options
  • Save auriza/8f0301eb785000561be04d684b7c669e to your computer and use it in GitHub Desktop.
Save auriza/8f0301eb785000561be04d684b7c669e to your computer and use it in GitHub Desktop.

Cek Spesifikasi Cache CPU

Gunakan perintah lscpu untuk melihat info tentang CPU.

$ lscpu

Model name:   Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz
L1d cache:    32K
L1i cache:    32K
L2 cache:     256K
L3 cache:     3072K

Detail cache CPU terdapat pada direktori /sys/devices/system/cpu/cpu0/cache. Berikut perintah untuk menampilkan detail level, ukuran, ways, line size, dan jenis cache.

$ cat /sys/devices/system/cpu/cpu0/cache/index{0..3}/{level,size,ways*,*line_size,type} |
  paste - - - - -

1  32K    8   64  Data
1  32K    8   64  Instruction
2  256K   8   64  Unified
3  3072K  12  64  Unified

Dengan demikian, diperoleh informasi sebagai berikut.


Detail cache Intel Core i3-2330M

Level Ukuran Ways Line size Jenis
1 32K 8 64 Data
1 32K 8 64 Instruction
2 256K 8 64 Unified
3 3072K 12 64 Unified

Detail cache Intel Atom N450

Level Ukuran Ways Line size Jenis
1 24K 6 64 Data
1 32K 8 64 Instruction
2 512K 8 64 Unified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment