TRIM/discard response
I'm just curious if being diligent about issuing discards is in any way helpful for the infrastructure.
8 Replies
@pclissold:
Also, the 'disks' on your VM are just files on the underlying host filesystem.
Is that actually the case? While I don't have any specific knowledge either way, for my part I always assumed that the guest block devices were implemented as logical volumes (probably via lvm) on top of the RAID array made out of physical devices and/or partitions on the host. So not based on actual files in the host's own filesystem, although obviously the host has access to the device(s) backing the guests.
– David
@db3l:
… I always assumed that the guest block devices were implemented as logical volumes (probably via lvm) on top of the RAID array made out of physical devices and/or partitions on the host. So not based on actual files in the host's own filesystem, although obviously the host has access to the device(s) backing the guests.
Yes, I believe your explanation is correct. My answer was quick, over simplified and wrong.
On my physical servers with SSD I just call daily a "fstrim /" in the root crontab.
However, on my newly created linode (Debian 8 + latest 64bit kernel, that I assume is on SSD), I get:
fstrim /
fstrim: /: the discard operation is not supported
lsblk -D
NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
xvda 0 0B 0B 0
xvdb 0 0B 0B 0
Am I correct in thinking that linodes uses SSDs physically but we do not see them as such? so we do not need to handle trim/discard ourselves.
@colas:
Am I correct in thinking that linodes uses SSDs physically but we do not see them as such? so we do not need to handle trim/discard ourselves.
I would presume that's correct. There's a RAID controller and a Xen hypervisor between your linode and the SSD, you see a logical disk.