It’s very important to remember that PHP caches results of file-system functions. Details are here.
Just stumbled upon What every programmer should know about memory:
- Part 1 (Introduction)
- Part 2 (CPU Caches)
- Part 3 (Virtual memory)
- Part 4 (NUMA systems)
- Part 5 (Cache optimization)
- Part 6 (Threaded optimizations)
- Part 7 (Memory performance tools)
- Part 8 (Future technologies)
- Part 9 (Appendices and bibliography)
Use the following commands:
dmidecode -t cache
Reading the Apache Caching Guide is on my list of things to do.