Microsoft posted some handy information about tuning SharePoint Blob Cache so that blobs can be cached on the local file system to increase performance by not requiring the round-trip to the database.
Link to article: http://office.microsoft.com/en-gb/sharepointserver/HA101762841033.aspx
Unfortunately, the article assumes that you are running MOSS. If you are running WSS, then you will not be able to find the
In order to enable this for WSS you have to add 2 lines to your WEB.CONFIG file.
First:
Make a copy of the WEB.CONFIG file (I’m assuming you can find the correct file for your SharePoint WEB). Make sure that you append a new extension to the copied file’s name. If you don’t, both files get processed.
Second:
Open the WEB.CONFIG file and locate the tag for:
<sectionGroup name=”SharePoint”>
Add the following line to this section just before the tag is closed:
<section name=”BlobCache” type=”System.Configuration.SingleTagSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ />
Note the PublikKeyToken. You may need to change the one in my line above to match others in your WEB.CONFIG file.
Third:
Locate the following tag in your WEB.CONFIG file:
</MergedActions>
Add the following line right after the /MergedActions line:
<BlobCache location=”C:\blobCache” path=”\.(gif|jpg|png|css|js)$” maxSize=”10″ enabled=”true” />
Feel free to change the maxSize to whatever fits your requirements.
Fourth:
Go to a command line and execute an IISRESET /NOFORCE.
Final Thoughts:
- Please, Please, Please – make a copy of your WEB.CONFIG file before attempting this.
- If you have more than one Front End Server: this has to be performed on all Front-END servers or you will see inconsistent results as your load-balancer directs you between servers.
- If you have a large production farm – make this change a part of a WSP/Feature and deploy it to the farm via STSADM -o addfeature. This is the right way to make changes to your production farm.
Tags: SharePoint, WEB.CONFIG, WSS
Cool – didn’t know that .. thanks for the tip!
Jeff,
Can you talk about how this has effected performance in your experience? I like performance benefits, but what are the scenarios it fits best?
Thanks, Tom
Jeff,
I couldn’t find in my web.config. But i put it before tag. I hope this would be correct.
Apart from this, i can still see the latency in image laoding..
any comments?
what else could i do to eliminate this latency?
Thank,
Indrajeet.
Rather useful piece
Jeff,
I had to rub my eyes a few times and double-check a few things before replying, I’ll start with a couple of questions. First: where did you come by this information? Second: have you tested it and seen it do anything?
The SharePoint BLOB cache functionality is supplied by types the reside within the Microsoft.SharePoint.Publishing namespace — not a type that is available within WSS. At the same time, the BLOB cache is wired-up and managed by the PublishingHttpModule, and that HttpModule is only available as part of the MOSS feature set.
Simply put: the BLOB cache isn’t something that exists but isn’t “wired-up” within WSS — it depends on types that are specifically included in MOSS and are not included with WSS.
As best as I can tell (I haven’t tested — this is why I’d like to learn if you or another source has), all that’s being done with the steps above is wiring in a configuration section. In short, it simply ensures that ASP.NET doesn’t throw a fit trying to process a configuration section it doesn’t know about. The element then becomes a valid element within a WSS web.config file … but there’s nothing inside of SharePoint (specifically, WSS) that can do anything with the settings contained in that section.
If you’d like more detail on the internals of the BLOB cache, I’ll refer you to some of the deep diving I’ve done:
http://sharepointinterface.com.....ush-comes/
Sorry if this rains on anyone’s parade. There are still plenty of caching options available to WSS users (e.g., leveraging the ASP.NET cache within custom code), but BLOB caching (ala MOSS style) isn’t one of them
- Sean
SharePoint blob caching is an important consideration when addressing the performance issues of blob access. SharePoint offers a very elementary form of blob caching which is disc based. It is restricted to only one WFE in the SharePoint infrastructure and does not go beyond its confines. But the reality tells us that BLOB access, with payload growing as high as terabytes, requires a much more sophisticated, distributed, in-memory, and fail-safe caching infrastructure.
StorageEdge (a third party tool) provides precisely such a blob caching facility. It offers a unique combination of externalization and BLOB caching for effective blob management and access from a single interface. It makes use of NCache® technology to let you cache frequently used BLOBs in a distributed fashion with high availability, complete replication and failover. Details can be found at http://www.alachisoft.com/blog.....nce-boost/
Consider using StorageEdge if you are having blob management issues, though it is also helpful for many other matters.