3.7 Summary
This chapter has provided many tips to the application writer on how to avoid performance problems related to storage devices ranging from caches to file systems. The important issues are:
-
Avoid cache thrashing and memory bank contention by dimensioning multidimensional arrays so that the dimensions are not powers of two.
-
Eliminate TLB misses and memory bank contention by accessing arrays in unit stride.
-
Reduce TLB misses by using large pages on applications with large memory (data or text) usage.
-
Avoid Fortran I/O interfaces.
-
Do your own buffering for I/O and use system calls to transfer large blocks of data to and from files.