Ok, for anyone interested,
We solved issue in Question couple months ago simply by installing directly attached SSD drives into each of 3 servers,
and moving DB data and log files from SAN to those SSD drives
Here summary on what I did to research on this issue (using recommendations from all the posts it this question), before we decided to install SSD drives:
1) started collecting PerfMon counters for following drives at all 3 servers:
Disk F:
is logical disk based on SAN, contains MDF data files
Disk I:
is logical disk based on SAN, contains LDF log files
Disk T:
is directly attached SSD, dedicated solely to tempDB
Picture below is average values collected for 2 weeks period
Disk I: (LDF)
has such a small IO and Latency is very low, so Disk I: can be ignored
You can see that Disk T: (TempDB)
has bigger IO compared to Disk F: (MDF)
, and it has much better Latency at the same time - 0 ms
Obviously something is wrong with Disk F: where data files reside, it has high Latency and Avg Disk Write Queue, despite low IO
2) Checked Latency for individual databases using query from this website
https://www.brentozar.com/blitz/slow-storage-reads-writes/
Few active databases on Primary server had 150-250 ms read latency and 150-450 ms write latency
What is interesting, master and msdb database files had read latency up to 90 ms which is suspicious given the small size of their data and low IO - another indication something is wrong with SAN
3) There were no specific timings
During which "SQL Server has encountered occurences..." messages showed up
There were no maintenance or disk heavy ETL running when those messages were logged
4) Windows Event Viewer
Did not show any other entries that would hint the problem, except "SQL Server has encountered occurences..."
5) Started checking top 10 queries
From sp_BlitzCache (cpu, reads, etc.), and omptimizing where possible
No super IO heavy queries that would churn tons of data and impacting storage heavily, though
Indexing in databases is OK, I maintain it
6) We do not have SAN team
We only have 1 sysadmin who helps on occassion
Network path to SAN - it is multipathed, each of 3 servers have 2 network cables leading to switches and then to SAN, and its supposed to be 1 Gigabyte / sec
7) There were no CrystalDiskMark results
Or any other benchmark test results from when the servers were setup up, so I do not know what the speeds should be,
and its not possible to benchmark at this point to see what the speeds currently are, as it would have impacted Production
8) Setup Extended Events session on checkpoint event for database in question
XE session helped to discover that during "SQL Server has encountered occurences..." messages, checkpoint happened really slow (up to 90 seconds)
9) SQL Server Error Log
Contained "FlushCache" "Saturation" entries
These supposed to show up when checkpoint time for given database exceeds recovery interval settings
Details showed that amount of data that checkpoint is trying to flush is small and it is taking long time to complete, and the overall speed is about 0.25 MB / sec... weird
10) Finally, this picture shows storage troubleshooting chart:
It appears we simply have a "Hardware Problem:- Work with system admin/hardware vendor to fix any misconfiguration of SAN, old/faulty drivers, controllers, firmware, etc."
In another question "Slow checkpoint..." Slow checkpoint and 15 second I/O warnings on flash storage
Sean had very nice list of what items have to be checked at hardware and software level to troubleshoot
Our sysadmin could not check all things from the list, so we simply choose to throw some hardware at this issue - it was not expensive at all
Resolution:
We ordered 1 TB SSD drives and installed directly into servers
Since we have Availability Groups, migrated DB data files from SAN to SSD on secondary replicas, then failed over, and migrated files on former primary
This allowed for minimal total downtime - less than 1 minute
Now each server has local copy of DB data, and full/diff/log backups are done to the mentioned SAN
No more "SQL Server has encountered occurrences..." messages in Windows Event Viewer logs, and performance of backups, integrity checks, index rebuilds, queries etc. has increased significantly
How much performance in terms of IO latency has improved since we migrated DB files to SSD ?
To evaluate impact, used performance Windows Performance Monitor logs 2 weeks before migration and 4 weeks after migration:
Also below is DB level latency stats comparison (used SQL Server's captured virtual file stats before and after migration)
Summary
Migration from SAN to directly attached local SSDs was well worth it
It had great impact on storage's latency and improved well over 90% on average (especially WRITE operations), and we do not have 20-50 sec spikes at IO anymore
Moving to local SSD resolved not only storage performance issues but also data safety that I was concerned about
(if SAN fails, all 3 servers lose their data at the same time)