1

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.

  1. 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.

  2. 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?

0

Reads and writes to a block device are not cached. Accessing a file system involved the page cache which is a lot faster that even an SSD. So you have to put more thought into how you want to measure.

When you use a system then you use filesystems and you use the page cache. So these are probably the more relevant results. I assume that the performance difference is smaller when using a filesystem.

  • @JohnFrye Define better. You have asked for opinions. If you already have one, why haven't you explained it in your question? I have explained my assessment. You do not respond to that at all but ask without any reasoning if the opposite of what I have stated was true. How is that kind of discussion supposed to work out? – Hauke Laging Nov 27 '17 at 21:14
  • I apologize. Essentially I have already performed the second of the two options. I am getting rates that are higher than those on the data sheet for the SSD controller. I cannot help wondering if the filesystem caching you explained may play a role in increasing the rate by caching data. By this logic, wouldn't a truer estimation be made by using the block device file? Unfortunately, I am not sure whether there will be a filesystem on the final product. – John Frye Nov 27 '17 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.