This used to be common with SSDs, where while the SSD does its internal space management, it can slow down significantly.
Read about wear leveling and TRIM to know more.
Recent SSDs and operating systems address this well though, so seeing this nowadays is uncommon.
Another reason could be something to do with how the SSD manages its cache. Again, this issue is now much rarer than it used to be.
Note that writing 5 GB in 3 seconds is very fast, so I'd say that the most likely explanation is that the OS caches the data in memory. When the cache is full, actual disk operations take place and that's much slower. 5 GB should take 10 to 15 seconds to read and then the same to write on a SATA SSD, so 30 s seems about right.
SAS issues exactly the same code each time, so I doubt the issue is SAS-related.
If you want faster I/O, replace your SATA SSD (if that's what you have) with a M.2 SSD.
... View more