You are currently offline, waiting for your internet to reconnect

Decreased performance in some features of SQL Server when you use EFS to encrypt database files

Summary
You may experience decreased performance in some Microsoft SQL Server features when you use Encrypting File System (EFS) to encrypt the database files.
More information
When you use EFS to encrypt a database file, the complete content of the database file is encrypted. This occurs regardless of the actual data and metadata that is contained in the database file. For more information about EFS best practices, see the following Microsoft Knowledge Base article:

223316 Best practices for the Encrypting File System

When SQL Server performs an I/O operation on an EFS-encrypted database file, the I/O operation is synchronous. Therefore, you may experience decreased performance in some features of SQL Server. For example, performance of the read-ahead feature and of the checkpoint feature may be decreased.

When a SQL Server worker thread performs an I/O operation on an EFS encrypted database file, the worker thread waits until the current I/O operation on the EFS encrypted database file is completed. Additionally, the SQL Server scheduler will be stalled until the current worker thread continues. Therefore, the SQL Server worker threads that remain on the SQL Server scheduler will be pending until the first worker thread continues the I/O operation. In this scenario, the performance of SQL Server is decreased.

You can avoid this problem by using the SQL Server native encryption feature in server installations of SQL Server.
If you must use EFS to encrypt the database files in a SQL Server installation, you can specify the SQL Server I/O affinity mask option. For more information about the affinity I/O mask option, see the following article at SQL Server books online: When you use the SQL Server I/O affinity mask option, I/O operation requests on EFS encrypted database files are assigned to a separate SQL Server scheduler. Although the I/O operations are still synchronous with EFS encrypted database files, the SQL Server worker thread will continue without waiting for the current I/O operation with the EFS encrypted database file to be completed.

Note Alternatively, you may want to consider hosting the EFS encrypted database files on a separate instance of SQL Server.

For more information about how to set the SQL Server I/O affinity option, click the following article numbers to view the articles in the Microsoft Knowledge Base:
298402 INF: Understanding how to set the SQL Server I/O affinity option
2157114 The "affinity mask" and "affinity I/O mask" configuration should not conflict
Properties

Article ID: 922121 - Last Review: 05/20/2015 17:38:00 - Revision: 2.0

  • Microsoft SQL Server 2005 Express Edition
  • Microsoft SQL Server 2005 Express Edition with Advanced Services
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Workgroup Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2005 Standard Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Express
  • Microsoft SQL Server 2008 Express with Advanced Services
  • Microsoft SQL Server 2008 R2 Datacenter
  • Microsoft SQL Server 2008 R2 Developer
  • Microsoft SQL Server 2008 R2 Enterprise
  • Microsoft SQL Server 2008 R2 Express
  • Microsoft SQL Server 2008 R2 Express with Advanced Services
  • Microsoft SQL Server 2008 R2 Standard
  • Microsoft SQL Server 2008 R2 Standard Edition for Small Business
  • Microsoft SQL Server 2008 R2 Web
  • Microsoft SQL Server 2008 R2 Workgroup
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 Web
  • Microsoft SQL Server 2008 Workgroup
  • Microsoft SQL Server 2012 Developer
  • Microsoft SQL Server 2012 Enterprise
  • Microsoft SQL Server 2012 Express
  • Microsoft SQL Server 2012 Standard
  • Microsoft SQL Server 2012 Web
  • SQL Server 2012 Enterprise Core
  • Microsoft SQL Server 2014 Business Intelligence
  • Microsoft SQL Server 2014 Developer
  • Microsoft SQL Server 2014 Enterprise
  • Microsoft SQL Server 2014 Enterprise Core
  • Microsoft SQL Server 2014 Express
  • Microsoft SQL Server 2014 Standard
  • Microsoft SQL Server 2014 Web
  • kbtshoot kbsql2005engine kbexpertiseadvanced kbinfo KB922121
Feedback