Chapter 3. Memory
Along with the CPU, memory is a critical hardware resource that directly affects the performance of any program running on a web server. When it comes to generating web pages using ASP.NET, a shortage of memory reduces performance for two fundamental reasons:
It forces the server to swap data out of memory to the swap file on disk. This not only increases CPU usage and disk I/O, but also slows down data access because accessing data on disk is much slower than accessing data in memory.
It prevents you from using caching, a powerful technique that trades off increased memory use for improved performance. Caching is discussed in Chapter 5,
The quickest and cheapest way to overcome memory problems may be to simply add more physical memory to the server, rather than spending the developers' time to fix the issue. On the other hand, if your application is very memory-hungry, you may be better off fixing this to avert running out of memory again in the near future.
This chapter...