By default, indirect checkpoints are turned on for the tempdb database in Microsoft SQL Server 2016 and 2017. Under heavy-workload conditions, a "Non-yielding scheduler" error may occur and the sys.dm_os_spinlock_stats DMV shows elevated spinlock contention for the DP_LIST spinlock type.
This fix is included in the following updates and service pack:
Cumulative Update 5 for SQL Server 2016 Service Pack 1
Cumulative Update 8 for SQL Server 2016
Service pack information for SQL Server 2016
About SQL Server builds
Each new build for SQL Server contains all the hotfixes and security fixes that were in the previous build. We recommend that you install the latest cumulative updates for SQL Server:
Service packs are cumulative. Each new service pack contains all the fixes that are in previous service packs, together with any new fixes. Our recommendation is to apply the latest service pack and the latest cumulative update for that service pack. You do not have to install a previous service pack before you install the latest service pack. Use Table 1 in the following article for finding more information about the latest service pack and latest cumulative update.
To work around this issue, turn off indirect checkpoints on the tempdb database by using one of the following Data Definition Language (DDL) statements.
This should be done as follows:
On the modeldb database (this also changes the default value for new databases), run the following statement:
ALTER DATABASE [model] SET TARGET_RECOVERY_TIME = 0 MINUTES
Or, directly on the tempdb database every time that the instance starts up by using the SQL Server Agent by using the following statement:
ALTER DATABASE [tempdb] SET TARGET_RECOVERY_TIME = 0 MINUTES
Or, periodically issue manual checkpoints against the tempdb database by using the following statement:
In addition, TF 3468 can be used to disable indirect checkpoint on tempdb.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Learn about the terminology Microsoft uses to describe software updates. See the following articles for more information: