Search This Blog

Tuesday, January 24, 2012

Setting the chunk size for downloading a file in Sharepoint 2010

Whenever you download a document from Sharepoint, Sharepoint puts the document in memory stream. There is a limit set as to how much data needs to be retrieved in a go if the document is heavy. This is controlled through chunk size.

Sharepoint default chunk size is set to 5MB, this means that if a client tries to open a document of 50MB and the chunk size is 5MB, the document is divided and retrieved in 10 chunks. Each chunk will be loaded into the memory of both the WFE handling the request and the SQL Server.

You can change the chunk size by executing following command using STSADM:

stsadm -o setproperty -pn large-file-chunk-size -pv 1073741824

This will set the chunk size to 1024 MB i.e. 1073741824 bytes.


Larger chunk size increases the performance, but adds more load on the WFE and SQL server as more data is loaded into the memory. So to set a desired chunk size, factors like number of users accesssing the site, system RAM, default file size that users are uploading to your system etc should be considered.

No comments:

Post a Comment