-
Notifications
You must be signed in to change notification settings - Fork 583
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
storage-mon: Don't use random seeking when O_DIRECT is enabled #1968
base: main
Are you sure you want to change the base?
Conversation
Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-1968/1/input |
the reason to do random seek is also to probe different part of the disk and not just sector 0. What problem are we trying to solve with this change? |
I'm not sure why we wouldn't want to do random checks around the disk in O_DIRECT mode; that seek was there mainly to run checks on different parts of the disk (not just the page cache), where random errors may be hiding. Always checking sector 0 doesn't seem quite so useful, though I admit I'm no storage expert. |
If using a random sector was just to not always read the same from cache not moving a potentially physical head around if not needed with O_DIRECT might make sense. |
Thank you for your guidance. Assuming a sector size of 512 bytes, and assuming no duplicates in the randomly chosen seek positions, time_required [years] = ((disk_size [bytes]) / 512 [bytes per sector]) / ((24 [hours] * 60 [minutes] * 60 [seconds]) / (interval_to_test [seconds])) / 365 [days] For example, let's assume the following:
Then, the time_required is approximately 31 years and 10 months. While there is a possibility of random seeks randomly finding bad sectors, However, if you expect storage_mon to find bad sectors, I think it would be best to retain these random seeks.
I agree. This idea respects both sides of the argument. |
Guess you have to find some kind of a trade-off between a full surface-check and something that has so little impact that it can be done during operation. |
Hi all,
I propose modifying to set random seeks only when the O_DIRECT flag is disabled.
I understand that the purpose of random seeks is to avoid false negatives that arise from reading from the page cache.
With the O_DIRECT flag enabled, it allows accessing the file system without going through the page cache.
This means that even without setting random seeks, it is possible to bypass the cache and read from the device directly.