VirtualBox

Opened 11 years ago

Last modified 7 years ago

#11486 new enhancement

Support passthrought of TRIM commands to raw partitions

Reported by: javispedro Owned by:
Component: virtual disk Version: VirtualBox 4.2.6
Keywords: ssd trim raw Cc:
Guest type: all Host type: Linux

Description

Since VirtualBox 4.2 it appears that the AHCI virtual controller supports the ATA TRIM command.

However, only the VDI image file backend actually implements it, where it is used to detect unused blocks so that the image file size can be reduced (if using a dynamic image). The rest of backends do not seem to use it for anything.

My request is for the RAW block device backend to send TRIM/DISCARD commands to the backing block device upon receiving a TRIM command from the guest.

This would enable e.g. Windows guests on raw partitions (via VMDK's partitionedDevice) sending TRIM commands to a backing SSD device, thereby increasing performance and SSD longevity.

Unlike discard support for VDI images, this should not involve any extra bookkeeping ("discard" commands can be sent to the raw block device mostly "as is", no need to cluster them).

Change History (2)

comment:1 by Joshua Naismith, 11 years ago

Just Cc-ing.

comment:2 by jack lee, 7 years ago

This enhancement is very useful to save disk space.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use