Tài liệu Apress - SQL Server 2008 Query Performance Tuning Distilled (2009)02 ppt

10 533 0
Tài liệu Apress - SQL Server 2008 Query Performance Tuning Distilled (2009)02 ppt

Đang tải... (xem toàn văn)

Thông tin tài liệu

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Ê>>}iiÌÊÛiÜÃÊ­6îÊ>`Ê`Þ>VÊ>>}iiÌÊvÕVÌÃÊ­î°Ê/iÃiÊ>ÀiÊ iÝÌÀiiÞÊÕÃivÕÊiV>ÃÃÊvÀÊV>«ÌÕÀ}Ê>ÊÃ>«ÃÌÊvÊÌiÊVÕÀÀiÌÊ«iÀvÀ>ViÊvÊÞÕÀÊ ÃÞÃÌi°Ê½ÊÌÀ`ÕViÊÃiÛiÀ>ÊvÊÌiÃiÊÌÀÕ}ÕÌÊÌiÊL]ÊLÕÌÊ½ÊvVÕÃÊÊ>Ê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 BNKIouo*`i[ko[lanbkni]j_a[_kqjpano SDANAK>FA?P[J=IA9#IOOMH CB.,,46Cajan]hOp]peope_o# =J@_kqjpan[j]ia9#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Ã]ÊViVÌ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ÌÌiiVðÊ9ÕÊV>ÊÃÀÌÊÌiÊ`>Ì>ÊÊÛ>ÀÕÃÊÜ>ÞÃ]ÊLÕÌÊvÀÊÌiÊvÀÃÌÊiÝ>«i]Ê½ÊÊ>ÌÊ the waits that have the longest current count using this simple query: OAHA?PPKL$-,% & BNKIouo*`i[ko[s]ep[op]po KN@AN>Us]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}ÊÌÀÕLiÃÌ}°Ê"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ÀiV}ÊÉ"Ê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>LiÊÌÊ-+Ê-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ÌÌiiV°Ê/Ê>``ÀiÃÃÊÌiÊ ÛiÀ>Ê«iÀvÀ>ViÊvÊ>ÊÃÞÃÌi]ÊÞÕÊii`ÊÌÊ`iÌvÞÊÌiÃiÊLÌÌiiVÃ]ÊLiV>ÕÃiÊÌiÞÊvÀÊÌiÊ limit on overall system performance. Identifying Bottlenecks /iÀiÊÃÊÕÃÕ>ÞÊ>ÊÀi>ÌÃ«ÊLiÌÜiiÊÀiÃÕÀViÊLÌÌiiVðÊÀÊiÝ>«i]Ê>Ê«ÀViÃÃÀÊ LÌÌiiVÊ>ÞÊLiÊ>ÊÃÞ«ÌÊvÊiÝViÃÃÛiÊ«>}}Ê­iÀÞÊLÌÌiiV®ÊÀÊ>ÊÃÜÊ`ÃÊ­`ÃÊ LÌÌiiV®°ÊvÊ>ÊÃÞÃÌiÊÃÊÜÊÊiÀÞ]ÊV>ÕÃ}ÊiÝViÃÃÛiÊ«>}}]Ê>`Ê>ÃÊ>ÊÃÜÊ`Ã]ÊÌiÊ iÊvÊÌiÊi`ÊÀiÃÕÌÃÊÜÊLiÊ>Ê«ÀViÃÃÀÊÜÌÊ}ÊÕÌâ>ÌÊÃViÊÌiÊ«ÀViÃÃÀÊ>ÃÊÌÊëi`Ê >ÊÃ}vV>ÌÊÕLiÀÊvÊ*1ÊVÞViÃÊÌÊÃÜ>«Ê«>}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ÌÌiiVÊÃÊÌÊ`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ÃiViÊvÊ>ʵÕiÕiÊ`iÃÊÌÊi>ÊÌ>ÌÊÌiÀiÊÃÊÊLÌÌiiV°Ê7iÊ µÕiÕiÊi}ÌÃÊÃÌ>ÀÌÊ}ÀÜ}]ÊÜiÛiÀ]ÊÌÊÃÊ>ÊÃÕÀiÊÃ}ÊÌ>ÌÊÌiÊÃÞÃÌiÊÃÊÌÊ>LiÊÌÊii«ÊÕ«Ê with the demand. ÌÊ>ÊÀiÃÕÀViÃÊ>ÛiÊëiVvVÊ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ÊëiVvVÊ VÕÌiÀÃÊÌÊ`V>ÌiÊÌiÊiÛiÊvʵÕiÕ}°ÊÀÊiÝ>«i]ÊÌi counter L]caHebaAtla_p]j_u `V>ÌiÃÊÜÊ}Ê>Ê«>}iÊÜÊÃÌ>ÞÊÊÌiÊLÕvviÀÊ«ÊÜÌÕÌÊLi}ÊÀiviÀiVi`°Ê/ÃÊÃÊ>Ê `V>ÌÀÊvÊÜÊÜiÊ-+Ê-iÀÛiÀÊÃÊ>LiÊÌÊ>>}iÊÌÃÊiÀÞ]ÊÃViÊ>Ê}iÀÊviÊi>ÃÊÌ>ÌÊ >Ê«iViÊvÊ`>Ì>ÊÊÌiÊLÕvviÀÊÜÊLiÊÌiÀi]Ê>Û>>Li]ÊÜ>Ì}ÊvÀÊÌiÊiÝÌÊÀiviÀiVi°ÊÜiÛiÀ]Ê >ÊÃÀÌiÀÊviÊi>ÃÊÌ>ÌÊ-+Ê-iÀÛiÀÊÃÊÛ}Ê«>}iÃÊÊ>`ÊÕÌÊvÊÌiÊLÕvviÀʵÕVÞ]Ê«ÃÃLÞÊ ÃÕ}}iÃÌ}Ê>ÊiÀÞÊLÌÌiiV° You will see which counters to use inÊ>>Þâ}Êi>VÊÌÞ«iÊvÊLÌÌiiVÊÃÀÌÞ° Bottleneck Resolution "ViÊÞÕÊ>ÛiÊ`iÌvi`ÊLÌÌiiVÃ]ÊÞÕÊ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ÊÃiiVÌÛiÊ>LÕÌÊ ÌiÊÀiµÕiÃÌÃÊÌÊ>ÊÀiÃÕÀVi°ÊÀÊiÝ>«i]ÊÜiÊÞÕÊ>ÛiÊ>Ê`ÃÊÃÕLÃÞÃÌiÊLÌÌiiV]ÊÞÕÊ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Ê>LiÊÌÊ`iVÀi>ÃiÊÌiÊÉ"ÊÀiµÕiÃÌÃ]Ê vÀÊiÝ>«i]ÊLÞÊ>``}Ê>««À«À>ÌiÊ`iÝiÃÊÊ>ÊÌ>LiÊÌÊÌÊÌiÊ>ÕÌÊvÊ`>Ì>Ê>VViÃÃi`ÊÀÊ by partitioning a tableÊLiÌÜiiÊÕÌ«iÊ`Ãð Memory Bottleneck Analysis Memory can be aÊ«ÀLi>ÌVÊLÌÌiiVÊLiV>ÕÃiÊ>ÊLÌÌiiVÊÊiÀÞÊÜÊ>viÃÌÊÊ ÌiÀÊÀiÃÕÀViÃ]ÊÌ°Ê/ÃÊÃÊ«>ÀÌVÕ>ÀÞÊÌÀÕiÊvÀÊ>ÊÃÞÃÌiÊÀÕ}Ê-+Ê-iÀÛiÀ°Ê7iÊ-+Ê -iÀÛiÀÊÀÕÃÊÕÌÊvÊV>ViÊ­ÀÊiÀÞ®]Ê>Ê«ÀViÃÃÊÜÌÊ-+Ê-iÀÛiÀÊ­V>i`Êlazy writer®Ê>à ÌÊÜÀÊiÝÌiÃÛiÞÊÌÊ>Ì>ÊiÕ}ÊvÀiiÊÌiÀ>ÊiÀÞÊ«>}iÃÊÜÌÊ-+Ê-iÀÛiÀ°Ê/ÃÊ VÃÕiÃÊiÝÌÀ>Ê*1ÊVÞViÃÊ>`Ê«iÀvÀÃÊ>``Ì>Ê«ÞÃV>Ê`ÃÊÉ"ÊÌÊÜÀÌiÊiÀÞÊ«>}iÃÊ L>VÊÌÊ`Ã° CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 22 SQL Server 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ÊVv}ÕÀiÊ-+Ê-iÀÛiÀÊvÀÊ`Þ>VÊiÀÞÊ>>}iiÌÊÊ-+Ê-iÀÛiÀÊ>>}i- iÌÊ-ÌÕ`Ê­---®°ÊÊÌÊÌiÊiÀÞÊv`iÀÊvÊÌiÊ-iÀÛiÀÊ*À«iÀÌiÃÊ`>}ÊLÝ]Ê>ÃÊÃÜÊÊ }ÕÀiÊÓΰ Figure 2-3. SQL Server memory configuration /iÊ`Þ>VÊiÀÞÊÀ>}iÊÃÊVÌÀi`ÊÌÀÕ}ÊÌÜÊVv}ÕÀ>ÌÊ«À«iÀÌiÃ\Ê Iejeiqi$I>% and I]teiqi$I>%. CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 23 ÊUÊIejeiqi$I>%]Ê>ÃÊÜÊ>ÃÊiejoanraniaiknu]ÊÜÀÃÊ>ÃÊ>ÊvÀÊÛ>ÕiÊvÀÊÌiÊiÀÞÊ «°Ê"ViÊÌiÊiÀÞÊ«ÊÀi>ViÃÊÌ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Êiejoanraniaiknu con- figuration value but commits memory dynamically, as needed. ÊUÊI]teiqi$I>%]Ê>ÃÊÜÊ>à i]toanraniaiknu, serves as a ceiling value to limit the >ÝÕÊ}ÀÜÌÊvÊÌiÊiÀÞÊ«°Ê/iÃiÊVv}ÕÀ>ÌÊÃiÌÌ}ÃÊÌ>iÊivviVÌÊi- diately and do not require a restart. VÀÃvÌÊÀiVi`ÃÊÌ>ÌÊÞÕÊÕÃiÊ`Þ>VÊiÀÞÊVv}ÕÀ>ÌÊvÀÊ-+Ê-iÀÛiÀ]Ê where iejoanraniaiknu will be 0 and i]toanraniaiknuÊÜÊ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 Vv}ÕÀiÊ-+Ê-iÀÛiÀÊÜÌÊ>Êi]toanraniaiknu 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Ê>>}iiÌ°Ê"Ê>ÊÃ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 SQL Server does consume more memory than simply that specified by the i]t[oanran[iaiknu setting. You can also manage the configuration values for iejoanraniaiknu and i]toanran iaiknu by using the ol[_kjbecqnaÊÃÞÃÌiÊÃÌÀi`Ê«ÀVi`ÕÀi°Ê/ÊÃiiÊÌiÊVv}ÕÀ>ÌÊÛ>ÕiÃÊvÀÊ ÌiÃiÊ«>À>iÌiÀÃ]ÊiÝiVÕÌiÊÌiÊol[_kjbecqna stored procedure as follows: ata_ol[_kjbecqna#iejoanraniaiknu$I>%# ata_ol[_kjbecqna#i]toanraniaiknu$I>%# }ÕÀiÊÓ{ÊÃÜÃÊÌiÊÀiÃÕÌÊvÊÀÕ}ÊÌiÃiÊV>`ð Figure 2-4. SQL Server memory configuration properties CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 24 ÌiÊÌ>ÌÊÌiÊ`iv>ÕÌÊÛ>ÕiÊvÀÊÌiÊiejoanraniaiknu setting is 0MB, and for the i]t oanraniaiknuÊÃiÌÌ}ÊÌÊÃÊÓ£{Ç{nÎÈ{Ç°ÊÃ]Êi]toanraniaiknu cannot be set to less Ì>Ê{° You can also modify these configuration values using the ol[_kjbecqna stored procedure. ÀÊiÝ>«i]ÊÌÊÃiÌÊi]toanraniaiknu to 200MB and iejoanraniaiknuÊÌÊ£ää]ÊiÝiVÕÌiÊ the following set of statements (oap[iaiknu*omhÊÊÌiÊ`Ü>`®\ QOAi]opan ATA?ol[_kjbecqna#odks]`r]j_a`klpekj#(#-# NA?KJBECQNA ata_ol[_kjbecqna#iejoanraniaiknu$I>%#(-,, ata_ol[_kjbecqna#i]toanraniaiknu$I>%#(.,, NA?KJBECQNASEPDKRANNE@A /iÊiejoanraniaiknu and i]toanraniaiknu 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, >>}iiÌÊ-ÌÕ`Ê>ÕÌ>ÌV>ÞÊiÝiVÕÌiÃÊÌiÊNA?KJBECQNASEPDKRANNE@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Ê`Þ>ViÀÞÊLi>ÛÀÊvÊ-+Ê-iÀÛiÀÊ>ÜÃÊÌÊÌÊÀii>ÃiÊiÀÞÊÌÊÝV>}iÊ-iÀÛiÀÊ >ÌÊiÊÃÌ>ViÊ>`Ê}À>LÊÌÊL>VÊ>ÃÊÝV>}iÊ-iÀÛiÀÊÀii>ÃiÃÊÌ°Ê9ÕÊV>Ê>Û`ÊÌÃÊ`Þ>V iÀÞÊ>>}iiÌÊÛiÀi>`ÊLÞÊVv}ÕÀ}Ê-+Ê-iÀÛiÀÊvÀÊ>ÊvÝi`ÊiÀÞÊÃâi°ÊÜiÛiÀ]Ê «i>ÃiÊii«ÊÊ`ÊÌ>ÌÊÃViÊ-+Ê-iÀÛiÀÊÃÊ>ÊiÝÌÀiiÞÊÀiÃÕÀViÌiÃÛiÊ«ÀViÃÃ]ÊÌÊÃÊ }ÞÊÀiVi`i`ÊÌ>ÌÊÞÕÊ>ÛiÊ>Ê`i`V>Ìi`Ê-+Ê-iÀÛiÀÊ«À`ÕVÌÊ>Vi° ÜÊÌ>ÌÊÞÕÊÕ`iÀÃÌ>`Ê-+Ê-iÀÛiÀÊiÀÞÊ>>}iiÌ]Êi̽ÃÊVÃ`iÀÊÌiÊperfor- >ViÊVÕÌiÀÃÊÞÕÊV>ÊÕÃiÊÌÊ>>ÞâiÊÃÌÀiÃÃÊÊiÀÞ]Ê>ÃÊÃÜÊÊ/>LiÊÓ£° 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]caB]qhpo+oa_ Rate of total page faults «>ÀiÊÜÌÊ its baseline value for trend analysis L]caoEjlqp+oa_ Rate of input page faults L]caoKqplqp+oa_ Rate of output page faults CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 25 Object(Instance[,InstanceN]) Counter Description Values OMHOanran6>qbbanI]j]can >qbban_]_da depn]pek Percentage of requests served out of buffer cache Average value q 90% L]caHeba Atla_p]j_u /i page spends in buffer Average Û>ÕiÊÊÎää ?da_glkejp L]cao+oa_ PagesÊÜÀÌÌiÊÌÊ`ÃÊLÞÊ ViV«Ì Average Û>ÕiÊÊÎä H]vusnepao+oa_ ÀÌÞ aged pages flushed from buffer Average value < 20 OMHOanran6IaiknuI]j]can IaiknuCn]jpo Laj`ejc ÕLiÀ of processes waiting for memory grant Average value = 0 P]ncapOanran Iaiknu$G>% >ÝÕ physical iÀÞÊ-+Ê-iÀÛiÀÊV>Ê VÃÕiÊÊÌiÊLÝ ÃiÊÌÊÃâiÊ of physical memory Pkp]hOanran Iaiknu$G>% Physical memory cur- ÀiÌÞÊ>ÃÃ}i`ÊÌÊ-+Ê Server ÃiÊÌÊ P]ncapOanran 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ÀÊÃÊVv}ÕÀi`ÊvÀÊ`Þ>VÊ memory usage, then this value will be controlled by calls to a Windows API that determines ÜiÊ>`ÊÜÊÕVÊiÀÞÊÌÊÀii>Ã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]caB]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ÀiViÊÊÌiÊëii`ÊLiÌÜiiÊ>Ê`ÃÊ>VViÃÃÊ>`Ê>Êi- ÀÞÊ>VViÃÃÊ>iÃÊÌiÊivviVÌÊvÊ>À`Ê«>}iÊv>ÕÌÃÊÃ}vV>ÌÊ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]caB]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]caoEjlqp+oa_ and L]caoKqplqp+oa_: ÊUÊL]caoEjlqp+oa_: An application will wait only on an input page, not on an output page. ÊUÊL]caoKqplqp+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>Vi`ÊÕÌÊÌÊÌiÊ`Ã°ÊL]caoKqplqp+oa_ is an issue only when `ÃÊ>`ÊLiViÊ>ÊÃÃÕi° Ã]ÊViVÊLnk_aoo6L]caB]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ÊLiVÌ°Ê}ÊÕLiÀÃÊvÀÊÌÃÊVÕÌiÀÊÕÃÕ>ÞÊ`ÊÌÊi>ÊÕVÊÕiÃÃÊL]cao+oa_ is high. L]caB]qhpo+oa_ can range all over the spectrum with normal application behavior, with Û>ÕiÃÊvÀÊäÊÌÊ£]äääÊ«iÀÊÃiV`ÊLi}Ê>VVi«Ì>Li°Ê/ÃÊiÌÀiÊ`>Ì>ÊÃiÌÊi>ÃÊ>ÊL>ÃiiÊÃÊ 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Ê>ÃÊ}Ê>ÃÊ«ÃÃLi]Ê iëiV>ÞÊvÀÊ"/*ÊÃÞÃÌiÃÊÌ>ÌÊÃÕ`Ê>ÛiÊv>ÀÞÊÀi}iÌi`Ê`>Ì>Ê>VViÃÃ]ÊÕiÊ>ÊÜ>Ài- ÕÃiÊÀÊÀi«ÀÌ}ÊÃÞÃÌi°ÊÌÊÃÊiÝÌÀiiÞÊVÊÌÊv`ÊÌÃÊVÕÌiÀÊÛ>ÕiÊ>ÃÊÊ«iÀViÌÊ or more for most production servers. A low >qbban_]_dadepn]pek value indicates that few requests could be served out of the buffer cache, with the rest of the requests being served vÀÊ`Ã° 7iÊÌÃÊ>««iÃ]ÊiÌiÀÊ-+Ê-iÀÛiÀÊÃÊÃÌÊÜ>À}ÊÕ«ÊÀÊÌiÊiÀÞÊÀiµÕÀiiÌÊvÊ ÌiÊLÕvviÀÊV>ViÊÃÊÀiÊÌ>ÊÌiÊ>ÝÕÊiÀÞÊ>Û>>LiÊvÀÊÌÃÊ}ÀÜÌ°ÊvÊÌÃÊÃÊVÃÃ- tently low, you should consider getting more memory for the system. Page Life Expectancy L]caHebaAtla_p]j_u indicates how long a page will stay in the buffer pool without being ref- iÀiVi`°ÊiiÀ>Þ]Ê>ÊÜÊÕ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>Ã>LiÊÛ>ÕiÊÌÊiÝ«iVÌÊÌÊÃiiÊ iÀiÊÃÊÎääÊÃiV`ÃÊÀÊÀi° CHAPTER 2 N SYSTEM PERFORMANCE ANALYSIS 27 Checkpoint Pages/sec /iÊ?da_glkejpL]cao+oa_ÊVÕÌiÀÊÀi«ÀiÃiÌÃÊÌiÊÕLiÀÊvÊ«>}iÃÊÌ>ÌÊ>ÀiÊÛi`ÊÌÊ`ÃÊLÞÊ >ÊViV«ÌÊ«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>Vi°ÊÊ`ÀÌÞÊ«>}iÊÃÊiÊÌ>ÌÊÃÊ`vi`ÊÜiÊÊÌiÊLÕvviÀ°Ê7iÊ̽ÃÊ`vi`]Ê̽ÃÊ>Ài`Ê >ÃÊ`ÀÌÞÊ>`ÊÜÊ}iÌÊÜÀÌÌiÊL>VÊÌÊÌiÊ`ÃÊ`ÕÀ}ÊÌiÊiÝÌÊViV«Ì°Ê}iÀÊÛ>ÕiÃÊÊÌÃÊ counter indicate a larger number of writes occurring within the system, possibly indicative of É"Ê«ÀLið Lazy writes/sec /iÊH]vusnepao+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ÀÞÊ«ÀLiðÊ/iÊH]vusnepao+oa_ values should consistently be less than 20 for the average system. Memory Grants Pending /iÊIaiknuCn]jpoLaj`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ÊÌÊÌÀÕLiÃÌʵÕiÀÞÊ ÌiÕÌÃÊLÞÊ`iÌvÞ}ÊÌ>ÌÊ>ʵÕiÀÞÊ­ÀʵÕiÀiîÊÃÊÜ>Ì}ÊÊiÀÞÊÊÀ`iÀÊÌÊiÝiVÕÌi° Target Server Memory (KB) and Total Server Memory (KB) P]ncapOanranIaiknu$G>% indicatesÊÌiÊÌÌ>Ê>ÕÌÊvÊ`Þ>VÊiÀÞÊ-+Ê-iÀÛiÀÊÃÊ willing to consume. Pkp]hOanranIaiknu$G>% indicates the amount of memory currently >ÃÃ}i`ÊÌÊ-+Ê-iÀÛiÀ°Ê/iÊPkp]hOanranIaiknu$G>% counter value can be very high if the ÃÞÃÌiÊÃÊ`i`V>Ìi`ÊÌÊ-+Ê-iÀÛiÀ°ÊvÊPkp]hOanranIaiknu$G>% is much less than P]ncap OanranIaiknu$G>%]ÊÌiÊiÌiÀÊÌiÊ-+Ê-iÀÛiÀÊiÀÞÊÀiµÕÀiiÌÊÃÊÜ]ÊÌiÊi]toanran iaiknuÊVv}ÕÀ>ÌÊ«>À>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>ÊVvÀÊ>ÊÜÊiÀÞÊÀiµÕÀiiÌÊvÀÊ-+Ê-iÀÛiÀÊLÞÊÌiÊ«ÀiÃiViÊ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ÌÌiiVÊÕÃ}ÊÌ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ÌÌiiVÃÊ>À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ÊVv}ÕÀi -+ Ê-iÀÛiÀÊvÀÊ`Þ>VÊiÀÞÊ>>}iiÌÊ -+ Ê-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>LiÊÌ -+ Ê-iÀÛiÀÊÓään° Hardware Resource Bottlenecks /Þ«V>Þ] -+ Ê-iÀÛiÀÊ`>Ì>L>Ãi performance

Ngày đăng: 17/12/2013, 02:15

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan