CACHE(8)
π CACHE(8) π
okay bestie, welcome to the LMBENCH corner of the man pages π this one is cache, and she is trying her best to figure out what your memory hierarchy is actually doing. spoiler: it's messy in here. π«Ά
β¨ NAME β¨
cache β cache parameters π¦
πΈ SYNOPSIS πΈ
cache [ -L <line size> ] [ -M <len> ] [ -W <warmups> ] [ -N
<repetitions> ]
π DESCRIPTION π
so like, cache is out here trying to determine the characteristics of the memory hierarchy. yes ma'am. she's attempting to determine:
- the number of caches π’
- the size of each cache π
- the line size for each cache βοΈ
- and the available memory parallelism at each level in the memory hierarchy π
and the largest amount of memory she will examine is len bytes. that's the ceiling, bestie, we do not go past it. π«
here's the gameplay loop, and honestly it's giving detective energy π: cache first attempts to determine the number and size of caches by measuring the memory latency for various memory sizes. once it has identified the various caches, it then measures the latency, parallelism, and line size for each cache. slay, methodical queen. π
but β and I need you to sit down for this β determining the cache size merely from latency is exceedingly difficult π because of variations in cache replacement and prefetching strategies. like, the hardware is doing little secret things and we're just out here timing stuff. it's giving chaos. πͺοΈ
and yeah, you can hand her -L <line size>, -M <len>, -W <warmups>, and -N <repetitions> if you wanna. β¨
π BUGS π
bestie. listen. this is important.
cache is an experimental benchmark and is known to fail on many processors. π
in particular, there are a large number of machines with weird caching behavior that confuse cache and prevent it from accurately determining the number and size of the various caches. so if the numbers come out looking unhinged, it's not you, it's the silicon. π
π«Ά SEE ALSO π«Ά
the whole friend group!! go say hi!! π
π AUTHOR π
Carl Staelin and Larry McVoy π
Comments, suggestions, and bug reports are always welcome. fr fr, they want to hear from you. π
and that's the whole page, bestie!! π this one comes to you (c)2000 Carl Staelin and Larry McVoy, with a $Date$ stamped on it like a little time capsule, and it lives under CACHE(8) in LMBENCH. go measure something. periodt. β¨π
π¦
π¦ where this page comes from
- debian bookworm: lmbench 3.0-a9+debian.1-6
- debian trixie: lmbench 3.0-a9+debian.1-9
- ubuntu jammy: lmbench 3.0-a9+debian.1-6
- ubuntu noble: lmbench 3.0-a9+debian.1-6build3
- ubuntu questing: lmbench 3.0-a9+debian.1-9
- ubuntu resolute: lmbench 3.0-a9+debian.1-10
- ubuntu stonking: lmbench 3.0-a9+debian.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms