|14/11/2013 update: Chris Mullendore, a Microsoft PFE has written a great blog that discusses both Shredded Storage and RBS. He whole-heartedly recommends using the default FileWriteChunkSize settings. I’ll leave this blog up just to illustrate that it is possible to modify this value, but it appears to be one of those “just because you can, doesn’t mean you should” settings.|
Over the last few weeks I’ve been looking at some of the new capabilities in SharePoint 2013 from an infrastructure perspective, focusing mainly on search and the topic of this blog post: Shredded Storage.
There are already a number of posts on this feature that provide a good introduction. I won’t rehash those and will instead link you to a couple of decent ones:
I’ll reserve my own opinion on Shredded Storage for now as I haven’t had sufficient time to test it. The purpose of this post is simply to demonstrate how to turn it off. That does not mean I recommend turning it off – you will need to review the benefits and drawbacks (most likely starting with the posts above) and decide whether it is appropriate for your usage scenario. For what it’s worth, I think the vast majority of collaboration sites will keep Shredded Storage on due to reduced storage cost and the IO benefits it provides whilst using versioning.
Turning it off is straightforward using PowerShell, but it took me a few (failed) attempts to realise that the SPWebService object needs to be updated once the FileWriteChunkSize property has been modified:
$wa = Get-SPWebApplication http://webappurl
$wa.WebService.FileWriteChunkSize = 1073741824
In the example above I have set the FileWriteChunkSize to 1 GB (specified in bytes), effectively disabling Shredded Storage for the vast majority of content.
Just to prove this works, here are a couple of screenshots:
Setting FileWriteChunkSize to 1GB to prevent BLOBs from being shredded
An example BLOB – in case you are wondering it’s a video I took whilst watching sumo wrestling in Japan
Querying SQL to show that the BLOB has not been shredded
For clarity, I used SharePoint Server 2013, version 15.0.4420.1017 for this test.
I find it slightly troubling that the original SPFileOperationSetting enumeration was seemingly disabled for the RTM release given that it supposedly worked in the Release Preview (I have not verified this). It leaves me wondering whether Microsoft will allow us to toggle Shredded Storage on/off in future releases.
For now, we have a choice as to whether content is shredded which is a good thing. Obviously that means that there is more to think about in terms of storage when compared to SharePoint 2010, especially if considering BLOB externalisation (i.e. RBS). This may well be the subject of a future post.