Workload generator and simulator for storage caching systems
A method and system for calibrating a simulator instance is disclosed. Specifically, the method and system disclosed herein may receive, by a workload generator, a trace file specifying operations; generate, by the workload generator, a workload based on the operations, wherein the workload includes one or more read or write requests corresponding to the operations of the workload; receive, by the simulator instance, the read or write requests from the workload generator; and process, by the simulator instance, the read or write requests based on a set of simulation parameters to generate simulation results, wherein the simulation instance is calibrated, at least in part, based on the simulation results.
1 . A method of calibrating a simulator instance of a cache memory, the method comprising:
receiving, by a workload generator, a trace file specifying operations of the cache memory, wherein the operations comprise a set of read and write requests arranged in a sequential order of corresponding record identifications;
generating, by the workload generator, a workload based on the operations, wherein the workload is to gauge performance of the simulator instance and includes the set of read and write requests arranged in a sequential order of corresponding record identifications;
generating, by the workload generator, expected results based on each request of cache memory in the workload;
receiving, by the simulator instance executing on a simulator emulating behavior of the cache memory, the set of read and write requests from the workload generator;
processing, by the simulator instance, each request of the set of read and write requests in sequential order by emulating read and write operations to the cache memory based on a set of simulation parameters, wherein the simulator instance receives the set of simulation parameters from a default simulation parameter generator, wherein the set of simulation parameters comprises cache memory type and cache memory size, wherein the simulator instance, based on the set of simulation parameters, emulates behavior of the cache memory;
producing, by the simulator instance and based on the workload, simulation results, wherein the simulation results are produced for each request of the set of read and write requests based on emulating read and write operations to the cache memory;
receiving, by the simulator instance executing on the simulator emulating behavior of the cache memory after producing the simulation results, a second set of read and write requests from the workload generator;
processing, by the simulator instance, each request of the second set of read and write requests in sequential order by emulating the read and write operations to the cache memory based on a second set of simulation parameters, wherein the second set of simulation parameters comprises second cache memory type and second cache memory size, wherein the simulator instance, based on the set of simulation parameters, emulates behavior of the cache memory with the second set of simulation parameters;
producing, by the simulator instance and based on the workload, second simulation results, wherein the second simulation results are produced for each request of the second set of read and write requests based on emulating the read and write operations to the cache memory; and
calibrating the simulator based on comparison results of the simulation results and the second simulation results compared to the expected results to increase simulation reliability of the simulator, wherein a set of optimal parameters between the set of simulation parameters and the second set of simulation parameters are determined for configuration of the cache memory based on the comparison results, wherein:
comparing the expected results and the simulation results is based on record identifications of the expected results and record identifications of the simulation results,
wherein the record identification of the expected results and the simulation results correspond to an order of the operations of the workload generated by the workload generator,
wherein the comparison results are provided to an analysis report processor to develop and fine tune cache polices such as pre-fetch and promotion for the cache memory to determine a best cache size, a best cache type and to test reliability of the simulator using the set of optimal parameters.
2 . The method of claim 1 , wherein the expected results comprise information related to cache hits, cache misses, cache promotions, and cache flushes.
3 . The method of claim 1 , wherein the read and write requests of the workload are arranged by record identifications corresponding to an ordered subset of the sequential record identifications of the operations of the trace file, and the expected results include results for each of the read and write requests of the workload arranged in the order of the record identifications of the workload.
4 . The method of claim 1 , wherein the simulator instance is based, at least in part, on a cache simulation framework, which specifies common attributes and procedures of a multi-layered cache simulator.
5 . The method of claim 1 , further comprising:
receiving an orchestration file including different combinations of configuration parameters for the simulator instance,
wherein the processing of the read and write requests to generate the simulation results comprises using the at least a portion of the different combinations of configuration parameters.
6 . A device, comprising:
a processor; and
memory comprising instructions which, when executed by the processor, perform a method of calibrating a simulator instance of a cache memory, the method comprising:
receiving, by a workload generator, a trace file specifying operations of the cache memory, wherein the operations comprise a set of read and write requests arranged in a sequential order of corresponding record identifications;
generating, by the workload generator, a workload based on the operations, wherein the workload is to gauge performance of the simulator instance and includes the set of read and write requests arranged in a sequential order of corresponding record identifications;
generating, by the workload generator, expected results based on each request of cache memory in the workload;
receiving, by the simulator instance executing on a simulator emulating behavior of the cache memory, the set of read and write requests from the workload generator;
processing, by the simulator instance, each request of the set of read and write requests in sequential order by emulating read and write operations to the cache memory based on a set of simulation parameters, wherein the simulator instance receives the set of simulation parameters from a default simulation parameter generator, wherein the set of simulation parameters comprises cache memory type and cache memory size, wherein the simulator instance, based on the set of simulation parameters, emulates behavior of the cache memory;
producing, by the simulator instance and based on the workload, simulation results, wherein the simulation results are produced for each request of the set of read and write requests based on emulating read and write operations to the cache memory;
receiving, by the simulator instance executing on the simulator emulating behavior of the cache memory after producing the simulation results, a second set of read and write requests from the workload generator;
processing, by the simulator instance, each request of the second set of read and write requests in sequential order by emulating the read and write operations to the cache memory based on a second set of simulation parameters, wherein the second set of simulation parameters comprises second cache memory type and second cache memory size, wherein the simulator instance, based on the set of simulation parameters, emulates behavior of the cache memory with the second set of simulation parameters;
producing, by the simulator instance and based on the workload, second simulation results, wherein the second simulation results are produced for each request of the second set of read and write requests based on emulating the read and write operations to the cache memory; and
calibrating the simulator based on comparison results of the simulation results and the second simulation results compared to the expected results to increase simulation reliability of the simulator, wherein a set of optimal parameters between the set of simulation parameters and the second set of simulation parameters are determined for configuration of the cache memory based on the comparison results, wherein:
comparing the expected results and the simulation results is based on record identifications of the expected results and record identifications of the simulation results,
wherein the record identification of the expected results and the simulation results correspond to an order of the operations of the workload generated by the workload generator,
wherein the comparison results are provided to an analysis report processor to develop and fine tune cache polices such as pre-fetch and promotion for the cache memory to determine a best cache size, a best cache type and to test reliability of the simulator using the set of optimal parameters.
7 . The device of claim 6 , wherein the expected results comprise information related to cache hits, cache misses, cache promotions, and cache flushes.
8 . The device of claim 6 , wherein the method further comprises:
the read and write requests of the workload are arranged by record identifications corresponding to an ordered subset of the sequential record identifications of the operations of the trace file, and the expected results include results for each of the read and write requests of the workload arranged in the order of the record identifications of the workload.
9 . The device of claim 6 , wherein the simulator instance is based, at least in part, on a cache simulation framework, which specifies common attributes and procedures of a multi-layered cache simulator.
10 . The device of claim 6 , wherein the method further comprises:
receiving an orchestration file including different combinations of configuration parameters for the simulator instance,
wherein the processing of the read and write requests to generate the simulation results comprises using the at least a portion of the different combinations of configuration parameters.
11 . A non-transitory computer readable medium comprising computer readable program code, which when executed by a computer processor enables the computer processor to perform a method calibrating a simulator instance of a cache memory, the method comprising:
receiving, by a workload generator, a trace file specifying operations of the cache memory, wherein the operations comprise a set of read and write requests arranged in a sequential order of corresponding record identifications;
generating, by the workload generator, a workload based on the operations, wherein the workload is to gauge performance of the simulator instance and includes the set of read and write requests arranged in a sequential order of corresponding record identifications;
generating, by the workload generator, expected results based on each request of cache memory in the workload;
receiving, by the simulator instance executing on a simulator emulating behavior of the cache memory, the set of read and write requests from the workload generator;
processing, by the simulator instance, each request of the set of read and write requests in sequential order by emulating read and write operations to the cache memory based on a set of simulation parameters, wherein the simulator instance receives the set of simulation parameters from a default simulation parameter generator, wherein the set of simulation parameters comprises cache memory type and cache memory size, wherein the simulator instance, based on the set of simulation parameters, emulates behavior of the cache memory;
producing, by the simulator instance and based on the workload, simulation results, wherein the simulation results are produced for each request of the set of read and write requests based on emulating read and write operations to the cache memory;
receiving, by the simulator instance executing on the simulator emulating behavior of the cache memory after producing the simulation results, a second set of read and write requests from the workload generator;
processing, by the simulator instance, each request of the second set of read and write requests in sequential order by emulating the read and write operations to the cache memory based on a second set of simulation parameters, wherein the second set of simulation parameters comprises second cache memory type and second cache memory size, wherein the simulator instance, based on the set of simulation parameters, emulates behavior of the cache memory with the second set of simulation parameters;
producing, by the simulator instance and based on the workload, second simulation results, wherein the second simulation results are produced for each request of the second set of read and write requests based on emulating the read and write operations to the cache memory; and
calibrating the simulator based on comparison results of the simulation results and the second simulation results compared to the expected results to increase simulation reliability of the simulator, wherein a set of optimal parameters between the set of simulation parameters and the second set of simulation parameters are determined for configuration of the cache memory based on the comparison results, wherein:
comparing the expected results and the simulation results is based on record identifications of the expected results and record identifications of the simulation results,
wherein the record identification of the expected results and the simulation results correspond to an order of the operations of the workload generated by the workload generator,
wherein the comparison results are provided to an analysis report processor to develop and fine tune cache polices such as pre-fetch and promotion for the cache memory to determine a best cache size, a best cache type and to test reliability of the simulator using the set of optimal parameters.