SharePoint Tidbit - Optimizing SQL for SharePoint on-prem
First of all, these steps will be true for both SharePoint 2013 or SharePoint 2016 unless mentioned otherwise, as well the steps will be true for all supported versions of SQL unless stated otherwise.
I’m sure you realize this but let it be said SQL is the heart, brain, and body of SharePoint this means if SQL is not performing well then your users will not be happy, so here are some of the things I would recommend:
- Set Max Degree of Parallelism (MAXDOP) to 1, due to the way that SharePoint works this is the only acceptable value.
- Set AUTO_UPDATE_STATISTICS & AUTO_CREATE_STATISTICS to disable for all databases
- Do not ignore the Temp DB, Optimize the database this means several things.
- Pre grow database
- Split database and transaction logs across multiple disks (NOTE: The faster the drive the better for these files)
- Create multiple files for database, one file for each CPU up to max 8 files (NOTE: Files should be the same size)
- Set recovery model to simple for this database
- Perform SQL Database performance! Recommend following the recommendations in this article https://www.microsoft.com/en-us/download/details.aspx?id=24282
- Split Databases and Transaction logs to separate disks
The following steps will help with performance, by are more complicated:
- Split search database and transaction logs to there own Fast disks
- For all databases that will not be restored in case of Disaster recovery (ie Search and Configuration) set recovery model to simple
- You can further improve Content Database performance by doing the following
- Pre grow databases
- Split database across multiple files
- Place files on fast disks
As a final thought remember to work closely with your DBA, they will be able to help you to get this right.