Hi list, Recently we''ve been thinking of adding SSDs into some of our domU VMs to boost application loading times. Looking around, it seems that information about trim support in various configurations is sparse at best. The only clear confirmation I could find is that trim is supported in PV domU on Linux kernels 3.1 and above, but only if dom0 has kernel 3.1 and above as well. So paravirtualised Linux domUs are fine for the upgrade, but what about other configurations? 1. Non-PV Linux domUs? 2. Non-PV BSD domUs? 3. PV BSD domUs? 4. Windows domUs? 5. Windows domUs with PV drivers? 6. Other non-PV configurations? Perhaps it''d be great to clear everything up now.
I have been using a SSD with Xen 4.2 for 6 months. I am running on Debian Wheezy Dom0, and a compiled Kernel 3.4.4. Trim required not only the appropriate kernel, but the discard flag in fstab, and only for compatible file systems (Ext4 being one). My SSD has /boot/efi and /boot partitions, the rest is LVM, and I have Ext4 for my /home and / (root) partitions with discard flag added manually to /etc/fstab. This appears to be working. For virtual machines I have an HVM Windows which without GPLPV drivers appears to have recognized that it was running on a SSD (well a LV on an SSD), as it had Auto Disk Defrag turned off. So HVM Windows appears to support trim. I have been running a Debian Squeeze HVM DomU for web development testing, and for stability I had not added trim. I also have been running a pfSense HVM DomU (FreeBSD) but I have not checked whether it supports trim either. On Sun, Jul 8, 2012 at 11:25 PM, Liwei <xieliwei@gmail.com> wrote:> Hi list, > Recently we''ve been thinking of adding SSDs into some of our domU > VMs to boost application loading times. Looking around, it seems that > information about trim support in various configurations is sparse at > best. > The only clear confirmation I could find is that trim is supported > in PV domU on Linux kernels 3.1 and above, but only if dom0 has kernel > 3.1 and above as well. > So paravirtualised Linux domUs are fine for the upgrade, but what > about other configurations? > 1. Non-PV Linux domUs? > 2. Non-PV BSD domUs? > 3. PV BSD domUs? > 4. Windows domUs? > 5. Windows domUs with PV drivers? > 6. Other non-PV configurations? > Perhaps it''d be great to clear everything up now. > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On 9 July 2012 11:42, Casey DeLorme <cdelorme@gmail.com> wrote:> I have been using a SSD with Xen 4.2 for 6 months. I am running on Debian > Wheezy Dom0, and a compiled Kernel 3.4.4. > > Trim required not only the appropriate kernel, but the discard flag in > fstab, and only for compatible file systems (Ext4 being one). > > My SSD has /boot/efi and /boot partitions, the rest is LVM, and I have Ext4 > for my /home and / (root) partitions with discard flag added manually to > /etc/fstab. This appears to be working. > > For virtual machines I have an HVM Windows which without GPLPV drivers > appears to have recognized that it was running on a SSD (well a LV on an > SSD), as it had Auto Disk Defrag turned off. So HVM Windows appears to > support trim. > > I have been running a Debian Squeeze HVM DomU for web development testing, > and for stability I had not added trim. I also have been running a pfSense > HVM DomU (FreeBSD) but I have not checked whether it supports trim either. >Thanks for the reply, it sure increases the optimism in me! I''ll give it a try with today''s xen-unstable and mainline kernel. However, can any dev clarify how trim could work on non-PV machines, and even on LVM? My original impression was that it''d only be remotely possible by passing in the whole SSD, but Casey seems to have it working on a LVM volume on an SSD. Thanks!
On Mon, Jul 9, 2012 at 7:51 AM, Liwei <xieliwei@gmail.com> wrote:> However, can any dev clarify how trim could work on non-PV machines, > and even on LVM? My original impression was that it'd only be remotely > possible by passing in the whole SSD, but Casey seems to have it > working on a LVM volume on an SSD. Thanks!LVM supports TRIM reasonably well since I think 2.6.28. However it will reduce the efficiency of trimming, since the Physical Volume slice size is typically single megabytes. I'm also not certain whether it supports TRIM in its RAID setups, would have to check the code. I don't know if blktap2 supports TRIM - or any Linux filesystem for single file modifications for that matter, even if the file is sparse - and blktap2 works via the filesystem's AIO/O_DIRECT interfaces. However you could always try copying the image in sparse mode and remove the original. (cp --sparse=always) -- Radosław Szkodziński _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users