摘要 |
A method of detecting the capacity of caches, including the L1 cache built into the CPU and any second level cache (L2) outside the CPU. The method uses a database with varying sizes of data files, and monitors the reading time of the CPU for each size of data file when reading the data from the L1 cache, the L2 cache or the main memory respectively. Because the reading speeds relating to the L1 cache, L2 cache and main memory are different, the capacity of the L1 and L2 cache can be determined by matching the change in reading speed to corresponding sizes of data files.
|