I am currently trying to test read/write throughput to SSDs. These SSDs are read/written to via NVMe protocol. Currently, I am confused because I have seen two methods.
The first is directly writing some block of data to the NVMe device file, and recording the time it takes for the driver to complete this operation.
The second is to mount a file system on a partition of the SSD and perform the same operation: write to a file in the file system mounted on the partition and record the time.
What is actually going on under the hood? Which will give a more genuine result for the throughput?