none
DPM Server sizing RRS feed

  • Question

  • Hi,

    1) My goal is to setup a scheduled report with regards to DPM Server sizing, for example if the number of disk-based snapshots is getting close to the limit of 9 000. I`ve found the following information on TechNet:

    Estimate how many DPM servers are required

    http://technet.microsoft.com/en-us/library/hh758179.aspx

    When I run the following, nothing is returned:

    $server=Connect-DPMServer $env:computername
    $server.CurrentShadowCopyProvision

    In fact, if I run $server | Get-Member I can`t find a property with the name CurrentShadowCopyProvision.

    I`ve tried on both DPM 2012 and DPM 2012 R2. Is this property not available anymore? If so, how can I determine the current number of Shadow Copies?

    2) $server.VolumeList.count shows the number of volumes present on the DPM server. Is it sufficient to verify that this number is below the supported limit of 600 in order to verify that the DPM server is not reaching the capacity limits? (E.g. provide a warning when the number reaches 550).

    3) Are there other recommended factors to look for with regards to sizing/scaling a DPM server?


    • Edited by scripter42 Wednesday, September 17, 2014 8:04 AM
    Wednesday, September 17, 2014 8:03 AM

Answers

  • Hi,

    The snapshot provisioning script will show you how many snapshots will be provisioned after all data sources have desired RP based on frequency and retention period, so as long as that number does not exceed the limit, no need to monitor active snapshots.

    Yes, as long as total dpm volumes is 600 or less you should be fine.  Other limits will kick in if you are doing large number if SQL databases.

    Page file size is also very important, use below script to calculate that as well. It should be ran periodically to resize as replica volume usage increases.

    ################################################################################################
    # 
    # This script calculates the recommended pagefile size 
    # 
    # Author        : Wilson Souza
    # Date Created  : 08/14/2013
    # Date Modified : 04/12/2014
      $Script_Name  = "wilson-pagefile_calculator"
      $Version      = 1.2
    #
    # CHANGE LOG
    # ==========
    #    1.2 - added more granular output
    #    1.1 - Issue when server has pagefile.sys in multiple volumes
    ################################################################################################
    
    # Add all necessary pssnapin. We load them here so user can run this script on any PowerShell console
    add-pssnapin sqlservercmdletsnapin100 -ErrorAction SilentlyContinue
    Add-PSSnapin Microsoft.DataProtectionManager.PowerShell -ErrorAction SilentlyContinue
    
    # Setting up environment variables.
    # $ErrorActionPreference = "continue"
    $ConfirmPreference = 'None'
    $ErrorActionPreference='SilentlyContinue'
    $global:color= 'white' 
    $outfile = $Script_Name + ".txt"
    
    
    # Main
    
    cls
    write-host "Script $Script_Name Version $version`n"
    write-host "This script calculates the recommended pagefile size. " -NoNewline
    write-host "This script isn't intended to run on DPM 2007`n" -ForegroundColor Red
    
    # Get DPM server FQDN and DPM Database
    $DPMServerConnection = (Connect-DPMServer (&hostname))
    $DPMServer = $DPMServerConnection.name
    
    # Find out where DPMDB is located
    $DPMDB = $dpmserverconnection.dpmdatabaselogicalpath.substring($dpmserverconnection.DPMDatabaseLogicalPath.LastIndexOf('\') + 1,$dpmserverconnection.DPMDatabaseLogicalPath.Length - $dpmserverconnection.DPMDatabaseLogicalPath.LastIndexOf('\') -1 )
    $DPM   = $dpmserverconnection.dpmdatabaselogicalpath.substring(0,$dpmserverconnection.DPMDatabaseLogicalPath.LastIndexOf('\'))
    $GB    = 1 / 1024 / 1024 / 1024
    $Query = "  declare @total bigint
                select distinct volume.GuidName,volume.VolumeSize into #test
                from tbl_SPM_Volume Volume 
                join tbl_SPM_VolumeSet VolumeSet on VolumeSet.VolumeSetId=Volume.VolumeSetId 
                join tbl_PRM_LogicalReplica Replica on Replica.PhysicalReplicaId=VolumeSet.VolumeSetId 
                where Replica.Validity not in (0,4)  -- [Allocated = 0,Invalid = 1,Valid = 2,Missing = 3,Destroyed = 4,ProtectionStopped = 5,Inactive = 6]
                and volume.usage = 2   -- Replica=1, DiffArea=2
                select @total = SUM(volumesize) from #test
                insert into #test values ('=Total RP volume size',@total)
                select @total = (SUM(volumesize)*.002) from #test
                where GuidName like '%=Total%'
                insert into #test values ('Additional pagefile size reqd in BYTES',@total)
                select @total = (SUM(volumesize)/1024) from #test
                where GuidName like '%BYTES%'
                insert into #test values ('Additional pagefile size reqd in MB',@total)
                select * from #test order by guidname
                drop table #test" 
    
    $RPPageFile          = (invoke-sqlcmd -serverinstance $DPM -query $query -MaxCharLength 10000000 -Database $DPMDB)
    $CurrentPageFileSize = 0
    $CurrentPageFiles    = @(gwmi -computer . Win32_pagefileusage)
    foreach ($PageFile in $CurrentPageFiles)
    {
    	$CurrentPageFileSize += $PageFile.AllocatedBaseSize * 1024 * 1024
    }
    $TotalRAM = (gwmi -computer . Win32_ComputerSystem).TotalPhysicalMemory
    write-host (" Total Recovery Point Volume Size:     {0,4:N0} GB" -f ($RPPageFile[-3].VolumeSize  * $GB))
    write-host (" 0.2% of Recovery Point RP Vol Size:   {0,4:N0} GB" -f ($RPPageFile[-3].VolumeSize * $GB * .002))
    write-host (" System Total RAM memory:              {0,4:N0} GB" -f (($TotalRAM) * $GB))
    write-host (" Current PageFile size:                {0,4:N0} GB" -f ($CurrentPageFileSize * $GB))
    write-host (" DPM Recommended (RAM * 1.5 + 0.2% RP):{0,4:N0} GB" -f (($TotalRAM * 1.5 + $RPPageFile[-3].VolumeSize *.002) * $GB))
    write-host (" ")
    
    


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.


    Thursday, September 18, 2014 4:06 AM
    Moderator
  • Hi,

    Yes, in the extreme case where physical memory is very large, I'm thinking that the recommended page file would probably not need to be implemented.

    For SQL memory, we would usually recommend to customers to set the max server memory to 50% - 60% of physical memory.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by scripter42 Thursday, September 18, 2014 1:41 PM
    Thursday, September 18, 2014 9:10 AM
    Moderator

All replies

  • Hi,

    Provisioning was changed in DPM 2010, so you can run the below powershell script.

    ##################################################################################################
    #                                                                                                #
    # In DPM 2007 there is a powershell command you can run to find out how many snapshots your DPM  #
    # server will create with the current configuration                                              #
    #                                                                                                #
    # $server=Connect-DPMServer <Name of the DPM server>                                             #
    # $server.CurrentShadowCopyProvision                                                             #
    #                                                                                                #
    # This information can be found @ http://technet.microsoft.com/en-us/library/ff399518.aspx       #
    # If you run the command above on DPM 2010 you will get no output. The script below will help us #
    # to achieve the same results with DPM 2010.                                                     #
    #                                                                                                #
    # Author     : Wilson Souza                                                                      #
    # Created    : 03/28/2011                                                                        #
    # Modified   : 04/13/2012                                                                        #
    # Version    : 2.0                                                                               #
    #                                                                                                #
    # Change log                                                                                     #
    # ==========                                                                                     #
    #                                                                                                #
    #       ver 2.0 - Rewrote the script in a simpler way and added the current number of snapshots  #
    #                 Present in the system for active data sources                                  #
    #       ver 1.2 - Need to count current snapshots available in Inactive Protection as DPM uses   #
    #                 This for overall Provisioning count                                            #
    # 	Ver 1.1 - Using array when the data returned is equivalente of a single row              #
    ##################################################################################################
    
    cls
    $total     = 0
    $Totalsnap = 0 
    $VSSAdmin = Vssadmin List shadows
    $ProtectionGroup = @(get-protectiongroup (&hostname))
    "Provisioning Protection Group          # of Snapshots" 
    "------------ ------------------------- --------------" 
    ForEach ($pg in $ProtectionGroup)
    {
    	$CurrentSnap      = 0
    	$Provisioning     = 0
    	$PolicyVolume     = 0
    	$PolicyApp        = 0
    	$ds               = @(Get-DataSource $pg) 
    	$VolumeSnaps      = @($ds | ? { $_.type.name -eq 'volume' -or $_.type.name -eq 'Client'} | select-object replicapath |get-unique -asstring)
    	$VolumeDS         = $VolumeSnaps.count
    	$ApplicationSnaps = @($ds | ? { $_.type.name -ne 'volume' -and $_.type.name -ne 'Client'} | select-object replicapath |get-unique -asstring)
    	$ApplicationDS    = $ApplicationSnaps.count
    	$DSTotal          = $VolumeSnaps + $ApplicationSnaps 
    	$Policy        = (Get-PolicyObjective $pg -ShortTerm).schedules
    	if ($pg.protectionmethod -like '*disk*')
    	{
    		If ($VolumeDS -ne 0 )
    		{
    			$PolicyVolume = @(($policy | ? { $_.jobtypestring -eq 'Shadow Copy'}).TimesOfDay).count
    		}
    		If ($ApplicationDS -ne 0)
    		{
    			$PolicyApp    = @(($policy | ? { $_.jobtypestring -eq 'Express full'}).TimesOfDay).count
    		}
    		$Provisioning = $volumeDS * $PolicyVolume * $pg.onsiterecoveryrange.key + $ApplicationDS * $PolicyApp * $pg.onsiterecoveryrange.key
    		ForEach ($DSTotal1 in $DSTotal)
    		{
    			$CurrentSnap = $CurrentSnap + ($VSSAdmin | Select-String $Dstotal1.replicapath.substring(4,44)).count
    		}
    	}
    	$TotalSnap = $Totalsnap + $CurrentSnap
    
    	$output = "{0,12} {1,-25} {2,5}" -f $Provisioning, $pg.friendlyname, $CurrentSnap
    	if ($color -eq 'White') { $color = 'cyan' } else { $Color = 'white' }
    	write-host $output -f $color
    	$Total = $total + $Provisioning
    
    }
    
    $InactiveDS = @()
    $InactiveDSTotal  = @(get-datasource (&hostname) -inactive) 
    foreach ($ds in $InactiveDSTotal)
    {
    	If (($InactiveDS | ?  { $_.replicapath -eq $ds.replicapath}) -eq $Null)
    	{ 
    		$InactiveDS = $InactiveDS + $ds
    	}
    }
    
    $ActiveDS    = @(get-datasource (&hostname) | ? { $_.UnderActiveProtectionFromPS -eq $true })
    ForEach ($ds in $InactiveDS)
    {
    	if ($ds.iscollocated -eq $true)
    	{
    		$CollocatedProtected = @($ActiveDS | ? { $_.ReplicaPath -eq $ds.ReplicaPath}).count
    		if ($CollocatedProtected -eq 0)
    		{
    			[String]$ReplicaPath = $ds.protectableobjectloadpath.values
    			$ReplicaPath = $ReplicaPath.Substring($ReplicaPath.IndexOf("vol_"),40)
    			$inactive = $inactive + ( $VSSAdmin | Select-String -Pattern $ReplicaPath).count
    		}
    	}
    	else
    	{
    		$inactive = $inactive + @(get-recoverypoint $ds | ? { $_.IsIncremental -eq $False }).count
    	}
    
    }
    if ($Inactive -gt 0)
    {
    	$output = "{0,12} Inactive Protection       {1,5}" -f $Inactive, $Inactive
    	write-host $output -f magenta
    	$total     = $total + $inactive
    	$TotalSnap = $TotalSnap + $Inactive
    }
    
    "------------ ------------------------- --------------" 
    $output = "{0,12}                           {1,5} " -f $total, $TotalSnap
    write-host $output -f yellow
    


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, September 17, 2014 3:17 PM
    Moderator
  • Thanks Mike!

    The TechNet article I linked to states Applies To: System Center 2012 - Data Protection Manager, System Center 2012 R2 Data Protection Manager, System Center 2012 SP1 - Data Protection Manager, thus the documentation clearly needs an update.

    I also found the following code to return the approximately number of snapshots:

    $VssShadows = vssadmin list shadows | Select-String 'Shadow Copy ID'
    $VssShadows

    Based on testing on a couple of DPM servers, the number from this code is very close to the number the script you provided returns, so for reporting purposes this might be sufficient to minimize the complexity of the reporting script.

    I`ll mark your reply as answer, but I`d still appreciate some feedback regarding question 2 and 3 in my initial post.

    Wednesday, September 17, 2014 6:28 PM
  • Hi,

    The snapshot provisioning script will show you how many snapshots will be provisioned after all data sources have desired RP based on frequency and retention period, so as long as that number does not exceed the limit, no need to monitor active snapshots.

    Yes, as long as total dpm volumes is 600 or less you should be fine.  Other limits will kick in if you are doing large number if SQL databases.

    Page file size is also very important, use below script to calculate that as well. It should be ran periodically to resize as replica volume usage increases.

    ################################################################################################
    # 
    # This script calculates the recommended pagefile size 
    # 
    # Author        : Wilson Souza
    # Date Created  : 08/14/2013
    # Date Modified : 04/12/2014
      $Script_Name  = "wilson-pagefile_calculator"
      $Version      = 1.2
    #
    # CHANGE LOG
    # ==========
    #    1.2 - added more granular output
    #    1.1 - Issue when server has pagefile.sys in multiple volumes
    ################################################################################################
    
    # Add all necessary pssnapin. We load them here so user can run this script on any PowerShell console
    add-pssnapin sqlservercmdletsnapin100 -ErrorAction SilentlyContinue
    Add-PSSnapin Microsoft.DataProtectionManager.PowerShell -ErrorAction SilentlyContinue
    
    # Setting up environment variables.
    # $ErrorActionPreference = "continue"
    $ConfirmPreference = 'None'
    $ErrorActionPreference='SilentlyContinue'
    $global:color= 'white' 
    $outfile = $Script_Name + ".txt"
    
    
    # Main
    
    cls
    write-host "Script $Script_Name Version $version`n"
    write-host "This script calculates the recommended pagefile size. " -NoNewline
    write-host "This script isn't intended to run on DPM 2007`n" -ForegroundColor Red
    
    # Get DPM server FQDN and DPM Database
    $DPMServerConnection = (Connect-DPMServer (&hostname))
    $DPMServer = $DPMServerConnection.name
    
    # Find out where DPMDB is located
    $DPMDB = $dpmserverconnection.dpmdatabaselogicalpath.substring($dpmserverconnection.DPMDatabaseLogicalPath.LastIndexOf('\') + 1,$dpmserverconnection.DPMDatabaseLogicalPath.Length - $dpmserverconnection.DPMDatabaseLogicalPath.LastIndexOf('\') -1 )
    $DPM   = $dpmserverconnection.dpmdatabaselogicalpath.substring(0,$dpmserverconnection.DPMDatabaseLogicalPath.LastIndexOf('\'))
    $GB    = 1 / 1024 / 1024 / 1024
    $Query = "  declare @total bigint
                select distinct volume.GuidName,volume.VolumeSize into #test
                from tbl_SPM_Volume Volume 
                join tbl_SPM_VolumeSet VolumeSet on VolumeSet.VolumeSetId=Volume.VolumeSetId 
                join tbl_PRM_LogicalReplica Replica on Replica.PhysicalReplicaId=VolumeSet.VolumeSetId 
                where Replica.Validity not in (0,4)  -- [Allocated = 0,Invalid = 1,Valid = 2,Missing = 3,Destroyed = 4,ProtectionStopped = 5,Inactive = 6]
                and volume.usage = 2   -- Replica=1, DiffArea=2
                select @total = SUM(volumesize) from #test
                insert into #test values ('=Total RP volume size',@total)
                select @total = (SUM(volumesize)*.002) from #test
                where GuidName like '%=Total%'
                insert into #test values ('Additional pagefile size reqd in BYTES',@total)
                select @total = (SUM(volumesize)/1024) from #test
                where GuidName like '%BYTES%'
                insert into #test values ('Additional pagefile size reqd in MB',@total)
                select * from #test order by guidname
                drop table #test" 
    
    $RPPageFile          = (invoke-sqlcmd -serverinstance $DPM -query $query -MaxCharLength 10000000 -Database $DPMDB)
    $CurrentPageFileSize = 0
    $CurrentPageFiles    = @(gwmi -computer . Win32_pagefileusage)
    foreach ($PageFile in $CurrentPageFiles)
    {
    	$CurrentPageFileSize += $PageFile.AllocatedBaseSize * 1024 * 1024
    }
    $TotalRAM = (gwmi -computer . Win32_ComputerSystem).TotalPhysicalMemory
    write-host (" Total Recovery Point Volume Size:     {0,4:N0} GB" -f ($RPPageFile[-3].VolumeSize  * $GB))
    write-host (" 0.2% of Recovery Point RP Vol Size:   {0,4:N0} GB" -f ($RPPageFile[-3].VolumeSize * $GB * .002))
    write-host (" System Total RAM memory:              {0,4:N0} GB" -f (($TotalRAM) * $GB))
    write-host (" Current PageFile size:                {0,4:N0} GB" -f ($CurrentPageFileSize * $GB))
    write-host (" DPM Recommended (RAM * 1.5 + 0.2% RP):{0,4:N0} GB" -f (($TotalRAM * 1.5 + $RPPageFile[-3].VolumeSize *.002) * $GB))
    write-host (" ")
    
    


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.


    Thursday, September 18, 2014 4:06 AM
    Moderator
  • Thanks Mike, the page file sizing script is very useful.

    I have a couple of examples:

    Total Recovery Point Volume Size:     14 858 GB
    0.2% of Recovery Point RP Vol Size:     30 GB
    System Total RAM memory:                16 GB
    Current PageFile size:                  16 GB
    DPM Recommended (RAM * 1.5 + 0.2% RP):  54 GB

    In this case, the pagefile should be set as a high 54 GB?

    Total Recovery Point Volume Size:     4 867 GB
     0.2% of Recovery Point RP Vol Size:     10 GB
     System Total RAM memory:               256 GB
     Current PageFile size:                  38 GB
     DPM Recommended (RAM * 1.5 + 0.2% RP): 394 GB

    This is an edge case, where a physical server is oversized with regards to memory for DPM. Is it necessary to change the pagefile in this case? 394 GB seems very large.

    How much physical memory do you typically designate to DPM? The recommended size of 8 GB? Or is it ok to go up to 16 GB for example if there are resources available?

    Also, do you recommend to tune the "Maximum server memory" for the SQL instance used by DPM?

    Thursday, September 18, 2014 7:53 AM
  • Hi,

    Yes, in the extreme case where physical memory is very large, I'm thinking that the recommended page file would probably not need to be implemented.

    For SQL memory, we would usually recommend to customers to set the max server memory to 50% - 60% of physical memory.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by scripter42 Thursday, September 18, 2014 1:41 PM
    Thursday, September 18, 2014 9:10 AM
    Moderator