none
DPM and Memory RRS feed

  • Question

  • Hi,

    Refer to the following TechNet Article: DPM and Memory

    System Center 2012 – Data Protection Manager (DPM)M requires a pagefile size that is 0.2 percent the size of all recovery point volumes combined, in addition to the recommended size (generally, 1.5 times the amount of RAM on the computer). For example, if the recovery point volumes on a DPM server total 3 TB, you should increase the pagefile size by 6 GB.

    I have a DPM server with 30 TB in total capacity (22 TB used). Does this mean I should have a pagefile configured to 60 GB + 1,5 times the amount of RAM (16 GB in my case).

    Also, is it necessary to adjust the SQL memory settings? The DPM database is running on a local SQL database.

    Monday, January 6, 2014 7:26 AM

Answers

  • Hi,

    You can use the following DPM powershell script to show you the new recommended page file size based on actual protection.

    $Script_Name  = "pagefile_calculator"
    $Version      = 1.5
    
    
    # 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
     $MB    = 1 / 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
     }
     $RPPageFile = (invoke-sqlcmd -serverinstance $DPM -query $query -MaxCharLength 10000000 -Database $DPMDB)
     $CurrentPageFileSize = (gwmi -computer . Win32_pagefileusage).AllocatedBaseSize * 1024 * 1024
     $TotalRAM = (gwmi -computer . Win32_ComputerSystem).TotalPhysicalMemory
     $additional = ($RPPageFile[-3].VolumeSize * .002)
     $totalnew = ($additional + $TotalRAM * 1.5)
     write-host (" Total Recovery Point Volume Size:     {0,6:N0} GB" -f ($RPPageFile[-3].VolumeSize  * $GB))
     write-host (" .02% of RP recoverypoint Vol. size:   {0,6:N0} MB" -f ($RPPageFile[-3].VolumeSize * $MB * .002))
     write-host (" System Total RAM memory:              {0,6:N0} GB" -f (($TotalRAM) * $GB))
     write-host (" Current PageFile size:                {0,6:N0} GB" -f ($CurrentPageFileSize * $GB))
     #write-host (" additional page file size:    {0,4:N0} MB" -f     ($additional))
     write-host ("`n DPM Recommended (RAM * 1.5 + .02% RP) in BYTES: {0,18:N0}" -f $totalnew)           #(($TotalRAM) * 1.5 + $additional))
     write-host (" DPM Recommended (RAM * 1.5 + .02% RP) in MB:    {0,18:N0}" -f ($totalnew * $MB))
     write-host (" DPM Recommended (RAM * 1.5 + .02% RP) in GB:    {0,18:N0}" -f ($totalnew * $GB))
     write-host (" ")
    


    For SQL memory tuning, please refer to the following and Set the max server memory to 50% - 60% of physical memory.

    How to adjust memory usage by using configuration options in SQL Server
    http://support.microsoft.com/kb/321363


    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.



    Monday, January 6, 2014 6:59 PM
    Moderator
  • Hi,

    DPM does not "adjust" SQL. SQL by nature likes as much memory as it can get, so limiting it to 50% - 60% of physical will help overall performance. 


    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 Wednesday, January 8, 2014 1:01 PM
    Tuesday, January 7, 2014 3:22 PM
    Moderator

All replies

  • Hi,

    You can use the following DPM powershell script to show you the new recommended page file size based on actual protection.

    $Script_Name  = "pagefile_calculator"
    $Version      = 1.5
    
    
    # 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
     $MB    = 1 / 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
     }
     $RPPageFile = (invoke-sqlcmd -serverinstance $DPM -query $query -MaxCharLength 10000000 -Database $DPMDB)
     $CurrentPageFileSize = (gwmi -computer . Win32_pagefileusage).AllocatedBaseSize * 1024 * 1024
     $TotalRAM = (gwmi -computer . Win32_ComputerSystem).TotalPhysicalMemory
     $additional = ($RPPageFile[-3].VolumeSize * .002)
     $totalnew = ($additional + $TotalRAM * 1.5)
     write-host (" Total Recovery Point Volume Size:     {0,6:N0} GB" -f ($RPPageFile[-3].VolumeSize  * $GB))
     write-host (" .02% of RP recoverypoint Vol. size:   {0,6:N0} MB" -f ($RPPageFile[-3].VolumeSize * $MB * .002))
     write-host (" System Total RAM memory:              {0,6:N0} GB" -f (($TotalRAM) * $GB))
     write-host (" Current PageFile size:                {0,6:N0} GB" -f ($CurrentPageFileSize * $GB))
     #write-host (" additional page file size:    {0,4:N0} MB" -f     ($additional))
     write-host ("`n DPM Recommended (RAM * 1.5 + .02% RP) in BYTES: {0,18:N0}" -f $totalnew)           #(($TotalRAM) * 1.5 + $additional))
     write-host (" DPM Recommended (RAM * 1.5 + .02% RP) in MB:    {0,18:N0}" -f ($totalnew * $MB))
     write-host (" DPM Recommended (RAM * 1.5 + .02% RP) in GB:    {0,18:N0}" -f ($totalnew * $GB))
     write-host (" ")
    


    For SQL memory tuning, please refer to the following and Set the max server memory to 50% - 60% of physical memory.

    How to adjust memory usage by using configuration options in SQL Server
    http://support.microsoft.com/kb/321363


    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.



    Monday, January 6, 2014 6:59 PM
    Moderator
  • Thanks, very useful!

    Are there any official statements regarding the SQL memory tuning? I find it a bit confusing since some people says DPM manages SQL and adjusts performance accordingly itself.

    Tuesday, January 7, 2014 7:11 AM
  • Hi,

    DPM does not "adjust" SQL. SQL by nature likes as much memory as it can get, so limiting it to 50% - 60% of physical will help overall performance. 


    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 Wednesday, January 8, 2014 1:01 PM
    Tuesday, January 7, 2014 3:22 PM
    Moderator