Am 01.09.23 um 11:48 schrieb Thomas Lamprecht:
> Am 19/06/2023 um 09:28 schrieb Alexandre Derumier:
>> +            xtype: 'pveMemoryField',
>> +            name: 'max',
>> +            minValue: 65536,
>> +            maxValue: 4194304,
>> +            value: '',
>> +            step: 65536,
>> +            fieldLabel: gettext('Maximum memory') + ' (MiB)',
> 
> This huge step size will be confusing to users, there should be a way to have
> smaller steps (e.g., 1 GiB or even 128 MiB).
> 
> As even nowadays, with a huge amount of installed memory on a lot of servers,
> deciding that a (potentially bad actor) VM can use up 64G or 128G is still
> quite the difference on a lot of setups. Fiona is checking the backend here
> to see if it might be done with a finer granularity, or what other options
> we have here.
> 

>From a first glance, I think it should be possible. Even if we keep the
restriction "all memory devices should have the same size", which makes
the code easier:

For dimms, we have 64 slots, so I don't see a reason why we can't use 64
MiB granularity rather than 64 GiB.

For virtio-mem, we have one device per socket (up to 8, assuming a power
of 2), and the blocksize is 2 MiB, so we could have 16 MiB granularity.
Or is there an issue setting the 'size' for a  virtio-mem-pci device to
such a fine grained value? Even if there is, we can just create the
device with a bigger supported 'size' and have our API reject a request
to go beyond the maximum later.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to