| US 7,571,188 B1 | ||
| Cache abstraction for modeling database performance | ||
| Herbert Dewitt Schwetman, Jr., Austin, Tex. (US); and Philip Eugene Cannata, Austin, Tex. (US) | ||
| Assigned to Sun Microsystems, Inc., Santa Clara, Calif. (US) | ||
| Filed on Sep. 23, 2004, as Appl. No. 10/948,389. | ||
| Int. Cl. G06F 7/00 (2006.01); G06F 17/00 (2006.01) | ||
| U.S. Cl. 707—104.1 [707/200; 711/122] | 9 Claims |

| 1. A method for modeling a database management system using a cache hierarchy, comprising:
receiving a query to be searched in the cache hierarchy, wherein the cache hierarchy comprises a first cache and a second
cache,
wherein the first cache comprises a first partition and a second partition,
wherein the first partition is associated with a lock counter,
wherein the lock counter tracks a number of threads attempting to access data in the first partition, and
wherein delay caused by a locking mechanism associated with the first partition is modeled based, in part, on the lock counter;
computing a hit rate value associated with the first cache in the cache hierarchy, wherein the hit rate value is computed
based, in part, on a counter group, wherein computing the hit rate value comprises computing a ratio of current contents of
the first cache over a size of a file associated with the query, and wherein the file is cached in the first cache;
comparing the hit rate value to a predetermined value to obtain a result, wherein the predetermined value is a number randomly
selected from a uniform distribution, wherein a hit is determined when the predetermined value is not greater than the hit
rate value;
providing a reply to the query when the result corresponds to the hit;
incrementing a counter in the counter group when the first cache is not full;
proceeding to the second cache in the cache hierarchy when the result is a miss; and
providing a diagnostic output comprising a overall performance for the database management system, wherein the overall performance
is determined, in part, on the delay caused by the locking mechanism associated with the first partition.
|