CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 19 Dynamic Management Views /Ê}iÌÊ> immediate snapshot of a large amount of data that was formerly available only Ê*iÀvÀ>ViÊÌÀ]Ê-+Ê-iÀÛiÀÊÜÊvviÀÃÊÌiÊÃ>iÊ`>Ì>ÊÌiÀ>ÞÊÌÀÕ}Ê>ÊÃiÌ of `Þ>VÊ>>}iiÌÊÛiÜÃÊ6îÊ>`Ê`Þ>VÊ>>}iiÌÊvÕVÌÃÊî°Ê/iÃiÊ>ÀiÊ iÝÌÀiiÞÊÕÃivÕÊiV>ÃÃÊvÀÊV>«ÌÕÀ}Ê>ÊÃ>«ÃÌÊvÊÌiÊVÕÀÀiÌÊ«iÀvÀ>ViÊvÊÞÕÀÊ ÃÞÃÌi°Ê½ÊÌÀ`ÕViÊÃiÛiÀ>ÊvÊÌiÃiÊÌÀÕ}ÕÌÊÌiÊL]ÊLÕÌʽÊvVÕÃÊÊ>ÊviÜÊÌ>ÌÊ>ÀiÊÌiÊ most important for monitoring performance and for establishing a baseline. /iÊouo*`i[ko[lanbkni]j_a[_kqjpano view displaysÊÌiÊ-+Ê-iÀÛiÀÊVÕÌiÀÃÊÜÌÊ>Ê µÕiÀÞ]Ê>Ü}ÊÞÕÊÌÊ>««ÞÊÌiÊvÕÊÃÌÀi}ÌÊvÊ/-+ÊÌÊÌiÊ`>Ì>Êi`>ÌiÞ°ÊÀÊiÝ>«i]Ê this simple query will return the current value for Hkcejo+oa_: OAHA?P_jpn[r]hqa BNKIouo*`i[ko[lanbkni]j_a[_kqjpano SDANAK>FA?P[J=IA9#IOOMH CB.,,46Cajan]hOp]peope_o# =J@_kqjpan[j]ia9#Hkcejo+oa_# /ÃÊÀiÌÕÀÃÊÌiÊÛ>ÕiÊvÊ£xÊvÀÊÞÊÃiÀÛiÀ°ÊÀÊÞÕÀÊÃiÀÛiÀ]ÊÞÕ½Êii`ÊÌÊÃÕLÃÌÌÕÌiÊÌiÊ appropriate server name in the K>FA?P[J=IA comparison. /iÀiÊ>ÀiÊ>Ê>À}iÊÕLiÀÊvÊ6ÃÊ>`ÊÃÊÌ>ÌÊV>ÊLiÊÕÃi`ÊÌÊ}>ÌiÀÊvÀ>ÌÊ about the server. Rather than cover them all, I’ll introduce one more that you will find yourself accessing on a regular basis, ouo*`i[ko[s]ep[op]po°Ê/ÃÊ6ÊÃÜÃÊ>Ê>}}Ài}>Ìi`ÊÛiÜÊvÊ ÌiÊÌÀi>`ÃÊÜÌÊ-+Ê-iÀÛiÀÊÌ>ÌÊ>ÀiÊÜ>Ì}ÊÊÛ>ÀÕÃÊÀiÃÕÀViÃ]ÊViVÌi`ÊÃViÊÌiÊ>ÃÌÊ ÌiÊ-+Ê-iÀÛiÀÊÜ>ÃÊÃÌ>ÀÌi`ÊÀÊÌiÊVÕÌiÀÃÊÜiÀiÊÀiÃiÌ°Ê`iÌvÞ}ÊÌiÊÌÞ«iÃÊvÊÜ>ÌÃÊÌ>ÌÊ>ÀiÊ occurring within your system is one of the easiest mechanisms to begin identifying the source vÊÞÕÀÊLÌÌiiVðÊ9ÕÊV>ÊÃÀÌÊÌiÊ`>Ì>ÊÊÛ>ÀÕÃÊÜ>ÞÃ]ÊLÕÌÊvÀÊÌiÊvÀÃÌÊiÝ>«i]ʽÊÊ>ÌÊ the waits that have the longest current count using this simple query: OAHA?PPKL$-,% & BNKIouo*`i[ko[s]ep[op]po KN@AN>Us]ep[peia[io@AO? }ÕÀiÊÓÓÊ`ë>ÞÃÊÌiÊÕÌ«ÕÌ° Figure 2-2. Output from ouo*`i[ko[s]ep[op]po You can see not only the cumulative time that particular waits have occurred but also >ÊVÕÌÊvÊÜÊvÌiÊÌiÞÊ>ÛiÊVVÕÀÀi`Ê>`ÊÌiÊ>ÝÕÊÌiÊÌ>ÌÊÃiÌ}Ê>`ÊÌÊ Ü>Ì°ÊÀÊiÀi]ÊÞÕÊV>Ê`iÌvÞÊÌiÊÜ>ÌÊÌÞ«iÊ>`ÊLi}ÊÌÀÕLiÃÌ}°Ê"iÊvÊÌiÊÃÌÊ CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 20 VÊÌÞ«iÃÊvÊÜ>ÌÃÊÃÊÉ"°ÊvÊÞÕÊÃiiÊ=OUJ?D[EK[?KILHAPEKJ, EK[?KILHAPEKJ, HKCICN, SNEPAHKC, or L=CAEKH=P?D in your top tenÊÜ>ÌÊÌÞ«iÃ]ÊÞÕÊ>ÞÊLiÊiÝ«iÀiV}ÊÉ"ÊVÌiÌ]Ê >`ÊÞÕÊÜÊÜÊÜiÀiÊÌÊÃÌ>ÀÌÊÜÀ}°ÊÀÊ>ÊÀiÊ`iÌ>i`Ê>>ÞÃÃÊvÊÜ>ÌÊÌÞ«iÃÊ>`ÊÜÊ ÌÊÕÃiÊÌiÊ>ÃÊ>ÊÌÀ}ÊÌÊÜÌÊ-+Ê-iÀÛiÀ]ÊÀi>`ÊÌiÊVÀÃvÌÊÜÌiÊ«>«iÀʺ-+Ê -iÀÛiÀÊÓääxÊ7>ÌÃÊ>`Ê+ÕiÕiûÊdppl6++sss*ie_nkokbp*_ki+pa_djap+lnk`pa_djkh+omh+ ^aopln]_pe_a+lanbkni]j_a[pqjejc[s]epo[mqaqao*iolt®°ÊÌÕ}ÊÌÊÜ>ÃÊÜÀÌÌiÊvÀÊ-+Ê -iÀÛiÀÊÓääx]ÊÌÊÃÊiµÕ>ÞÊ>««V>LiÊÌÊ-+Ê-iÀÛiÀÊÓään° Hardware Resource Bottlenecks /Þ«V>Þ]Ê-+Ê-iÀÛiÀÊ`>Ì>L>Ãi performance is affected by stress on the following hardware resources: Ê UÊ iÀÞ Ê UÊ ÃÊÉ" Ê UÊ *ÀViÃÃÀ Ê UÊ iÌÜÀ -ÌÀiÃÃÊLiÞ`ÊÌiÊV>«>VÌÞÊvÊ>Ê>À`Ü>ÀiÊÀiÃÕÀViÊvÀÃÊ>ÊLÌÌiiV°Ê/Ê>``ÀiÃÃÊÌiÊ ÛiÀ>Ê«iÀvÀ>ViÊvÊ>ÊÃÞÃÌi]ÊÞÕÊii`ÊÌÊ`iÌvÞÊÌiÃiÊLÌÌiiVÃ]ÊLiV>ÕÃiÊÌiÞÊvÀÊÌiÊ limit on overall system performance. Identifying Bottlenecks /iÀiÊÃÊÕÃÕ>ÞÊ>ÊÀi>ÌëÊLiÌÜiiÊÀiÃÕÀViÊLÌÌiiVðÊÀÊiÝ>«i]Ê>Ê«ÀViÃÃÀÊ LÌÌiiVÊ>ÞÊLiÊ>ÊÃÞ«ÌÊvÊiÝViÃÃÛiÊ«>}}ÊiÀÞÊLÌÌiiV®ÊÀÊ>ÊÃÜÊ`ÃÊ`ÃÊ LÌÌiiV®°ÊvÊ>ÊÃÞÃÌiÊÃÊÜÊÊiÀÞ]ÊV>ÕÃ}ÊiÝViÃÃÛiÊ«>}}]Ê>`Ê>ÃÊ>ÊÃÜÊ`Ã]ÊÌiÊ iÊvÊÌiÊi`ÊÀiÃÕÌÃÊÜÊLiÊ>Ê«ÀViÃÃÀÊÜÌÊ}ÊÕÌâ>ÌÊÃViÊÌiÊ«ÀViÃÃÀÊ>ÃÊÌÊëi`Ê >ÊÃ}vV>ÌÊÕLiÀÊvÊ*1ÊVÞViÃÊÌÊÃÜ>«Ê«>}iÃÊÊ>`ÊÕÌÊvÊÌiÊiÀÞÊ>`ÊÌÊ>>}iÊ ÌiÊÀiÃÕÌ>ÌÊ}ÊÕLiÀÊvÊÉ"ÊÀiµÕiÃÌðÊ,i«>V}ÊÌiÊ«ÀViÃÃÀÊÜÌÊ>Êv>ÃÌiÀÊiÊ>ÞÊi«Ê >ÊÌÌi]ÊLÕÌÊÌÊÜÕ`ÊÌÊLiÊÌiÊLiÃÌÊÛiÀ>ÊÃÕÌ°ÊÊ>ÊV>ÃiÊiÊÌÃ]ÊVÀi>Ã}ÊiÀÞÊÃÊ>Ê ÀiÊ>««À«À>ÌiÊÃÕÌ]ÊLiV>ÕÃiÊÌÊÜÊ`iVÀi>ÃiÊ«ÀiÃÃÕÀiÊÊÌiÊ`ÃÊ>`Ê«ÀViÃÃÀÊ>ÃÊÜi°Ê ÛiÊÕ«}À>`}ÊÌiÊ`ÃÊÜÊ«ÀL>LÞÊLiÊ>ÊLiÌÌiÀÊÃÕÌÊÌ>ÊÕ«}À>`}ÊÌiÊ«ÀViÃÃÀ° N Note The most common performance problem is usually I/O, either from memory or from the disk. "iÊvÊÌiÊLiÃÌÊÜ>ÞÃÊvÊV>Ì}Ê>ÊLÌÌiiVÊÃÊÌÊ`iÌvÞÊÀiÃÕÀViÃÊÌ>ÌÊ>ÀiÊÜ>Ì}ÊvÀÊ some other resource to complete its operation. You can use Performance Monitor counters ÀÊ6ÃÊÃÕVÊ>ÃÊouo*`i[ko[s]ep[op]poÊÌÊ}>ÌiÀÊÌ>ÌÊvÀ>Ì°Ê/iÊÀiëÃiÊÌiÊvÊ>Ê request served by a resource includes the time the request had to wait in the resource queue, >ÃÊÜiÊ>ÃÊÌiÊÌiÊÌ>iÊÌÊiÝiVÕÌiÊÌiÊÀiµÕiÃÌ]ÊÃÊi`ÊÕÃiÀÊÀiëÃiÊÌiÊÃÊ`ÀiVÌÞÊ«À«À- tional to the amount of queuing in a system. CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 21 ÀÊiÝ>«i]ÊVÃ`iÀÊÌ>ÌÊÌiÊ`ÃÊÃÕLÃÞÃÌiÊ>ÃÊ>Ê`ÃʵÕiÕiÊi}ÌÊvÊ£ä°Ê-ViÊÌiÊ `ÃÊÃÕLÃÞÃÌiÊ>Ài>`ÞÊ>ÃÊ«i`}Ê`ÃÊÀiµÕiÃÌÃÊÊÌ]Ê>ÊiÜÊ`ÃÊÀiµÕiÃÌÊ>ÃÊÌÊÜ>ÌÊÕÌÊÌiÊ «ÀiÛÕÃÊ`ÃÊÀiµÕiÃÌÃÊV«iÌi°ÊvÊÌiÊÌiÊÌ>iÊLÞÊ>Ê>ÛiÀ>}iÊ`ÃÊÌÀ>ÃviÀÊÃÊiÊÃiV`]Ê ÌiÊÌiÊiÜÊ`ÃÊÀiµÕiÃÌÊ>ÃÊÌÊÜ>ÌÊvÀÊ>LÕÌÊÌiÊÃiV`ÃÊLivÀiÊ}iÌÌ}ÊÌiÊ>ÌÌiÌÊvÊÌiÊ `ÃÊÃÕLÃÞÃÌi°Ê/iÀivÀi]ÊÌiÊÌÌ>ÊÀiëÃiÊÌiÊvÊÌiÊ`ÃÊÀiµÕiÃÌÊÜÊLiÊÌiÊÃiV`ÃÊÜ>ÌÊ Ìi]Ê«ÕÃÊiÊÃiV`Ê`ÃÊÌÀ>ÃviÀÊÌi° iÊ>Ü>ÀiÊÌ>ÌÊÌiÊ>LÃiViÊvÊ>ʵÕiÕiÊ`iÃÊÌÊi>ÊÌ>ÌÊÌiÀiÊÃÊÊLÌÌiiV°Ê7iÊ µÕiÕiÊi}ÌÃÊÃÌ>ÀÌÊ}ÀÜ}]ÊÜiÛiÀ]ÊÌÊÃÊ>ÊÃÕÀiÊÃ}ÊÌ>ÌÊÌiÊÃÞÃÌiÊÃÊÌÊ>LiÊÌÊii«ÊÕ«Ê with the demand. ÌÊ>ÊÀiÃÕÀViÃÊ>ÛiÊëiVvVÊVÕÌiÀÃÊÌ>ÌÊÃÜʵÕiÕ}ÊiÛiÃ]ÊLÕÌÊÃÌÊÀiÃÕÀViÃÊ >ÛiÊÃiÊVÕÌiÀÃÊÌ>ÌÊÀi«ÀiÃiÌÊ>ÊÛiÀVÌÌ>ÊvÊÌ>ÌÊÀiÃÕÀVi°ÊÀÊiÝ>«i]ÊiÀÞÊ has no such counter, but a large number of hard page faults represents the overcommittal of «ÞÃV>ÊiÀÞÊ>À`Ê«>}iÊv>ÕÌÃÊ>ÀiÊiÝ«>i`Ê>ÌiÀÊÊÌiÊV>«ÌiÀÊÊÌiÊÃiVÌʺ*>}iÃÉÃiVÊ >`Ê*>}iÊ>ÕÌÃÉÃiVÊÕÌiÀû®°Ê"ÌiÀÊÀiÃÕÀViÃ]ÊÃÕVÊ>ÃÊÌiÊ«ÀViÃÃÀÊ>`Ê`Ã]Ê>ÛiÊëiVvVÊ VÕÌiÀÃÊÌÊ`V>ÌiÊÌiÊiÛiÊvʵÕiÕ}°ÊÀÊiÝ>«i]ÊÌi counter L]caHebaAtla_p]j_u `V>ÌiÃÊÜÊ}Ê>Ê«>}iÊÜÊÃÌ>ÞÊÊÌiÊLÕvviÀÊ«ÊÜÌÕÌÊLi}ÊÀiviÀiVi`°Ê/ÃÊÃÊ>Ê `V>ÌÀÊvÊÜÊÜiÊ-+Ê-iÀÛiÀÊÃÊ>LiÊÌÊ>>}iÊÌÃÊiÀÞ]ÊÃViÊ>Ê}iÀÊviÊi>ÃÊÌ>ÌÊ >Ê«iViÊvÊ`>Ì>ÊÊÌiÊLÕvviÀÊÜÊLiÊÌiÀi]Ê>Û>>Li]ÊÜ>Ì}ÊvÀÊÌiÊiÝÌÊÀiviÀiVi°ÊÜiÛiÀ]Ê >ÊÃÀÌiÀÊviÊi>ÃÊÌ>ÌÊ-+Ê-iÀÛiÀÊÃÊÛ}Ê«>}iÃÊÊ>`ÊÕÌÊvÊÌiÊLÕvviÀʵÕVÞ]Ê«ÃÃLÞÊ ÃÕ}}iÃÌ}Ê>ÊiÀÞÊLÌÌiiV° You will see which counters to use inÊ>>Þâ}Êi>VÊÌÞ«iÊvÊLÌÌiiVÊÃÀÌÞ° Bottleneck Resolution "ViÊÞÕÊ>ÛiÊ`iÌvi`ÊLÌÌiiVÃ]ÊÞÕÊV>ÊÀiÃÛiÊÌiÊÊÌÜÊÜ>ÞÃ\ Ê UÊ 9ÕÊV>ÊVÀi>ÃiÊÀiÃÕÀViÊÌÀÕ}«ÕÌ° Ê UÊ 9ÕÊV>Ê`iVÀi>ÃiÊÌiÊ>ÀÀÛ>ÊÀ>ÌiÊvÊÀiµÕiÃÌÃÊÌÊÌiÊÀiÃÕÀVi° VÀi>Ã}ÊÌiÊÌÀÕ}«ÕÌÊÕÃÕ>ÞÊÀiµÕÀiÃÊiÝÌÀ>ÊÀiÃÕÀViÃÊÃÕVÊ>ÃÊiÀÞ]Ê`ÃÃ]Ê«À- ViÃÃÀÃ]ÊÀÊiÌÜÀÊ>`>«ÌiÀðÊ9ÕÊV>Ê`iVÀi>ÃiÊÌiÊ>ÀÀÛ>ÊÀ>ÌiÊLÞÊLi}ÊÀiÊÃiiVÌÛiÊ>LÕÌÊ ÌiÊÀiµÕiÃÌÃÊÌÊ>ÊÀiÃÕÀVi°ÊÀÊiÝ>«i]ÊÜiÊÞÕÊ>ÛiÊ>Ê`ÃÊÃÕLÃÞÃÌiÊLÌÌiiV]ÊÞÕÊV>Ê iÌiÀÊVÀi>ÃiÊÌiÊÌÀÕ}«ÕÌÊvÊÌiÊ`ÃÊÃÕLÃÞÃÌiÊÀÊ`iVÀi>ÃiÊÌiÊ>ÕÌÊvÊÉ"ÊÀiµÕiÃÌð VÀi>Ã}ÊÌiÊÌÀÕ}«ÕÌÊi>ÃÊ>``}ÊÀiÊ`ÃÃÊÀÊÕ«}À>`}ÊÌÊv>ÃÌiÀÊ`ÃðÊiVÀi>Ã- }ÊÌiÊ>ÀÀÛ>ÊÀ>ÌiÊi>ÃÊ`iÌvÞ}ÊÌiÊV>ÕÃiÊvÊ}ÊÉ"ÊÀiµÕiÃÌÃÊÌÊÌiÊ`ÃÊÃÕLÃÞÃÌiÊ>`Ê >««Þ}ÊÀiÃÕÌÃÊÌÊ`iVÀi>ÃiÊÌiÀÊÕLiÀ°Ê9ÕÊ>ÞÊLiÊ>LiÊÌÊ`iVÀi>ÃiÊÌiÊÉ"ÊÀiµÕiÃÌÃ]Ê vÀÊiÝ>«i]ÊLÞÊ>``}Ê>««À«À>ÌiÊ`iÝiÃÊÊ>ÊÌ>LiÊÌÊÌÊÌiÊ>ÕÌÊvÊ`>Ì>Ê>VViÃÃi`ÊÀÊ by partitioning a tableÊLiÌÜiiÊÕÌ«iÊ`Ãð Memory Bottleneck Analysis Memory can be aÊ«ÀLi>ÌVÊLÌÌiiVÊLiV>ÕÃiÊ>ÊLÌÌiiVÊÊiÀÞÊÜÊ>viÃÌÊÊ ÌiÀÊÀiÃÕÀViÃ]ÊÌ°Ê/ÃÊÃÊ«>ÀÌVÕ>ÀÞÊÌÀÕiÊvÀÊ>ÊÃÞÃÌiÊÀÕ}Ê-+Ê-iÀÛiÀ°Ê7iÊ-+Ê -iÀÛiÀÊÀÕÃÊÕÌÊvÊV>ViÊÀÊiÀÞ®]Ê>Ê«ÀViÃÃÊÜÌÊ-+Ê-iÀÛiÀÊV>i`Êlazy writer®Ê>à ÌÊÜÀÊiÝÌiÃÛiÞÊÌÊ>Ì>ÊiÕ}ÊvÀiiÊÌiÀ>ÊiÀÞÊ«>}iÃÊÜÌÊ-+Ê-iÀÛiÀ°Ê/ÃÊ VÃÕiÃÊiÝÌÀ>Ê*1ÊVÞViÃÊ>`Ê«iÀvÀÃÊ>``Ì>Ê«ÞÃV>Ê`ÃÊÉ"ÊÌÊÜÀÌiÊiÀÞÊ«>}iÃÊ L>VÊÌÊ`ð CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 22 SQLServer Memory Management -+Ê-iÀÛiÀÊ>>}ià memory for databases, including memory requirements for data and µÕiÀÞÊiÝiVÕÌÊ«>Ã]ÊÊ>Ê>À}iÊ«ÊvÊiÀÞÊV>i`ÊÌiÊmemory pool°Ê/iÊiÀÞÊ«Ê consists of a collection of 8KB buffers to manage data pages and plan cache pages, free pages, >`ÊÃÊvÀÌ°Ê/iÊiÀÞÊ«ÊÃÊÕÃÕ>ÞÊÌiÊ>À}iÃÌÊ«ÀÌÊvÊ-+Ê-iÀÛiÀÊiÀÞ°Ê-+Ê -iÀÛiÀÊ>>}iÃÊiÀÞÊLÞÊ}ÀÜ}ÊÀÊÃÀ}ÊÌÃÊiÀÞÊ«ÊÃâiÊ`Þ>V>Þ° You canÊVv}ÕÀiÊ-+Ê-iÀÛiÀÊvÀÊ`Þ>VÊiÀÞÊ>>}iiÌÊÊ-+Ê-iÀÛiÀÊ>>}i- iÌÊ-ÌÕ`Ê---®°ÊÊÌÊÌiÊiÀÞÊv`iÀÊvÊÌiÊ-iÀÛiÀÊ*À«iÀÌiÃÊ`>}ÊLÝ]Ê>ÃÊÃÜÊÊ }ÕÀiÊÓΰ Figure 2-3. SQLServer memory configuration /iÊ`Þ>VÊiÀÞÊÀ>}iÊÃÊVÌÀi`ÊÌÀÕ}ÊÌÜÊVv}ÕÀ>ÌÊ«À«iÀÌiÃ\Ê Iejeiqi$I>% and I]teiqi$I>%. CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 23 ÊUÊIejeiqi$I>%]Ê>ÃÊÜÊ>ÃÊiejoanraniaiknu]ÊÜÀÃÊ>ÃÊ>ÊvÀÊÛ>ÕiÊvÀÊÌiÊiÀÞÊ «°Ê"ViÊÌiÊiÀÞÊ«ÊÀi>ViÃÊÌiÊÃ>iÊÃâiÊ>ÃÊÌiÊvÀÊÛ>Õi]Ê-+Ê-iÀÛiÀÊV>Ê VÌÕiÊVÌÌ}Ê«>}iÃÊÊÌiÊiÀÞÊ«]ÊLÕÌÊÌÊV>ÌÊLiÊÃÀÕÊÌÊiÃÃÊÌ>Ê ÌiÊvÀÊÛ>Õi°Ê ÌiÊÌ>ÌÊ-+Ê-iÀÛiÀÊ`iÃÊÌÊÃÌ>ÀÌÊÜÌÊÌiÊiejoanraniaiknu con- figuration value but commits memory dynamically, as needed. ÊUÊI]teiqi$I>%]Ê>ÃÊÜÊ>à i]toanraniaiknu, serves as a ceiling value to limit the >ÝÕÊ}ÀÜÌÊvÊÌiÊiÀÞÊ«°Ê/iÃiÊVv}ÕÀ>ÌÊÃiÌÌ}ÃÊÌ>iÊivviVÌÊi- diately and do not require a restart. VÀÃvÌÊÀiVi`ÃÊÌ>ÌÊÞÕÊÕÃiÊ`Þ>VÊiÀÞÊVv}ÕÀ>ÌÊvÀÊ-+Ê-iÀÛiÀ]Ê where iejoanraniaiknu will be 0 and i]toanraniaiknuÊÜÊLiÊÌiÊ>ÝÕÊ«ÞÃV>Ê memory of the system, assuming a single instance on the machine. You should not run other iÀÞÌiÃÛiÊ>««V>ÌÃÊÊÌiÊÃ>iÊÃiÀÛiÀÊ>ÃÊ-+Ê-iÀÛiÀ]ÊLÕÌÊvÊÞÕÊÕÃÌ]ÊÊÀiV- mend you first get estimates on how much memory is needed by other applications and then Vv}ÕÀiÊ-+Ê-iÀÛiÀÊÜÌÊ>Êi]toanraniaiknu value set to prevent the other applications vÀÊÃÌ>ÀÛ}Ê-+Ê-iÀÛiÀÊvÊiÀÞ°Ê"Ê>ÊÃÞÃÌiÊÜiÀiÊ-+Ê-iÀÛiÀÊÃÊÀÕ}ÊÊÌÃÊÜ]ÊÊ «ÀiviÀÊÌÊÃiÌÊÌiÊÕÊÃiÀÛiÀÊiÀÞÊiµÕ>ÊÌÊÌiÊ>ÝÊÛ>ÕiÊ>`ÊëÞÊ`ë>ÌVÊÜÌÊ `Þ>VÊ>>}iiÌ°Ê"Ê>ÊÃiÀÛiÀÊÜÌÊÕÌ«iÊ-+Ê-iÀÛiÀÊÃÌ>ViÃ]ÊÞÕ½Êii`ÊÌÊ>`ÕÃÌÊ ÌiÃiÊiÀÞÊÃiÌÌ}ÃÊÌÊiÃÕÀiÊi>VÊÃÌ>ViÊ>ÃÊ>Ê>`iµÕ>ÌiÊÛ>Õi°ÊÕÃÌÊ>iÊÃÕÀiÊÞÕ½ÛiÊ ivÌÊiÕ}ÊiÀÞÊvÀÊÌiÊ«iÀ>Ì}ÊÃÞÃÌiÊ>`ÊiÝÌiÀ>Ê«ÀViÃÃiÃ]Ê>ÃÊÜiÊ>ÃÊLÕvviÀ pool memory (which used to be called IaiPkHa]ra®° iÀÞÊÜÌÊ-+Ê-iÀÛiÀÊV>ÊLiÊÀÕ}ÞÊ`Û`i`ÊÌÊLÕvviÀÊ«ÊiÀÞ]ÊÜVÊÀi«- ÀiÃiÌÃÊ`>Ì>Ê«>}iÃÊ>`ÊvÀiiÊ«>}iÃ]Ê>`ÊLÕvviÀÊiÀÞ]ÊÜVÊVÃÃÌÃÊvÊÌÀi>`Ã]ÊÃ]Ê i`ÊÃiÀÛiÀÃ]Ê>`ÊÌiÀðÊÃÌÊvÊÌiÊiÀÞÊÕÃi`ÊLÞÊ-+Ê-iÀÛiÀÊ}iÃÊÌÊÌiÊLÕvviÀÊ«° N Note SQLServer does consume more memory than simply that specified by the i]t[oanran[iaiknu setting. You can also manage the configuration values for iejoanraniaiknu and i]toanran iaiknu by using the ol[_kjbecqnaÊÃÞÃÌiÊÃÌÀi`Ê«ÀVi`ÕÀi°Ê/ÊÃiiÊÌiÊVv}ÕÀ>ÌÊÛ>ÕiÃÊvÀÊ ÌiÃiÊ«>À>iÌiÀÃ]ÊiÝiVÕÌiÊÌiÊol[_kjbecqna stored procedure as follows: ata_ol[_kjbecqna#iejoanraniaiknu$I>%# ata_ol[_kjbecqna#i]toanraniaiknu$I>%# }ÕÀiÊÓ{ÊÃÜÃÊÌiÊÀiÃÕÌÊvÊÀÕ}ÊÌiÃiÊV>`ð Figure 2-4. SQLServer memory configuration properties CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 24 ÌiÊÌ>ÌÊÌiÊ`iv>ÕÌÊÛ>ÕiÊvÀÊÌiÊiejoanraniaiknu setting is 0MB, and for the i]t oanraniaiknuÊÃiÌÌ}ÊÌÊÃÊÓ£{Ç{nÎÈ{Ç°ÊÃ]Êi]toanraniaiknu cannot be set to less Ì>Ê{° You can also modify these configuration values using the ol[_kjbecqna stored procedure. ÀÊiÝ>«i]ÊÌÊÃiÌÊi]toanraniaiknu to 200MB and iejoanraniaiknuÊÌÊ£ää]ÊiÝiVÕÌiÊ the following set of statements (oap[iaiknu*omhÊÊÌiÊ`Ü>`®\ QOAi]opan ATA?ol[_kjbecqna#odks]`r]j_a`klpekj#(#-# NA?KJBECQNA ata_ol[_kjbecqna#iejoanraniaiknu$I>%#(-,, ata_ol[_kjbecqna#i]toanraniaiknu$I>%#(.,, NA?KJBECQNASEPDKRANNE@A /iÊiejoanraniaiknu and i]toanraniaiknu configurations are classified as advanced options. By default, the ol[_kjbecqna stored procedure does not affect/display the advanced options. Setting odks]`r]j_a`klpekj to - as shown previously enables the ol[_kjbecqna stored procedure to affect/display the advanced options. /iÊNA?KJBECQNA statement updates the memory configuration values set by ol[_kjbecqna. Since ad hoc updates to the system catalog containing the memory configuration values are not recommended, the KRANNE@A flag is used with the NA?KJBECQNA statement to force the memory configuration. If you do the memory configuration through Management Studio, >>}iiÌÊ-ÌÕ`Ê>ÕÌ>ÌV>ÞÊiÝiVÕÌiÃÊÌiÊNA?KJBECQNASEPDKRANNE@A statement after the configuration setting. ÊÃiÊÀ>ÀiÊVÀVÕÃÌ>ViÃ]ÊÞÕÊ>ÞÊii`ÊÌÊ>ÜÊvÀÊ-+Ê-iÀÛiÀÊÃ>À}Ê>ÊÃÞÃÌi½ÃÊ iÀÞ°Ê/Êi>LÀ>Ìi]ÊVÃ`iÀÊ>ÊV«ÕÌiÀÊÜÌÊ-+Ê-iÀÛiÀÊ>`ÊÝV>}iÊ-iÀÛiÀÊÀÕ}Ê ÊÌ°ÊÌÊÃiÀÛiÀÃÊ>ÀiÊi>ÛÞÊÕÃiÀÃÊvÊiÀÞÊ>`ÊÌÕÃÊii«Ê«ÕÃ}Êi>VÊÌiÀÊvÀÊiÀÞ°Ê /iÊ`Þ>ViÀÞÊLi>ÛÀÊvÊ-+Ê-iÀÛiÀÊ>ÜÃÊÌÊÌÊÀii>ÃiÊiÀÞÊÌÊÝV>}iÊ-iÀÛiÀÊ >ÌÊiÊÃÌ>ViÊ>`Ê}À>LÊÌÊL>VÊ>ÃÊÝV>}iÊ-iÀÛiÀÊÀii>ÃiÃÊÌ°Ê9ÕÊV>Ê>Û`ÊÌÃÊ`Þ>V iÀÞÊ>>}iiÌÊÛiÀi>`ÊLÞÊVv}ÕÀ}Ê-+Ê-iÀÛiÀÊvÀÊ>ÊvÝi`ÊiÀÞÊÃâi°ÊÜiÛiÀ]Ê «i>ÃiÊii«ÊÊ`ÊÌ>ÌÊÃViÊ-+Ê-iÀÛiÀÊÃÊ>ÊiÝÌÀiiÞÊÀiÃÕÀViÌiÃÛiÊ«ÀViÃÃ]ÊÌÊÃÊ }ÞÊÀiVi`i`ÊÌ>ÌÊÞÕÊ>ÛiÊ>Ê`i`V>Ìi`Ê-+Ê-iÀÛiÀÊ«À`ÕVÌÊ>Vi° ÜÊÌ>ÌÊÞÕÊÕ`iÀÃÌ>`Ê-+Ê-iÀÛiÀÊiÀÞÊ>>}iiÌ]Êi̽ÃÊVÃ`iÀÊÌiÊperfor- >ViÊVÕÌiÀÃÊÞÕÊV>ÊÕÃiÊÌÊ>>ÞâiÊÃÌÀiÃÃÊÊiÀÞ]Ê>ÃÊÃÜÊÊ/>LiÊÓ£° Table 2-1. Performance Monitor Counters to Analyze Memory Pressure Object(Instance[,InstanceN]) Counter Description Values Iaiknu =r]eh]^ha>upao Àii physical memory System dependent L]cao+oa_ Rate of hard page faults Average Û>ÕiÊÊxä L]caB]qhpo+oa_ Rate of total page faults «>ÀiÊÜÌÊ its baseline value for trend analysis L]caoEjlqp+oa_ Rate of input page faults L]caoKqplqp+oa_ Rate of output page faults CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 25 Object(Instance[,InstanceN]) Counter Description Values OMHOanran6>qbbanI]j]can >qbban_]_da depn]pek Percentage of requests served out of buffer cache Average value q 90% L]caHeba Atla_p]j_u /i page spends in buffer Average Û>ÕiÊÊÎää ?da_glkejp L]cao+oa_ PagesÊÜÀÌÌiÊÌÊ`ÃÊLÞÊ ViV«Ì Average Û>ÕiÊÊÎä H]vusnepao+oa_ ÀÌÞ aged pages flushed from buffer Average value < 20 OMHOanran6IaiknuI]j]can IaiknuCn]jpo Laj`ejc ÕLiÀ of processes waiting for memory grant Average value = 0 P]ncapOanran Iaiknu$G>% >ÝÕ physical iÀÞÊ-+Ê-iÀÛiÀÊV>Ê VÃÕiÊÊÌiÊLÝ ÃiÊÌÊÃâiÊ of physical memory Pkp]hOanran Iaiknu$G>% Physical memory cur- ÀiÌÞÊ>ÃÃ}i`ÊÌÊ-+Ê Server ÃiÊÌÊ P]ncapOanran Iaiknu$G>% Lnk_aoo Lner]pa>upao -âi]Ê bytes, of memory that this process has allocated that cannot be shared with other processes ½ÊÜÊÜ>ÊÞÕÊÌÀÕ}ÊÌiÃiÊVÕÌiÀÃÊÌÊ}iÌÊ>ÊLiÌÌiÀÊ`i> of what you can use them for. Available Bytes /iÊ=r]eh]^ha>upaoÊVÕÌiÀÊÀi«ÀiÃiÌÃÊvÀiiÊ«ÞÃV>ÊiÀÞÊÊÌiÊÃÞÃÌi°ÊÀÊ}`Ê«iÀ- vÀ>Vi]ÊÌÃÊVÕÌiÀÊÛ>ÕiÊÃÕ`ÊÌÊLiÊÌÊÜ°ÊvÊ-+Ê-iÀÛiÀÊÃÊVv}ÕÀi`ÊvÀÊ`Þ>VÊ memory usage, then this value will be controlled by calls to a Windows API that determines ÜiÊ>`ÊÜÊÕVÊiÀÞÊÌÊÀii>Ãi°ÊÝÌi`i`Ê«iÀ`ÃÊvÊÌiÊÜÌÊÌÃÊÛ>ÕiÊÛiÀÞÊÜÊ>`Ê -+Ê-iÀÛiÀÊiÀÞÊÌÊV>}}Ê`V>ÌiÃÊÌ>ÌÊÌiÊÃiÀÛiÀÊÃÊÕ`iÀÊÃiÛiÀiÊiÀÞÊÃÌÀiÃð Pages/sec and Page Faults/sec Counters /ÊÕ`iÀÃÌ>`ÊÌiÊ«ÀÌ>ViÊvÊÌiÊL]cao+oa_ and L]caB]qhpo+oa_ counters, you first need to learn about page faults. A page fault occurs when a process requires code or data that is not in its working setÊÌÃÊë>ViÊÊ«ÞÃV>ÊiÀÞ®°ÊÌÊ>ÞÊi>`ÊÌÊ>ÊÃvÌÊ«>}iÊv>ÕÌÊÀÊ>Ê>À`Ê«>}iÊ fault. If the faulted page is found elsewhere in physical memory, then it is called a soft page fault. A hard page faultÊVVÕÀÃÊÜiÊ>Ê«ÀViÃÃÊÀiµÕÀiÃÊV`iÊÀÊ`>Ì>ÊÌ>ÌÊÃÊÌÊÊÌÃÊÜÀ}Ê ÃiÌÊÀÊiÃiÜiÀiÊÊ«ÞÃV>ÊiÀÞÊ>`ÊÕÃÌÊLiÊÀiÌÀiÛi`ÊvÀÊ`ð /iÊëii`ÊvÊ>Ê`ÃÊ>VViÃÃÊÃÊÊÌiÊÀ`iÀÊvÊÃiV`Ã]ÊÜiÀi>ÃÊ>ÊiÀÞÊ>VViÃÃÊÃÊÊ ÌiÊÀ`iÀÊvÊ>ÃiV`ðÊ/ÃÊÕ}iÊ`vviÀiViÊÊÌiÊëii`ÊLiÌÜiiÊ>Ê`ÃÊ>VViÃÃÊ>`Ê>Êi- ÀÞÊ>VViÃÃÊ>iÃÊÌiÊivviVÌÊvÊ>À`Ê«>}iÊv>ÕÌÃÊÃ}vV>ÌÊV«>Ài`ÊÌÊÌ>ÌÊvÊÃvÌÊ«>}iÊv>ÕÌð /iÊL]cao+oa_ÊVÕÌiÀÊÀi«ÀiÃiÌÃÊÌiÊÕLiÀÊvÊ«>}iÃÊÀi>`ÊvÀÊÀÊÜÀÌÌiÊÌÊ`ÃÊ«iÀÊ ÃiV`ÊÌÊÀiÃÛiÊ>À`Ê«>}iÊv>ÕÌðÊ/iÊL]caB]qhpo+oa_ performance counter indicates the total page faults per second—soft page faults plus hard page faults—handled by the system. CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 26 >À`Ê«>}iÊv>ÕÌÃ]Ê`V>Ìi`ÊLÞÊL]cao+oa_, should not be consistently high. If this counter ÃÊVÃÃÌiÌÞÊÛiÀÞÊ}]ÊÌiÊ-+Ê-iÀÛiÀÊÃÊ«ÀL>LÞÊÃÌ>ÀÛ}ÊÌiÀÊ>««V>ÌðÊ/iÀiÊ>ÀiÊÊ hard and fast numbers for what indicates a problem, because these numbers will vary widely LiÌÜiiÊÃÞÃÌiÃÊL>Ãi`ÊÊÌiÊ>ÕÌÊ>`ÊÌÞ«iÊvÊiÀÞÊ>ÃÊÜiÊ>ÃÊÌiÊëii`ÊvÊ`ÃÊ>VViÃÃÊ on the system. If the L]cao+oa_ counter isÊÛiÀÞÊ}]ÊÌiÊÞÕÊV>ÊLÀi>ÊÌÊÕ«ÊÌÊL]caoEjlqp+oa_ and L]caoKqplqp+oa_: ÊUÊL]caoEjlqp+oa_: An application will wait only on an input page, not on an output page. ÊUÊL]caoKqplqp+oa_: Page output will stress the system, but an application usually does not see this stress. Pages output are usually represented by the application’s dirty «>}iÃÊÌ>ÌÊii`ÊÌÊLiÊL>Vi`ÊÕÌÊÌÊÌiÊ`ðÊL]caoKqplqp+oa_ is an issue only when `ÃÊ>`ÊLiViÊ>ÊÃÃÕi° Ã]ÊViVÊLnk_aoo6L]caB]qhpo+oa_ÊÌÊv`ÊÕÌÊÜVÊ«ÀViÃÃÊÃÊV>ÕÃ}ÊiÝViÃÃÛiÊ paging in case of high L]cao+oa_°Ê/iÊLnk_aoo object is the system component that provides performance data for the processes running on the system, which are individually represented by their corresponding instance name. ÀÊiÝ>«i]ÊÌiÊ-+Ê-iÀÛiÀÊ«ÀViÃÃÊÃÊÀi«ÀiÃiÌi`ÊLÞÊÌiÊomhoanrn instance of the Lnk_aooÊLiVÌ°Ê}ÊÕLiÀÃÊvÀÊÌÃÊVÕÌiÀÊÕÃÕ>ÞÊ`ÊÌÊi>ÊÕVÊÕiÃÃÊL]cao+oa_ is high. L]caB]qhpo+oa_ can range all over the spectrum with normal application behavior, with Û>ÕiÃÊvÀÊäÊÌÊ£]äääÊ«iÀÊÃiV`ÊLi}Ê>VVi«Ì>Li°Ê/ÃÊiÌÀiÊ`>Ì>ÊÃiÌÊi>ÃÊ>ÊL>ÃiiÊÃÊ iÃÃiÌ>ÊÌÊ`iÌiÀiÊÌiÊiÝ«iVÌi`ÊÀ>ÊLi>ÛÀ° Buffer Cache Hit Ratio /iÊbuffer cache is the pool of buffer pages into which data pages are read, and it is often the L}}iÃÌÊ«>ÀÌÊvÊÌiÊ-+Ê-iÀÛiÀÊiÀÞÊ«°Ê/ÃÊVÕÌiÀÊÛ>ÕiÊÃÕ`ÊLiÊ>ÃÊ}Ê>ÃÊ«ÃÃLi]Ê iëiV>ÞÊvÀÊ"/*ÊÃÞÃÌiÃÊÌ>ÌÊÃÕ`Ê>ÛiÊv>ÀÞÊÀi}iÌi`Ê`>Ì>Ê>VViÃÃ]ÊÕiÊ>ÊÜ>Ài- ÕÃiÊÀÊÀi«ÀÌ}ÊÃÞÃÌi°ÊÌÊÃÊiÝÌÀiiÞÊVÊÌÊv`ÊÌÃÊVÕÌiÀÊÛ>ÕiÊ>ÃÊÊ«iÀViÌÊ or more for most production servers. A low >qbban_]_dadepn]pek value indicates that few requests could be served out of the buffer cache, with the rest of the requests being served vÀÊ`ð 7iÊÌÃÊ>««iÃ]ÊiÌiÀÊ-+Ê-iÀÛiÀÊÃÊÃÌÊÜ>À}ÊÕ«ÊÀÊÌiÊiÀÞÊÀiµÕÀiiÌÊvÊ ÌiÊLÕvviÀÊV>ViÊÃÊÀiÊÌ>ÊÌiÊ>ÝÕÊiÀÞÊ>Û>>LiÊvÀÊÌÃÊ}ÀÜÌ°ÊvÊÌÃÊÃÊVÃÃ- tently low, you should consider getting more memory for the system. Page Life Expectancy L]caHebaAtla_p]j_u indicates how long a page will stay in the buffer pool without being ref- iÀiVi`°ÊiiÀ>Þ]Ê>ÊÜÊÕLiÀÊvÀÊÌÃÊVÕÌiÀÊi>ÃÊÌ>ÌÊ«>}iÃÊ>ÀiÊLi}ÊÀiÛi`ÊvÀÊ the buffer, lowering the efficiency of the cache and indicating the possibility of memory pres- ÃÕÀi°Ê"ÊÀi«ÀÌ}ÊÃÞÃÌiÃ]Ê>ÃÊ««Ãi`ÊÌÊ"/*ÊÃÞÃÌiÃ]ÊÌÃÊÕLiÀÊ>ÞÊÀi>Ê>ÌÊ>ÊÜiÀÊ Û>ÕiÊÃViÊÀiÊ`>Ì>ÊÃÊ>VViÃÃi`ÊvÀÊÀi«ÀÌ}ÊÃÞÃÌiðÊÊÀi>Ã>LiÊÛ>ÕiÊÌÊiÝ«iVÌÊÌÊÃiiÊ iÀiÊÃÊÎääÊÃiV`ÃÊÀÊÀi° CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 27 Checkpoint Pages/sec /iÊ?da_glkejpL]cao+oa_ÊVÕÌiÀÊÀi«ÀiÃiÌÃÊÌiÊÕLiÀÊvÊ«>}iÃÊÌ>ÌÊ>ÀiÊÛi`ÊÌÊ`ÃÊLÞÊ >ÊViV«ÌÊ«iÀ>Ì°Ê/iÃiÊÕLiÀÃÊÃÕ`ÊLiÊÀi>ÌÛiÞÊÜ]ÊvÀÊiÝ>«i]ÊiÃÃÊÌ>ÊÎäÊ«iÀÊ ÃiV`ÊvÀÊÃÌÊÃÞÃÌiðÊÊ}iÀÊÕLiÀÊi>ÃÊÀiÊ«>}iÃÊ>ÀiÊLi}Ê>Ài`Ê>ÃÊ`ÀÌÞÊÊÌiÊ V>Vi°ÊÊ`ÀÌÞÊ«>}iÊÃÊiÊÌ>ÌÊÃÊ`vi`ÊÜiÊÊÌiÊLÕvviÀ°Ê7iÊ̽ÃÊ`vi`]Ê̽ÃÊ>Ài`Ê >ÃÊ`ÀÌÞÊ>`ÊÜÊ}iÌÊÜÀÌÌiÊL>VÊÌÊÌiÊ`ÃÊ`ÕÀ}ÊÌiÊiÝÌÊViV«Ì°Ê}iÀÊÛ>ÕiÃÊÊÌÃÊ counter indicate a larger number of writes occurring within the system, possibly indicative of É"Ê«ÀLið Lazy writes/sec /iÊH]vusnepao+oa_ counter records the number of buffers written each second by the buffer >>}iÀ½ÃÊ>âÞÊÜÀÌiÊ«ÀViÃðÊ/ÃÊ«ÀViÃÃÊÃÊÜiÀiÊÌiÊ`ÀÌÞ]Ê>}i`ÊLÕvviÀÃÊ>ÀiÊÀiÛi`ÊvÀÊ the buffer by a system process that frees the memory up for other uses. A dirty, aged buffer ÃÊiÊÌ>ÌÊ>ÃÊV>}iÃÊ>`Êii`ÃÊÌÊLiÊÜÀÌÌiÊÌÊÌiÊ`ðÊ}iÀÊÛ>ÕiÃÊÊÌÃÊVÕÌiÀÊ «ÃÃLÞÊ`V>ÌiÊÉ"ÊÃÃÕiÃÊÀÊiÛiÊiÀÞÊ«ÀLiðÊ/iÊH]vusnepao+oa_ values should consistently be less than 20 for the average system. Memory Grants Pending /iÊIaiknuCn]jpoLaj`ejc counter represents the number of processes pending for a mem- ÀÞÊ}À>ÌÊÜÌÊ-+Ê-iÀÛiÀÊiÀÞ°ÊvÊÌÃÊVÕÌiÀÊÛ>ÕiÊÃÊ}]ÊÌiÊ-+Ê-iÀÛiÀÊÃÊÃÀÌÊvÊ iÀÞ°Ê1`iÀÊÀ>ÊV`ÌÃ]ÊÌÃÊVÕÌiÀÊÛ>ÕiÊÃÕ`ÊVÃÃÌiÌÞÊLiÊäÊvÀÊÃÌÊ«À- duction servers. Another way to retrieve this value, on the fly, is to run queries against theÊ6Êouo*`i[ ata_[mqanu[iaiknu[cn]jpo. A jqhh value in the column cn]jp[peia indicates that the process ÃÊÃÌÊÜ>Ì}ÊvÀÊ>ÊiÀÞÊ}À>Ì°Ê/ÃÊÃÊiÊiÌ`ÊÞÕÊV>ÊÕÃiÊÌÊÌÀÕLiÃÌʵÕiÀÞÊ ÌiÕÌÃÊLÞÊ`iÌvÞ}ÊÌ>ÌÊ>ʵÕiÀÞÊÀʵÕiÀiîÊÃÊÜ>Ì}ÊÊiÀÞÊÊÀ`iÀÊÌÊiÝiVÕÌi° Target Server Memory (KB) and Total Server Memory (KB) P]ncapOanranIaiknu$G>% indicatesÊÌiÊÌÌ>Ê>ÕÌÊvÊ`Þ>VÊiÀÞÊ-+Ê-iÀÛiÀÊÃÊ willing to consume. Pkp]hOanranIaiknu$G>% indicates the amount of memory currently >ÃÃ}i`ÊÌÊ-+Ê-iÀÛiÀ°Ê/iÊPkp]hOanranIaiknu$G>% counter value can be very high if the ÃÞÃÌiÊÃÊ`i`V>Ìi`ÊÌÊ-+Ê-iÀÛiÀ°ÊvÊPkp]hOanranIaiknu$G>% is much less than P]ncap OanranIaiknu$G>%]ÊÌiÊiÌiÀÊÌiÊ-+Ê-iÀÛiÀÊiÀÞÊÀiµÕÀiiÌÊÃÊÜ]ÊÌiÊi]toanran iaiknuÊVv}ÕÀ>ÌÊ«>À>iÌiÀÊvÊ-+Ê-iÀÛiÀÊÃÊÃiÌÊ>ÌÊÌÊÜÊ>ÊÛ>Õi]ÊÀÊÌiÊÃÞÃÌiÊÃÊÊ warm-up phase°Ê/iÊÜ>ÀÕ«Ê«>ÃiÊÃÊÌiÊ«iÀ`Ê>vÌiÀÊ-+Ê-iÀÛiÀÊÃÊÃÌ>ÀÌi`ÊÜiÊÌiÊ`>Ì>- L>ÃiÊÃiÀÛiÀÊÃÊÊÌiÊ«ÀViÃÃÊvÊiÝ«>`}ÊÌÃÊiÀÞÊ>V>ÌÊ`Þ>V>ÞÊ>ÃÊÀiÊ`>Ì>Ê sets are accessed, bringing more data pages into memory. 9ÕÊV>ÊVvÀÊ>ÊÜÊiÀÞÊÀiµÕÀiiÌÊvÀÊ-+Ê-iÀÛiÀÊLÞÊÌiÊ«ÀiÃiViÊvÊ>Ê>À}iÊ ÕLiÀÊvÊvÀiiÊ«>}iÃ]ÊÕÃÕ>ÞÊx]äääÊÀÊÀi° Memory Bottleneck Resolutions When there is high stress on memory, indicated by a large number of hard page faults, you can ÀiÃÛiÊiÀÞÊLÌÌiiVÊÕÃ}ÊÌiÊvÜV>ÀÌÊÃÜÊÊ}ÕÀiÊÓx° CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 28 Figure 2-5. Memory bottleneck resolution chart ÊviÜÊvÊÌiÊVÊÀiÃÕÌÃÊvÀÊiÀÞÊLÌÌiiVÃÊ>ÀiÊ>ÃÊvÜÃ\ Ê UÊ "«Ìâ}Ê>««V>ÌÊÜÀ>` Ê UÊ V>Ì}ÊÀiÊiÀÞÊÌÊ-+Ê-iÀÛiÀ Ê UÊ VÀi>Ã}ÊÃÞÃÌiÊiÀÞ Ê UÊ >}}ÊvÀÊ>ÊÎÓLÌÊÌÊ>ÊÈ{LÌÊ«ÀViÃÃÀ Ê UÊ >L}ÊÎÊvÊ«ÀViÃÃÊë>Vi Ê UÊ 1Ã}ÊiÀÞÊLiÞ`Ê{ÊÜÌÊÎÓLÌÊ-+Ê-iÀÛiÀ i̽ÃÊÌ>iÊ>ÊÊ>ÌÊi>VÊvÊÌiÃiÊÊÌÕÀ° . canÊVv}ÕÀi -+ Ê-iÀÛiÀÊvÀÊ`Þ>VÊiÀÞÊ>>}iiÌÊ -+ Ê-iÀÛiÀÊ>>}i- iÌ - Õ`Ê -- - °ÊÊÌÊÌiÊiÀÞÊv`iÀÊvÊÌiÊ-iÀÛiÀÊ*À«iÀÌiÃÊ`>}ÊLÝ]Ê>ÃÊÃÜÊÊ }ÕÀiÊÓΰ Figure 2-3 . SQL. ^aopln]_pe_a+lanbkni]j_a[pqjejc[s]epo[mqaqao*iolt®°ÊÌÕ}ÊÌÊÜ>ÃÊÜÀÌÌiÊvÀ -+ Ê -iÀÛiÀÊÓääx]ÊÌÊÃÊiµÕ>ÞÊ>««V>LiÊÌ -+ Ê-iÀÛiÀÊÓään° Hardware Resource Bottlenecks /Þ«V>Þ] -+ Ê-iÀÛiÀÊ`>Ì>L>Ãi performance