Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small reads in IOCP don't put enough pressure on the disk, so results can be misleading. #118

Open
jimon opened this issue Sep 9, 2019 · 2 comments

Comments

@jimon
Copy link

jimon commented Sep 9, 2019

That information is coming from my private research on IOCP performance, but looking on how diskspd is implemented, it might be a case it's also prone to similar issues.

Given 4k/8k/16k/32k reads and given NVMe drive with high enough performance ( tested on samsung 970 pro ), ReadFile(Ex) takes more time than GetQueuedCompletionStatus. Meaning that operations complete faster than we can schedule practically them in one thread.

This can be observed by making two threads, one calling ReadFileEx and incrementing an atomic counter (queue depth), another thread calling GetQueuedCompletionStatus and decrementing same counter. The counter rarely gets above 1.

image

This is a graph showing "tried schedule depth" vs "actual mean read queue depth", only 64k/128k/1024k requests actually scale with schedule depth, while smaller ones are not.

Given that CrystalDiskMark is actively using diskspd in 4K Q32T1 configuration, the results can be hugely misleading, because there is very little difference between Q32T1 and smaller queue depths as actual disk pressure barely reaches >1. In my opinion diskspd should report mean queue depth so tools like CrystalDiskMark can better visualize what is going on.

@dl2n
Copy link
Member

dl2n commented Sep 9, 2019 via email

@jimon
Copy link
Author

jimon commented Sep 10, 2019

Yes, it is completely normal behavior, just that there is no warning/feedback.
Runtime warning would be reasonable solution! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants