[pve-devel] [PATCH pve-manager] Add "SSD" property to IDE, SATA, and SCSI hard drives

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Nov 8 10:10:57 CET 2018


On 11/7/18 6:20 PM, Nick Chevsky wrote:
> On Wed, Nov 7, 2018 at 3:23 AM Thomas Lamprecht <t.lamprecht at proxmox.com>
> wrote:
> 
>> 1) I also have the checkbox enabled for SCSI with virtio-scsi controller,
>>    and it's not needed in that case, AFAICT.
>>
> 
> It's not needed *for TRIM support*, but that's actually not the purpose of
> the "SSD" flag. This flag merely determines whether we emulate a rotational
> hard disk or an SSD; nothing more. What that means to each guest is
> OS-dependent, and people will have different uses for it—TRIM is just one
> of them. The VirtIO SCSI controller does honor this property, by the way.
> For example, on a Linux guest with VirtIO SCSI:
> 
> With the "SSD" box unchecked:
> # cat /sys/block/sda/queue/rotational
> 1
> 
> With the "SSD" box checked:
> # cat /sys/block/sda/queue/rotational
> 0
> 
> 
> Useful or not, I don't think we should disable the checkbox for VirtIO SCSI
> since the feature is supported and honored, and people may have
> non-TRIM-related uses for it (e.g. some guest OSs may display different
> icons for HDDs and SSDs).
> 
> Finally, this feature is implemented at the bus—not controller—level in
> QEMU, so disabling it for only one particular type of SCSI controller would
> be conceptually unsound. Enforcing this in the UI would also be messy,
> since the controller type is configured on a different screen. I just don't
> think we need to concern ourselves with this at all.

OK, thanks for taking the time and re-explain it to me, now I really get all
the purposes too. :-)

> 
> 2) I'd add a boxLabel with gettext('autodetected') (or similar) when it gets
>>    disabled, so that user know that they just do not need to set it in
>> those
>>    cases, not that someone thinks that the virtio stuff is inferior
>> because it
>>    can't even handle SSDs properly :) Somewhat similar in principle to:
>>    https://pve.proxmox.com/pipermail/pve-devel/2018-November/034260.html
> 
> 
> My recommendation is that we disable the box only when the feature is
> actually unsupported (i.e. virtio-blk), and let users decide in all other
> cases.
> 
> To further minimize confusion and stress the fact that the only direct
> purpose of this property is to define the type of drive we emulate, how
> would you feel about selectively labeling drives "Hard Disk" or "SSD" on
> the "Hardware" tab depending on the state of the flag? We could even drop
> the "SSD" checkbox in favor of a "Type" drop-down (with "Hard Disk" and
> "SSD" options), which would be conceptually neater.
> 
> Also see my next reply to Dominik regarding the use of emulated SSDs with
> HDD-backed storage.

Hmm, what about the following proposal.

I'd but it in the advanced options, a lot of people running Linux VMs or
Windows with the virtio* drivers won't care much about this, I'd guess.

But move the Discard Option out to the "normal" options, where now your
SSD is proposed, so that they switch place - with this the advanced
options count stays the same and the discard option could really makes
sense to be generally available.

So scratch my boxLabel idea... Also maybe call your option 'Show as SSD'
(or something alike, if you have a better idea)? But I'm not totally
opposed to SSD, it is correct I just want to minimize possible confusion
- which. though, should be addressed by documentation, so you're call :-)

thanks,
Thomas 





More information about the pve-devel mailing list