10 Replies Latest reply: May 15, 2011 5:30 PM by Mike Coffey RSS

Trim available in IDE and AHCI?

chamiz Community Member
Currently Being Moderated

After reading so many confusing posts about having TRIM...I am still wonder whether TRIM will still pass the command through IDE. 1/2 the people in forums says yes, and 1/2 the says no. I am still in IDE mode and never used AHCI. I thought TRIM was working until lurking in many forums. My performance never degraded so far using X25-M G2 02HA...still the same benchmark since the first TRIM firmware. Someone chime on this to whether I should enable AHCI.

  • 1. Re: Trim available in IDE and AHCI?
    Gibeht Community Member
    Currently Being Moderated

    Hi! This I wanted to know too but couldn't wait for an awnser.

    So I did some benchmarks with first the old firmware on IDE and then with the new firmware on IDE. Optimizing with the toolbox only worked with the new firmware but either way the benchmarks where exactly the same (read and write speeds, CrystalDMark). No improvement.

     

    After that I changed the register to AHCI in my Win7 64-bit and restarted to the bios and changed from IDE to AHCI. After started up I ran the toolbox optimizer and did the benchmark again. I got a little but nice improvement from 230 read speed to a 258.

     

    I guess the improvement comes from the switch from IDE to AHCI and not from Trimming...so I still like an awnser too on this IDE or/and AHCI trim question. I will stay on AHCI for now.

     

    Ciao!

  • 2. Re: Trim available in IDE and AHCI?
    jtech Community Member
    Currently Being Moderated

    What OS are you using? If Win 7 you will only have automatic (by Windows) trim if you are in AHCI mode with the standard msahci.sys driver, which will be automatically installed the first time you start Windows after you changed from IDE to AHCI mode in the BIOS.

     

    Presumably you have installed Win 7 in IDE mode, so be careful to follow the next step first before changing the BIOS settings:

     

    Start Regedit and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\msahci and in the right pane set the value of the key 'start' to 0 (=zero).

     

    You can also use trim in IDE mode on XP, Vista and Win 7 by using the Intel Toolbox if that's more convenient for you. The toolbox (old version) can currently be downloaded here:http://www.megaupload.com/?d=SU5FNWJS

  • 3. Re: Trim available in IDE and AHCI?
    BDS73 Community Member
    Currently Being Moderated

    Trim will work in either mode (IDE or AHCI) for XP or Vista through the Intel SSD Toolbox.  Win7 will currently require MSAHCI driver to run trim.  The larger question is why would you want to ever run in IDE mode with an Intel SSD???  In IDE mode you loose Native Command Queuing which can severaly impact drive performance.  You also loose DIPM (Device Initiated Power Management) support in IDE mode which will result in lower overall battery life.

     

    CrystalDiskMark does not support queue depths larger than one.  Therefore if you are trying to compare performance between IDE and AHCI mode you are not going to see much of any difference.  CrystalDiskMark is not the best tool for evaluating performance of a drive such as the Intel SSD that implements very heavy queuing.

  • 4. Re: Trim available in IDE and AHCI?
    janderk Community Member
    Currently Being Moderated

    After reading posts here I decided to test the IDE vs AHCI myself:

     

    IDE Mode.png

    Results with Windows 7 and IDE mode

     

    AHCI Mode.png

    Results with Windows 7 and AHCI mode

     

    As you can see AHCI performs much better. Especially when multiple threads/application are reading small files at the same time (4K QD32 test). Enough reason to stick with AHCI for me. For those who want to try: you first have to switch on HDMI support in Windows 7 by editing the registry before you change to AHCI in the BIOS. Without it Windows 7 just crashes at startup.

  • 5. Re: Trim available in IDE and AHCI?
    jtech Community Member
    Currently Being Moderated

    BDS73 wrote:

     

    Trim will work in either mode (IDE or AHCI) for XP or Vista through the Intel SSD Toolbox.  Win7 will currently require MSAHCI driver to run trim.  The larger question is why would you want to ever run in IDE mode with an Intel SSD???  In IDE mode you loose Native Command Queuing which can severaly impact drive performance.  You also loose DIPM (Device Initiated Power Management) support in IDE mode which will result in lower overall battery life.

     

    CrystalDiskMark does not support queue depths larger than one.  Therefore if you are trying to compare performance between IDE and AHCI mode you are not going to see much of any difference.  CrystalDiskMark is not the best tool for evaluating performance of a drive such as the Intel SSD that implements very heavy queuing.

     

    What tool is in your opinion more suitable for evaluating a SSD?

  • 6. Re: Trim available in IDE and AHCI?
    Defender3 Community Member
    Currently Being Moderated

    Not all of us have a BIOS with AHCI.  I'm running my G2 160Gb in a Sony VAIO NW laptop and the BIOS is locked, I'll never get AHCI for my NW series unless Sony releases an update.

  • 7. Re: Trim available in IDE and AHCI?
    jtech Community Member
    Currently Being Moderated

    Yes, you are right. That's the general problem with computers made by the so called A-brand makers.

     

    I allways compose and construct my own PC's, but I have the same problem with my wife's Dell laptop: great machine, but terrible BIOS, no possibilities at all. This seems the right way to do for noobs, but it can be a real pain in the *** for someone with a bit more knowledge about computers.

  • 8. Re: Trim available in IDE and AHCI?
    Currently Being Moderated

    @Jan Derk

     

    CrystalDiskMark is an artificial benchmark and is unfortunately no scientific proof of anything. See this interesting article by OCZ: http://www.ocztechnology.com/res_old/images/Configuring-and-Setting-Up-SSDs.pdf

  • 9. Re: Trim available in IDE and AHCI?
    koitsu Community Member
    Currently Being Moderated

    The benchmarks shown by Jan Derk are completely invalid.  All one has to do is look at the title bars and chuckle.  Come on folks...

     

    So many consumers aren't familiar with what "IDE" and "AHCI" actually represent and what they do.  Becoming familiar with the current working draft ATA-8 ACS-2 specification as well as with the Intel AHCI specifications (all versions) would really be the best choice here.  I'll get to TRIM near the end of this.

     

    "IDE mode" is simply too vague; there are actually 3 separate modes that you can use, but some BIOS vendors choose to label them ambiguously (as "IDE") so it's impossible to tell which of the two they use.  Decent boards have 3 choices: either Compatibility, Enhanced, or AHCI (and for RAID-capable southbridges, a RAID option as well.  If the SB has RAID and AHCI capability, choosing RAID also enables AHCI, but not vice-versa).  This advice applies to SSDs as well as mechanical HDDs, just for the record.

     

    "Compatibility" means that your SATA-attached device is "emulated" as a classic IDE/PATA device through the southbridge itself.  The SB does some form of translation to basically make your drive appear as a classic PATA disk.  You are therefore limited to classic ATA/PATA bus speeds and the horrors of DMA/UDMA/WDMA and the numerous UDMA (ATA-xxx) modes, plus Master/Slave and classic IRQ ordeals (14/15).  The disk literally shows up on a classic IDE/ATA bus as a Master, under IRQ 14 in most cases.  Some controllers in this mode run at ATA-100, others at ATA-133.  So, right there you can see that you've actually got extra overhead and a lot of annoyance.  Why would someone choose this mode?  Pure classic compatibility: some classic operating systems do not function quite right with "Enhanced" mode, nor with AHCI, so this literally makes the SATA disk appear as a classic IDE/PATA device (intended for operating systems which do not have SATA capability/drivers).  Got it?

     

    "Enhanced" just turns on two "extra" options for southbridge capability: AHCI (on/off) or RAID (assuming its available on your southbridge) (on/off).  It's just an added menu structure.  If "Enhanced" is chosen and AHCI is left off and RAID is left off, the controller operates in somewhat of an interesting state.  Usually DOS works, indicating portions of the legacy I/O framework are actually emulated via PCI/PCIe BARs, but there is absolutely no AHCI or RAID option ROM in use here.  So in a way it's "like" "Compatibility", but provides more tie-ins to OSes which support SATA natively and know how to interface with a SATA-capable southbridge that sits on the PCI/PCIe bus.  DOS obviously doesn't know how to speak to SATA controllers via PCI, but somehow DOS still works in this mode -- so there's definitely some emulation made available for OSes which use it.

     

    In general I tell people that if they aren't 100% certain their OS natively supports AHCI or has AHCI drivers slipstreamed (e.g. XP), to go with "Enhanced".  Your BIOS doesn't have "Enhanced" but has "IDE"?  Well, who knows what that means (see 5th-to-last paragraph below).

     

    "AHCI", on the other hand, is a completely new and greatly improved communication protocol between a storage controller (southbridge in this case) and a disk.  It has a significantly large number of benefits compared to classic PATA, and provides performance benefits because of the fact that the AHCI capability provides numerous features on the PCI/PCIe bus that don't exist with classic controllers -- all while establishing a *standard* protocol that can be used (e.g. no more vendor-specific drivers; anyone can do AHCI).  It's important to understand that AHCI is a technology that allows the operating system and the storage controller to communicate better; it is not the protocol that is spoken between the storage controller and the disk.  Got it?

     

    Things AHCI offers includes hardware-level NCQ capability, hot-swapping (you can do this without AHCI but the OS will often get quite angry (possibly bluescreen in Windows) or will have to have extra code in the driver to deal with timeouts), support for 64-bit LBA addressing (we're at 48-bit right now but these 3TB and larger disks are going to need 64-bit soon enough -- and do not confuse 64-bit LBA with "64-bit operating systems" or a "64-bit OS" -- those are unrelated things), full/complete removal of the master/slave device concept, power management like DIPM (mainly laptop folks care about this), and support for port multipliers (look them up if you want to know what they are).  The short, non-technical explanation is that the protocol is well-written and extremely robust while providing a universal standard and capability to grow.  The protocol IS NOT "hairy" or disgusting like classic IDE/PATA is; it's actually quite elegant on present-day hardware.

     

    Because nobody seems to believe in being consistent, different motherboard manufacturers tend to name these options completely bizarre and vague things.  I've seen "Compatibility", "Emulated", "Classic", "Normal", and even "Dedicated".  The manuals usually never state what these actually correlate with or what they do to the southbridge.

     

    So, "IDE" in the case of the OP could actually mean "Compatibility" or "Emulated", which could definitely explain lesser performance.  It all depends on what the term actually means with regards to the southbridge, and the only people who can tell you that is the motherboard manufacturer (who also controls/defines what the BIOS does).  So there you go.

     

    I hope this sheds some light on the whole "IDE vs. AHCI, what the heck?" debacle.  Sorry, I just grow tired of seeing folsk who don't understand the difference.  It helps if you actually use and interface with storage subsystems on a lower level, but it's also important to learn how things work before you talk about them.  For example I know jack squat about cars, so I don't talk about them; I let car folks do the talking.  :-)

     

    Finally, about TRIM.  Do you need AHCI to get TRIM support?  The straight up factual 100% accurate answer is NO, YOU DO NOT.  TRIM is an actual ATA protocol command (see above, re: ATA-8 ACS-2), specifically DATA SET MANAGEMENT command 0x06.  If you want to read about it, please see the ATA-8 ACS-2 working draft document, section 7 "Command Descriptions" subsection 10.  Any device that speaks the ATA protocol -- such as SATA hard disks -- and supports 48-bit LBA addressing, can support the TRIM command.  You can submit this command to the drive via a standard ATA CDB message and it will work.  You DO NOT need AHCI to send this command.  And of course there's a similar status/capability bit that defines if the device (disk) has TRIM capability or not.

     

    So what sends the TRIM command?  Simple: the operating system or software that is speaking to the disk.  Windows 7, for example, does it.  Linux can do it.  FreeBSD can do it (but currently only for UFS/UFS2 filesystems; TRIM is not supported in ZFS).  For those of us on Windows XP, the OS cannot, so we use utilities like Intel's SSD Toolbox to do it either manually or via scheduled events.

     

    Are we clear?  :-)

  • 10. Re: Trim available in IDE and AHCI?
    Currently Being Moderated

    KOITSU - Best, most thorough and knowledgeable reply I've seen!  Thank you very much.  Let me know if you need helsp with your car

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points