Potential MS Windows 10 Performance Hit due to FTH

Bit of a Public Service Announcement for Windows 7/10 Application Developers and Testers

This bit me recently, so I figured I would pass it on in case some folks have not run into it. If you develop, test or run on Windows then there is an issue/feature that can cause a significant slowdown in your executables. Windows comes with a Fault Tolerant Heap (FTH) and if Windows decides that your application is crashing too often, it will automatically start using the FTH for your application. The FTH is much slower than the normal heap and your application performance will take a big hit. This is not restricted to debug builds and is not dependent with the run time library you use. It is a built-in feature of the operating system. In my case a release build of ParaView had been moved to the FTH.

As a developer, or tester, we tend to crash applications. Windows may decide based on those crashes to assign your application to the FTH. You can look to see what, if any, applications have been relegated to the FTH by running regedit.exe and looking at

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FTH\State

And seeing if your application is listed there. You can turn off the FTH by setting

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\FTH\Enabled

to 0. You can find more information about the FTH at the following link.

https://docs.microsoft.com/en-us/windows/desktop/win7appqual/fault-tolerant-heap

3 Likes

Do you know if there is any kind of warning to know you hit this issue ?

Not sure if there is any warning given. But checking is pretty quick with regedit

1 Like

The only message one seems to get is when running the application from Qt Creator. I get this message FTH: (25568): *** Fault tolerant heap shim applied to current process. This is usually due to previous crashes. *** ****[QIPCAP] Cert free handle This message does not appear when starting the application via console.

IMO, this is another of those questionable ideas that Microsoft has put forth throughout the years. FTH does not really fix anything and the opportunity to improve the quality of the software is overlooked just to make Windows look more stable. At least, the user should have made aware of this and given the option to apply it or not.

@martink @cory.quammen Why can’t we include this information in the “Help/ About”?

Technically I’m sure it is possible. This particular issue hasn’t bubbled up as an issue reported by users, so checking it hasn’t become a priority.

OK, that makes sense.