Optimizing System MemoryNavigation |
Optimizing System MemorySubmitted by epreisz on Sat, 02/17/2007 - 20:49.
There is a classic book on optimization written in 1996. The book was revolutionary because it pointed out that optimization is not just a left brained process. Although the book is over a decade old, there are still many portions of the book that are true today. It’s view on memory is not one of them. Ten years ago, it was likely that our application could not process arithmetic and logic fast enough to contend with the speed of memory. This is no longer the case. Now a single compulsorily cache miss can take as much time as hundreds of arithmetic operations. If your application is CPU bound, and it uses a reasonable amount of memory, then you are likely memory bound. Cache misses play the most major role in memory issues on the CPU, but before we can discuss how to solve cache misses, we need to understand what cache misses are. Let’s use an example from my college days: Beer Me! My roommates and I enjoyed watching hockey games in our living room. Unfortunately, the fridge was very far away from our couch. In order to get to the fridge, we had to walk though a narrow hallway to get to the kitchen. After missing several goals, we decided that we should get a little cooler and keep it by the couch. That way when we needed a beer, we could simply reach down and grab it. Sometimes, we would reach for a beer and the cooler would be empty (a compulsorily beer miss). We then had to go back to the fridge, but this time, we grabbed several beers and filled up the cooler. So how do we save ourselves from causing cache misses? Let’s take a look at a popular method for increasing cache performance. |
User login |
Recent comments
8 hours 9 min ago
8 hours 15 min ago
8 hours 15 min ago
8 hours 16 min ago
8 hours 17 min ago
8 hours 17 min ago
8 hours 21 min ago
8 hours 23 min ago
8 hours 26 min ago
8 hours 26 min ago