Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am running a windows 7 vm on esxi connected to x25-M G2 via iscsi, which is running starwind iscsi on server 2008. Is trim a function of the vm OS or the iscsi server OS or not applicable with ISCSI?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Since TRIM seems to be a "Hardware Command" the SSD must be connected directly on the physical host which is your iSCSI host if I get your right. So this means that this host must support trim. Windows 2008 R2 supports this feature so if you running the R2 version I think you will enjoy the benefits of TRIM. The virtual machine gets a virtual hard drive via iSCSI and doesn't care about the backend.

share|improve this answer
    
In order for TRIM to be effective, the SSD driver on the host would need to know when files are deleted on the SSD. Since the host is just presenting the disk by iSCSI, I don't think it would know when the guest is deleting files (that's a filesystem-level operation, and iSCSI works at a lower level). –  coneslayer Jul 15 '10 at 15:13

TRIM must be implemented by every single layer of the stack to be useful. If you used a physical raw device mapping instead of VMFS to provision your Windows 7 guest, and Starwind supports TRIM (which I don't know about) then you might be in with a chance.

Otherwise, since ESXi doesn't support TRIM, every time you delete a file in your virtual machine, it just updates a few blocks in the vmdk, which are passed through as a few iSCSI writes, which Starwind+2008R2 pass though as a few writes to the x25, and 2008R2 never learns that there are now free blocks that it could TRIM. In other words, even though 2008R2 would send TRIM down to the X25 if Starwind ever deleted some blocks, it never will because ESXi will never send an iSCSI TRIM to Starwind.

See http://www.t10.org/ftp/t10/document.08/08-347r1.pdf for some good reasons why Starwind probably doesn't implement TRIM either.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.