-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Zpool iostat show ssd #5117
Zpool iostat show ssd #5117
Conversation
5316348
to
a41306f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be "rotational" rather than "rotary", to match the Linux kernel.
@rlaager thanks for the suggestion. I have changed in a temporary branch zpool_iostat_show_ssd_2 of my zfs clone. Do I just forcefully push to the branch for the pull request? Wondering, as I guess that will kill some history the suggestion is based on. (Although this is a rather harmless one.) |
I believe a force push will work. It's fine to throw away the history. That's normal in pull requests. |
b15ec3a
to
c194ebd
Compare
@inkdot7 force-pushing is fine, I and the others do the same :) |
@rlaager new version pushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rotary -> nonrotational changes look good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently at the OpenZFS Hackathon. I spoke to a couple people, and they had the following feedback:
- This probably makes more sense in
zpool status
. The rotational state of disks is not changing second-by-second. - This is, in practice, Linux-specific, which may argue against its acceptance at all.
- The kernel's idea of what is non-rotational may not be accurate.
- Why not just use standard OS tools (e.g. hdparm) and interfaces (e.g. /proc) to determine this? Why does this need to exist in the ZFS tools at all?
Can you comment in light of this feedback? If you really think this still belongs in ZFS, how do you feel about moving it to zpool status
?
Thanks @rlaager for investigating this!
|
Also |
c194ebd
to
e5010bf
Compare
Seconding the "4) Why not just use standard OS tools (e.g. hdparm) and interfaces (e.g. /proc) to determine this? Why does this need to exist in the ZFS tools at all?". |
@behlendorf, I recommend rejecting this pull request, primarily on the basis that it duplicates standard OS tool functionality without sufficient reason. |
Well, whatever happens to this PR, I'll keep the branch around. It could be that once dedicated vdev metadata / small block allocation functionality is included, it is found to be good to give the user a convenient way too see that the vdevs configured are of the intended nonrotational kinds. (I have a pending update of the mixed-case logic - it did not do the 'right thing' for deeply nested devices (e.g. the top-level). But that is simpler once |
If you end up merging it with that work, that's another argument in favor of showing this in |
The allocation class version shows them in both |
In the past I've wanted this exact functionality in both commands. It's helpful when you want to see at a glance if a device is performing roughly within expectations. For example, I don't expect many IOPs out of a HDD but I do from an SSD.
That's alright, it just needs to be optional. We shouldn't have to limit the Linux implementation due to the lack of functionality on other platforms.
This is exactly the reason why this should be exposed. Internally ZFS uses this value as one parameter in controlling how/when/if requests are merged. Knowing what the kernel actually thinks about this disk can be insightful.
Because often it's laborious to map the vdev name back to the device to determine this information. We didn't need to add the That all being said I'm not a huge fan of the current output. Can we do something more subtle like leave the default output as is, and optionally add a
|
I'm marking this approved so my "Requested changes" is not blocking this. As long as the default stays as is, this shouldn't be a problem. If the default were to change, then we'd have a big problem for GRUB and others that parse the output of One of the concerns above was about how to fit "ssd" in the |
Crazy idea: Add a 'command' (-c) option to
Another example:
Yes, it's a huge, giant hack, and not very elegant, but it's very extensible and would work on all platforms. You would want |
I would strongly prefer @tonyhutter 's suggestion instead. It's more flexible, it can give out much better information, and it doesn't alter the default output of zpool, upon which many scripts already depend. It's the first proposal in this thread that is (a) risk-free (b) highly interesting to me, as I would find tons of uses for it. For showing whether a device is rotational or not, there could be a separate switch that adds a new column, or a separate utility that shows what ZFS thinks about the device. It's looking more and more like we need a utility that will show us properties of the vdevs themselves, just like we have |
I think we're all in agreement that the default output shouldn't be changed. And I kinda like @tonyhutter's crazy idea too. |
There is a thin line between crazy and clever, I think @tonyhutter has a clever idea here. That said, actual implementation can be tricky. When a device is unhealthy, it can take a long time (minutes) to respond to any command. We do not want to hold any locks when this happens. Some reasonable timeout and feedback to the user for command failures is needed. |
e5010bf
to
fd9e41a
Compare
Added the option Looked through the existing flags of Have not done any arrangements for Placed the marks in the rightmost column of the pool (name) field, with a blank before. Did try to put it one space after the name, but that was harder to quickly read when the names had different lengths and thus got misaligned. The alternatives so far, I'm happy to change... The @behlendorf's example, I think one would have to add one character to the width of the name though; extending into the column separator could complicate things:
Current patch:
This felt harder to read:
Column of its own:
When looking at the output and checking that it allocates the right amount of space, I noticed that |
Upon seeing the options I actually think the dedicated column is probably best. Even though I originally proposed otherwise. It's going to be the simplest and most consistent way to do this. Using |
fd9e41a
to
fd440b8
Compare
044579a
to
d823d67
Compare
@tonyhutter @behlendorf @richardelling I believe to have handled the outstanding issues. Changing |
b4fc936
to
08be93c
Compare
@inkdot7 apologies for not looking at this earlier. I'm off for Christmas starting now and won't be back in the office until early January. I can take a look at it then, or if @behlendorf approves it in the meantime, I'm fine with that too. |
Just gave this a test:
You'll want to fix it so that Also, can you rebase this on top of master? |
08be93c
to
66509f6
Compare
Thanks @tonyhutter for looking at this. Rebased onto master. It showing |
Late to the party and completely bike shedding so feel free to ignore or disparage, but... The "kind" column name feels quite foreign to me, could it be "type" instead? For what it's worth, both In the context of computing, "type" is something I'm used to seeing but I don't recall ever seeing "kind" used elsewhere - that's actually what caught my eye scanning the output example above, I did a bit of a double take on seeing "kind" and had to investigate further to see what it meant. From a purely English language point of view, I would suggest a "type" is a more precise category versus a "kind" being a somewhat more broad, vague or fuzzy category. |
@chrisrd , an easy change, but I'd need some consensus. |
So it sounds to me like "kind" for non-leaf-vdevs means "the slowest drive in the group"? Is that right? If so, then
Also, I'm fine with the column being called "type" but still using Can you also squash your commits? |
Since a file dev is considered to have ssd performance, the mirror is marked |
66509f6
to
4f487f3
Compare
Changed "kind" -> "type" when printed, kept |
Thanks, my brain no longer does a double take on seeing More bike shedding: it's not really only about rotational devices any more (e.g. |
d71b9ac
to
289a948
Compare
Thanks, |
@kpande agree, the -c option offers a large superset of this functionality |
agree, |
What |
I think the folks who are going to look at
Other random points:
|
…e or mixed. Keep track of mixed nonrotational (ssd+hdd) devices. Only mirrors are mixed. If a pool consist of several mixed vdevs, it is mixed if all vdevs are either mixed, or ssd (fully nonrotational). Pass media type info to zpool cmd (mainly whether devices are solid state, or rotational). Info is passed in ZPOOL_CONFIG_VDEV_STATS_EX -> ZPOOL_CONFIG_VDEV_MEDIA_TYPE.
289a948
to
fc7d355
Compare
Thanks @tonyhutter , added to the man page.
Before removing that, I'd like to suggest that a mixed mirror vdev not is a common setup. Admins that do such an setup would be likely to know what it means, perhaps even appreciate the confirmation. Others will never see such output. Unless they misconfigured, in which case I think they will be happy to have been alerted after figuring what it meant. |
Closing. This functionality is being added to |
Some questions:
Should more space be used, and the info spelled out (yes, no and mix)?