CMU-SAFARI/MQSim

Retrieving Info on Specific Requests

Closed this issue · 2 comments

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

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.

Hi @arashta,

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

Gavin