CMU-SAFARI / MQSim

MQSim is a fast and accurate simulator modeling the performance of modern multi-queue (MQ) SSDs as well as traditional SATA based SSDs. MQSim faithfully models new high-bandwidth protocol implementations, steady-state SSD conditions, and the full end-to-end latency of requests in modern SSDs. It is described in detail in the FAST 2018 paper by Arash Tavakkol et al., "MQSim: A Framework for Enabling Realistic Studies of Modern Multi-Queue SSD Devices" (https://people.inf.ethz.ch/omutlu/pub/MQSim-SSD-simulation-framework_fast18.pdf)
https://people.inf.ethz.ch/omutlu/pub/MQSim-SSD-simulation-framework_fast18.pdf
MIT License
268 stars 144 forks source link

Retrieving Info on Specific Requests #42

Closed gavin2059 closed 3 years ago

gavin2059 commented 3 years ago

Hello,

I'm wondering if there's an easy way to modify the code so that it outputs information for each individual read/write request within a stream (i.e. request #500 occurred at time x, completed at time y, and had z requests queued in front of it)? If anyone could point me in the right direction it would be much appreciated :)

Cheers,

Gavin

arashta commented 3 years ago

Hi @gavin2059,

Currently, you can easily get the request initiation and completion times by adding the following line to IO_Flow_Base::NVMe_consume_io_request (if you are using a SATA interface instead of NVMe, please go to function IO_Flow_Base::SATA_consume_io_request):

PRINT_MESSAGE(" " << request->Arrival_time << " " << request->Enqueue_time << " " << Simulator->Time()<< std::endl);

The above line will log the request on the console. If you need to log the requests to a file, you need to manage file creation on your own.

To log request ID, you need to add an ID field to the Host_IO_Request class and increment it with some code in the constructor whenever a new IO request is created.

To log the queue size at the time that the request was created, you need to add another parameter to the Host_IO_Request class to record that information at the time of request initiation. Every request would be handed to the IO_Flow_Base::Submit_io_request(Host_IO_Request* request) function after generation. In that function, you can easily record the queue size at the time of request generation/arrival.

gavin2059 commented 3 years ago

Hi @arashta,

Thanks for the quick and detailed response. This helps a lot. I'll try implementing your suggestions :)

Gavin