Saturday, January 8, 2011

How to estimate the storage space required for SharePoint 2010 content databases and Index servers?

Scenario:
How to estimate the storage space required for SharePoint 2010 content databases and index servers?

Explanation:

The following process describes how to approximately estimate the storage required for content databases, without considering log files:
1.   Calculate the expected number of documents. This value is referred to as D in the formula.

How you calculate the number of documents will be determined by the features that you are using. For example, for My Site Web sites or collaboration sites, we recommend that you calculate the expected number of documents per user and multiply by the number of users. For records management or content publishing sites, you may calculate the number of documents that are managed and generated by a process.

If you are migrating from a current system, it may be easier to extrapolate your current growth rate and usage. If you are creating a new system, review your existing file shares or other repositories and estimate based on that usage rate.
2.   Estimate the average size of the documents that you will be storing. This value is referred to as S in the formula. It may be worthwhile to estimate averages for different types or groups of sites. The average file size for My Site Web sites, media repositories, and different department portals can vary significantly.
3.   Estimate the number of list items in the environment. This value is referred to as L in the formula.

List items are more difficult to estimate than documents. We generally use an estimate of three times the number of documents (D), but this will vary based on how you expect to use your sites.
4.   Determine the approximate number of versions. Estimate the average number of versions any document in a library will have (this value will usually be much lower than the maximum allowed number of versions). This value is referred to as V in the formula.

The value of V must be above zero.
5.   Use the following formula to estimate the size of your content databases:

Database size = ((D × V) × S) + (10 KB × (L + (V × D)))

The value of 10 KB in the formula is a constant that roughly estimates the amount of metadata required by SharePoint Server 2010. If your system requires significant use of metadata, you may want to increase this constant.
As an example, if you were to use the formula to estimate the amount of storage space required for the data files for a content database in a collaboration environment with the following characteristics, you would need approximately 105 GB.
Input
Value
Number of documents (D)
200,000
Calculated by assuming 10,000 users times 20 documents
Average size of documents (S)
250 KB
List items (L)
600,000
Number of non-current versions (V)
2
Assuming that the maximum versions allowed is 10
Database size = (((200,000 x 2)) × 250) + ((10 KB × (600,000 + (200,000 x 2))) = 110,000,000 KB or 105 GB

Microsoft recommends 80 GB of hard disk space for WFE servers. Maintain twice as much free space as you have RAM for production environments.

A quick formula to calculate the hard disk space on the index server would be to multiply the expected index-able content by 20%.

So for example if the expected total content to be indexed is 500 GB, the index server needs at least 500 * 20% = 100GB

This white paper from Microsoft explains how to estimate performance and capacity requirements for SharePoint in more detail. (page 45 for specific guidance on how to calculate storage needs for search)
 

How to enable VariationLabelMenu control in SharePoint 2010?

Scenario: 
How to enable VariationLabelMenu control in SharePoint 2010?

Explanation:
SharePoint 2010 (and MOSS 2007) ships with a control called VariationLabelMenu that can be used on sites with site variations enabled. This control enables users to navigate to the related/equivalent pages in other language sites (for which the language packs are installed)

Even though this control is provided OOB in SharePoint 2010, few steps need to be followed to get it to work.

After everything has been configured correctly, you will see a nice little menu that looks like in the below picture. You can place it in the master page or page layout according to your needs.


In my case, I have german language pack installed and therefore the VariationLabelMenu control displays "Deutsch" in the dropdown options.

Solution:

Step-1: 
Go to the location Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES, find the file "VariationsLabelMenu.ascx" and edit it.
Add the below line to the contents of the file.

<cms:VariationsLabelEcbMenu id ="varlabelmenu1" DataSourceID="LabelMenuDataSource" DisplayText="Links" IsCallbackMode="true" runat="server" />






After this change, the VariationLabelMenu shows up in the ribbon but it messes up with the existing controls in the ribbon which is not very pleasant.

There are some side effects due to the above change. The page editing options in the ribbon menu gets shrunk as the ribbon needs to accommodate the "VariationLabelMenu" control.


As you can notice in the above picture, the page editing options have been messed up.
Ideally it should look like below:


Also the welcome control that displays the Personal Actions Menu (Welcome Menu) will be replaced with the VariationLabelMenu control as shown below:



From what I have noticed, the reason for the disappearance of the welcome menu and the improper displayof the page editing options in the ribbon are because of the VariationLabelMenu. So if we hide it in the ribbon and show it somewhere else on the page, things will look normal again.

I have searched for the VariationLabelMenu control's markup in the HTML generated by SharePoint. In my case, it is ctl00_ctl34_varlabelmenu1. The control ID may change depending on your master page settings.

<style type="text/css">
    #ctl00_ctl34_varlabelmenu1 {display:none;}
</style>

Include the above code any where in the master page / page layout and it will hide the VariationLabelMenu control in the ribbon.

Now it's time to add the VariationLabelMenu control somewhere else on the page.
Add the below line of code at the top of the master page.

<%@ Register TagPrefix="PublishingVariations" TagName="VariationsLabelMenu" src="~/_controltemplates/VariationsLabelMenu.ascx" %>

Find an appropriate location in the master page / page layout and add the below line of code which renders the VariationLabelMenu on the page.

<PublishingVariations:VariationsLabelMenu id="labelmenu1" runat="server"/>

Thursday, January 6, 2011

How to show the published date for a SharePoint blog post in Content Query Web Part?

Questions:

What is the difference between the fields PubDate and PublishedDate in a SharePoint Blog Post content type?

How to display a SharePoint blog post's PublishedDate in Content Query Web Part ?

Explanation:

If you try to use Content Query Web Part hereafter referred to as CQWP to pull blog posts, you will notice that CQWP by default pulls the following fields:
  • Modified
  • Created
  • PubDate
It quite looks like the field "PubDate" refers to the date on which the blog post was published.
But in fact the "PubDate" field is the same as the field "Modified" except that it returns the date in a different format.