監視和維護 SharePoint Server 2013Monitoring and maintaining SharePoint Server 2013

摘要:了解如何監視及維護 SharePoint Server 2013。Summary: Learn about how to monitor and maintain SharePoint Server 2013.

本文將告訴您 SharePoint Server 2013 伺服器陣列監視及效能的計數器。若要維護 SharePoint Server 2013 的系統效能,您必須監視您找出潛在瓶頸的伺服器。您可以有效地監視之前,您必須了解將會告訴您如果您的伺服器陣列的特定部分需要注意,並了解如何轉譯這些指標的重要指標。如果您找出您的伺服器陣列無法正常已定義的目標之外,您可以調整您的伺服器陣列新增或移除硬體資源、 變更您的拓撲或變更儲存資料的方式。This article discusses monitoring and performance counters for SharePoint Server 2013 farms. To maintain SharePoint Server 2013 system performance, you must monitor your server to identify potential bottlenecks. Before you can monitor effectively, you must understand the key indicators that will tell you if a specific part of your farm requires attention, and know how to interpret these indicators. If you find that your farm is operating outside the targets you have defined, you can adjust your farm by adding or removing hardware resources, changing your topology, or changing how data is stored.

本節中的資訊 》 可協助系統管理員手動設定效能計數器和其他設定。如需狀況監視與疑難排解使用 SharePoint 管理中心網站介面內建之狀況監視工具的詳細資訊,請先閱讀下列文章:The information in this section is intended to help administrators manually configure performance counters and other settings. For more information about health monitoring and troubleshooting using the health monitoring tools built into the SharePoint Central Administration website interface, read the following articles:

閱讀本文之前,您應閱讀容量管理與調整大小概觀 (英文) SharePoint Server 2013Before you read this article, you should read Capacity management and sizing overview for SharePoint Server 2013.

設定監視Configuring monitoring

以下是可變更以在早期階段監視環境的設定清單,協助您決定是否需要任何變更。增加監視功能會影響使用資料庫所需的磁碟空間量。環境穩定且不再需要此詳細監視之後,可能會想要將下面的設定還原為其預設設定。Below is a list of the settings that you can change to monitor your environment in its early stages, which will help you determine whether any changes are needed. Increasing your monitoring capabilities will affect how much disk space that your usage database will require. Once the environment is stable and this detailed monitoring is no longer required, you may want to reverse the settings below to their default settings.

設定Setting Value 附註Notes
防止事件記錄檔濫記Event Log Flooding Protection
停用Disabled
預設值為已啟用。它可以停用來作為盡更加監視資料收集。正常作業,則應啟用。The default value is Enabled. It can be disabled to collect as much monitoring data as possible. For normal operations, it should be enabled.
計時器工作排程Timer Job Schedule
Microsoft SharePoint Foundation 流量資料匯入Microsoft SharePoint Foundation Usage Data Import
5 分鐘5 minutes
預設值為30 分鐘。降低此設定更常會將資料匯入使用狀況資料庫時,為特別有用的疑難排解。正常作業,它應該是 30 分鐘。The default value is 30 minutes. Lowering this setting imports the data into the usage database more frequently, and is especially useful when troubleshooting. For normal operations, it should be 30 minutes.
診斷提供者Diagnostic Providers
啟用所有診斷提供者Enable all diagnostic providers
啟用Enabled
預設值為已停用但不包括 「 搜尋狀況監視-追蹤事件 」 提供者。這些提供者收集各種功能與元件的狀況資料。正常作業可能會想要還原為預設值。The default value is Disabled except for the "Search Health Monitoring - Trace Events" provider. These providers collect health data for various features and components. For normal operations, you may want to revert to the default.
設定 "job-diagnostics-performance-counter-wfe-provider" 和 "job-diagnostics-performance-counter-sql-provider" 排程間隔Set "job-diagnostics-performance-counter-wfe-provider" and "job-diagnostics-performance-counter-sql-provider" Schedule Intervals
1 分鐘1 minute
預設值為5 分鐘。降低此設定可以輪詢資料更常與特別有用時疑難排解。正常作業,它應該是 5 分鐘。The default value is 5 minutes. Lowering this setting can poll data more frequently, and is especially useful when troubleshooting. For normal operations, it should be 5 minutes.
其他Miscellaneous
啟用內容要求的堆疊追蹤Enable stack tracing for content requests
啟用Enabled
預設值為Disabled。啟用此設定可讓診斷的內容要求使用處理序堆疊追蹤失敗。正常作業,則應停用。The default value is Disabled. Enabling this setting allows diagnosis of content requests failures using the process stack trace. For normal operations, it should be disabled.
啟用開發人員儀表板Enable the Developer Dashboard
啟用Enabled
預設值為Disabled。啟用此設定允許使用開發人員儀表板的診斷的速度過慢的頁面或其他問題。正常作業及疑難排解當不再需要,應停用。The default value is Disabled. Enabling this setting allows diagnosis of slow pages, or other problems by using the Developer Dashboard. For normal operations, and as soon as troubleshooting is no longer necessary, it should be disabled.
使用狀況資料收集Usage Data Collection
內容匯入使用狀況Content Import Usage
內容匯出使用狀況Content Export Usage
頁面要求Page Requests
功能使用Feature Use
搜尋查詢使用情況Search Query Use
網站庫存使用狀況Site Inventory Usage
計時器工作Timer Jobs
分級使用量Rating Usage
啟用Enabled
啟用這組計數器的記錄,可讓您跨環境收集更多使用資料,更深入了解環境中的流量模式。Enabling the logging of this set of counters allows you to collect more usage data across the environment and to better understand the traffic patterns in the environment.

效能計數器Performance counters

如果您使用的使用狀況資料庫,您可以新增協助您監視及評估使用狀況資料庫,這類的方式他們會記錄會自動在特定的時間間隔 (根據預設,30 分鐘) 的伺服器陣列的效能的效能計數器。授與的您可以查詢來擷取這些計數器和圖結果一段時間的使用狀況資料庫。以下是如何使用新增 SPDiagnosticsPerformanceCounter PowerShell 指令程式來新增 %Processor Time 計數器使用狀況資料庫。這只有在其中一部網頁伺服器上執行:If you are using the usage database, then you can add the performance counters that assist you in monitoring and evaluating your farm's performance to the usage database, in such a way that they are logged automatically at a specific interval (by default, 30 minutes). Given that, you can query the usage database to retrieve these counters and graph the results over time. Here's an how to use the Add-SPDiagnosticsPerformanceCounter PowerShell cmdlet to add the % Processor Time counter to the usage database. This only has to be run on one of the web servers:

Add-SPDiagnosticsPerformanceCounter -Category "Processor" -Counter "% Processor Time" -Instance "_Total" -WebFrontEnd

針對任何伺服器系統,都應該監視數個一般效能計數器。下表概述這些效能計數器。There are several generic performance counters that you should monitor for any server system. The following table outlines these performance counters.

效能計數器Performance Counter 描述Description
ProcessorProcessor
您應該監視處理器效能,確保所有處理器使用情況不是都一樣高 (超過 80%),因為這表示系統無法處理突然的大量活動。而在一般狀況下,如果一個元件故障而導致其餘元件失去作用,則看不到骨牌效應。例如,如果您有三部網頁伺服器,則應該確定所有伺服器的平均 CPU 低於 60%,這樣一來,如果其中一部故障,則還有空間,讓其他兩部吸收其他負載。You should monitor processor performance to ensure that all processor usage does not remain consistently high (over 80 percent) as this indicates that the system would not be able to handle any sudden surges of activity. And that in the common state, you will not see a domino effect if one component failure will bring the remaining components to a malfunctioning state. For example, if you have three web servers, you should make sure that the average CPU across all servers is under 60% so that if one fails, there is still room for the other two to absorb the additional load.
Network InterfaceNetwork Interface
監視透過網路介面卡傳送和接收資料的速率。這應該低於網路容量的 50%。Monitor the rate at which data is sent and received via the network interface card. This should remain below 50 percent of network capacity.
Disks 和 CacheDisks and Cache
您應該定期監視數個邏輯磁碟選項。在所有容量研究中,可用磁碟空間都十分重要,但是您也應該檢閱磁碟的閒置時間。根據伺服器上執行的應用程式或服務類型,可能會檢閱磁碟讀取和寫入時間。寫入或讀取函數的延伸佇列會影響效能。快取主要會影響讀取和寫入作業。您必須監視快取失敗是否增加。There are several logical disk options that you should monitor regularly. The available disk space is important in any capacity study, but you should also review the time that the disk is idle. Dependent on the types of applications or services that you are running on your servers, you may review disk read and write times. Extended queuing for write or read function will affect performance. The cache has a major effect on read and write operations. You must monitor for increased cache failures.
Memory 和 Paging FileMemory and Paging File
監視可用於配置的實體記憶體量。記憶體不足就會導致過度使用分頁檔,並增加每秒分頁錯誤數。Monitor how much physical memory is available for allocation. Insufficient memory will lead to excessive use of the page file and an increase in the number of page faults per second.

系統計數器System counters

下表提供系統物件和計數器您無法新增至網頁伺服器上使用SPDiagnosticPerformanceCounter的使用狀況資料庫中受監控的計數器的資訊。The following table provides information on system objects and counters that you could add to the set of counters monitored in the usage database using the SPDiagnosticPerformanceCounter on a web server.

物件和計數器Objects and Counters 描述Description
處理器Processor
% Processor Time% Processor Time
這會顯示一段時間的處理器使用情況。如果這持續居高不下,則可能會發現效能嚴重受到影響。在多處理器系統中,請一定要計算 "Total"。您也可以測量每個處理器的使用率,確保核心之間的效能平衡。This shows processor usage over time. If this is consistently too high, you may find performance is adversely affected. Remember to count "Total" in multiprocessor systems. You can measure the utilization on each processor also, to ensure balanced performance between cores.
磁碟Disk
- Avg. Disk Queue Length- Avg. Disk Queue Length
這會顯示在範例間隔期間針對所選取磁碟排入佇列的平均讀取和寫入要求數目。只要磁碟讀取/寫入沒有困難,而且系統在未展開佇列的情況下穩定運作,較大的磁碟佇列長度可能就不會造成問題。This shows the average number of both read and write requests that were queued for the selected disk during the sample interval. A bigger disk queue length may not be a problem as long as disk reads/writes are not suffering and the system is working in a steady state without expanding queuing.
Avg. Disk Read Queue LengthAvg. Disk Read Queue Length
排入佇列的平均讀取要求數目。The average number of read requests that are queued.
Avg. Disk Write Queue LengthAvg. Disk Write Queue Length
排入佇列的平均寫入要求數目。The average number of write requests that are queued.
Disk Reads/secDisk Reads/sec
每秒讀取到磁碟的次數。The number of reads to disk per second.
Disk Writes/secDisk Writes/sec
每秒寫入至磁碟的次數。The number of writes to disk per second.
記憶體Memory
- Available Mbytes- Available Mbytes
這會顯示可用於配置的實體記憶體量。記憶體不足就會導致過度使用分頁檔,並增加每秒分頁錯誤數。This shows how much physical memory is available for allocation. Insufficient memory leads to excessive use of the page file and an increase in the number of page faults per second.
- Cache Faults/sec- Cache Faults/sec
此計數器顯示在檔案系統快取中看得到但找不到分頁時發生錯誤的速率。這可能是軟容錯 (在記憶體中找到分頁時) 或硬錯誤 (分頁位於磁碟時)。This counter shows the rate at which faults occur when a page is sought in the file system cache and is not found. This may be a soft fault, when the page is found in memory, or a hard fault, when the page is on disk.
有效使用的快取中讀取及寫入作業有大幅影響伺服器效能。您必須監視增加快取失敗,以減少的非同步處理 Fast 讀取次數/秒讀取先期/秒The effective use of the cache for read and write operations can have a significant effect on server performance. You must monitor for increased cache failures, indicated by a reduction in the Async Fast Reads/sec or Read Aheads/sec.
- Pages/sec- Pages/sec
此計數器會顯示從磁碟讀取或寫入至磁碟之頁面的速率,以解決硬分頁錯誤。如果此值增加,則指出是全伺服器效能問題。This counter shows the rate at which pages are read from or written to disk to resolve hard page faults. If this increases, it indicates system-wide performance problems.
分頁檔Paging File
- % Used 和 % Used Peak- % Used and % Used Peak
伺服器分頁檔 (也稱為交換檔) 會將「虛擬」記憶體位址保留在磁碟上。如果程序必須停止並等待將必要「虛擬」資源從磁碟擷取至記憶體,則會發生分頁錯誤。如果實體記憶體不足,則這些項目會更為頻繁。The server paging file, also known as the swap file, holds "virtual" memory addresses on disk. Page faults occur when a process has to stop and wait while required "virtual" resources are retrieved from disk into memory. These will be more frequent if the physical memory is insufficient.
NICNIC
- Total Bytes/sec- Total Bytes/sec
這是在資料會傳送和接收透過網路介面卡的速率。您可能需要將進一步調查如果此速率超過 40-50 之間的網路容量。若要微調您調查、 監視Bytes received/secBytes Sent/secThis is the rate at which data is sent and received via the network interface card. You may have to investigate further if this rate is over 40-50 percent network capacity. To fine-tune your investigation, monitor Bytes received/sec and Bytes Sent/sec.
程序Process
- Working Set- Working Set
此計數器指出給定程序之工作集的目前大小 (位元組)。此記憶體保留供這個程序使用,即使目前未使用也是一樣。This counter indicates the current size (in bytes) of the working set for a given process. This memory is reserved for the process, even if it is not being used.
- % Processor Time- % Processor Time
此計數器指出給定程序所使用的處理器時間百分比。This counter indicates the percentage of processor time that is used by a given process.
Thread Count (_Total)Thread Count (_Total)
目前執行緒數目。The current number of threads.
ASP.NETASP.NET
Requests TotalRequests Total
啟動服務之後的要求總數。The total number of requests since the service was started.
Requests QueuedRequests Queued
SharePoint Server 2013 提供使用者瀏覽器中呈現 over HTTP 的 HTML 頁面建置組塊。此計數器會顯示等待處理中的要求數目。SharePoint Server 2013 provides the building blocks for HTML pages that are rendered in the user browser over HTTP. This counter shows the number of requests waiting to be processed.
Request Wait TimeRequest Wait Time
佇列中最新要求等待處理的毫秒數。等待事件數增加時,使用者會體驗到分頁呈現效能下降。The number of milliseconds that the most recent request waited in the queue for processing. As the number of wait events increases, users will experience decreased page-rendering performance.
Requests RejectedRequests Rejected
因處理要求的伺服器資源不足而未執行的要求總數。此計數器代表傳回 503 HTTP 狀態碼 (指出伺服器太忙碌) 的要求數目。The total number of requests not executed because of insufficient server resources to process them. This counter represents the number of requests that return a 503 HTTP status code, which indicates that the server is too busy.
Requests Executing (_Total)Requests Executing (_Total)
目前正在執行的要求數目。The number of requests currently executing.
Requests/Sec (_Total)Requests/Sec (_Total)
每秒執行的要求數目。這代表應用程式的目前輸送量。在正常負載下,此數字應該保留在特定範圍,但其他伺服器工作 (例如廢棄項目收集、快取清理執行緒、外部伺服器工具等) 除外。The number of requests executed per second. This represents the current throughput of the application. Under constant load, this number should remain in a certain range, barring other server work (such as garbage collection, cache cleanup thread, external server tools, and so on).
.NET CLR 記憶體.NET CLR Memory
# Gen 0 Collections# Gen 0 Collections
顯示應用程式啟動之後,廢棄項目收集回收第 0 代物件 (即最新且最近配置的物件) 的次數。此數字在 #Gen 0: #Gen 1: #Gen 2 的比率時有用,確定 Gen 2 收集次數不會遠大於 Gen 0 收集次數,最佳是係數 2。Displays the number of times the generation 0 objects (that is, the youngest, most recently allocated objects) are reclaimed by garbage collection since the application started. This number is useful as a ratio of #Gen 0: #Gen 1: #Gen 2 to make sure that the number of Gen 2 collections does not greatly exceed Gen 0 collections, optimally by a factor of 2.
# Gen 1 Collections# Gen 1 Collections
顯示應用程式啟動之後,廢棄項目收集回收第 1 代物件的次數。Displays the number of times the generation 1 objects are reclaimed by garbage collection since the application started.
# Gen 2 Collections# Gen 2 Collections
顯示應用程式啟動之後,廢棄項目收集回收第 2 代物件的次數。此計數器會在第 2 代廢棄項目收集 (也稱為完整廢棄項目收集) 結束時遞增。Displays the number of times the generation 2 objects are reclaimed by garbage collection since the application started. The counter is incremented at the end of a generation 2 garbage collection (also known as a full garbage collection).
% Time in GC% Time in GC
顯示最後一個廢棄項目收集週期之後,執行廢棄項目收集所需的經過時間百分比。此計數器通常指出廢棄項目收集器代表應用程式收集和壓縮記憶體所完成的工作。只在每次廢棄項目收集結束時才會更新此計數器。此計數器不是平均值。它的值會反映最後一個觀察到的值。在一般作業中,此計數器應該低於 5%。Displays the percentage of elapsed time that was spent performing a garbage collection since the last garbage collection cycle. This counter usually indicates the work done by the garbage collector to collect and compact memory on behalf of the application. This counter is updated only at the end of every garbage collection. This counter is not an average. Its value reflects the last observed value. This counter should be under 5% in normal operation.

SQL Server 計數器SQL Server counters

下表提供 SQL Server 物件和計數器的資訊。The following table provides information on SQL Server objects and counters.

物件和計數器Objects and Counters 描述Description
General StatisticsGeneral Statistics
此物件提供的計數器可監視一般的全伺服器的活動,例如目前連線數目和使用者連線與中斷連線每秒從執行 SQL Server 執行個體的電腦數目。This object provides counters to monitor general server-wide activity, such as the number of current connections and the number of users connecting and disconnecting per second from computers that are running an instance of SQL Server.
User ConnectionsUser Connections
此計數器會顯示在 SQL Server 執行個體上的使用者連線數目。如果您看到此數字增加 500%從您的比較基準,您可能會看到效能降低。This counter shows the number of user connections on your instance of SQL Server. If you see this number increase by 500 percent from your baseline, you may see a performance reduction.
DatabasesDatabases
此物件提供的計數器可監視大量複製作業、備份與還原輸送量以及交易記錄活動。監視交易與交易記錄,可判斷資料庫中發生了多少使用者活動,以及交易記錄的滿溢程度。使用者活動的數量可決定資料庫的效能,並且可能影響記錄大小、鎖定與複寫。監視低層級記錄活動以測量使用者活動與資源使用量,可協助您找出效能瓶頸。This object provides counters to monitor bulk copy operations, backup and restore throughput, and transaction log activities. Monitor transactions and the transaction log to determine how much user activity is occurring in the database and how full the transaction log is becoming. The amount of user activity can determine the performance of the database and affect log size, locking, and replication. Monitoring low-level log activity to gauge user activity and resource usage can help you identify performance bottlenecks.
Transactions/secTransactions/sec
此計數器會顯示異動數目或每秒的整個 SQL Server 執行個體上指定的資料庫。此數值是以協助您建立基準和可協助您疑難排解問題。This counter shows the number of transactions on a given database or on the whole SQL Server instance per second. This number is to help you create a baseline and to help you troubleshoot issues.
LocksLocks
此物件提供個別資源類型上的 SQL Server 鎖定的相關資訊。This object provides information about SQL Server locks on individual resource types.
Number of Deadlocks/secNumber of Deadlocks/sec
此計數器會顯示在 SQL Server 每秒死結數目。這通常應該是 0。This counter shows the number of deadlocks on the SQL Server per second. This should typically be 0.
Average Wait Time (ms)Average Wait Time (ms)
此計數器顯示每個導致等候狀況之鎖定要求的平均等候時間。This counter shows the average amount of wait time for each lock request that resulted in a wait.
Lock Wait Time (ms)Lock Wait Time (ms)
此計數器顯示上一秒之鎖定的總等候時間。This counter shows the total wait time for locks in the last second.
Lock Waits/secLock Waits/sec
此計數器顯示每秒無法立即獲得應允而必須等候資源的鎖定數目。This counter shows the number of locks per second that could not be satisfied immediately and had to wait for resources.
LatchesLatches
此物件提供的計數器可監視內部 SQL Server 資源鎖定呼叫 latch 次數。監視來判斷使用者活動及資源使用狀況 latch 次數可協助您識別效能瓶頸。This object provides counters to monitor internal SQL Server resource locks called latches. Monitoring the latches to determine user activity and resource usage can help you identify performance bottlenecks.
Average Latch Wait Time (ms)Average Latch Wait Time (ms)
此計數器顯示必須等候之閂鎖要求的平均閂鎖等候時間。This counter shows the average latch wait time for latch requests that had to wait.
Latch Waits/secLatch Waits/sec
此計數器顯示每秒無法立即獲得應允的閂鎖要求數目。This counter shows the number of latch requests per second that could not be granted immediately.
SQL StatisticsSQL Statistics
此物件提供的計數器可監視編譯及要求傳送至 SQL Server 執行個體的類型。監視的查詢編譯次數和重新編譯次數數與 SQL server 執行個體所收到的批次數目可讓您相對值的 SQL Server 正在處理使用者查詢的速度和查詢最佳化正在處理如何有效率地查詢。This object provides counters to monitor compilation and the type of requests sent to an instance of SQL Server. Monitoring the number of query compilations and recompilations and the number of batches received by an instance of SQL Server gives you an indication of how quickly SQL Server is processing user queries and how effectively the query optimizer is processing the queries.
SQL Compilations/secSQL Compilations/sec
此計數器指出每秒輸入編譯代碼路徑的次數。This counter indicates the number of times the compile code path is entered per second.
SQL Re-Compilations/secSQL Re-Compilations/sec
此計數器指出每秒觸發陳述式重新編譯的次數。This counter indicates the number of times statement recompiles are triggered per second.
Plan CachePlan Cache
此物件提供計數器可監視 SQL Server 使用記憶體以儲存物件例如預存程序、 即時與已備妥 TRANSACT-SQL 陳述式與觸發程序。This object provides counters to monitor how SQL Server uses memory to store objects such as stored procedures, impromptu and prepared Transact-SQL statements, and triggers.
Cache Hit RatioCache Hit Ratio
此計數器指出計劃的快取點擊與查閱之間的比率。This counter indicates the ratio between cache hits and lookups for plans.
Buffer CacheBuffer Cache
此物件提供的計數器可監視 SQL Server 使用記憶體以儲存資料頁、 內部資料結構和程序快取及監視 SQL Server 讀取和寫入資料庫頁面實體 I/O 計數器。This object provides counters to monitor how SQL Server uses memory to store data pages, internal data structures, and the procedure cache and counters to monitor the physical I/O as SQL Server reads and writes database pages.
Buffer Cache Hit RatioBuffer Cache Hit Ratio
此計數器會顯示頁面而不必從磁碟讀取位於緩衝區快取的百分比。是總數除以快取查閱總數啟動 SQL Server 執行個體之後的快取點擊比率。This counter shows the percentage of pages found in the buffer cache without having to read from disk. The ratio is the total number of cache hits divided by the total number of cache lookups since an instance of SQL Server was started.

移除瓶頸Removing bottlenecks

系統瓶頸代表爭用點沒有服務使用者交易要求的資源不足。這些可能是實體硬體、 作業系統環境或應用程式為基礎。通常瓶頸的原因會無效率的自訂程式碼或協力廠商解決方案,而且這些檢閱無法獲得更好的結果比新增硬體。另一個常見瓶頸的原因是伺服器陣列或結構資料需要比所需的更多資源的方式效率解決方案實作設定錯誤。讓系統管理員,您應該透過正比監視效能管理瓶頸。當您識別的效能問題時,您必須評估最佳的解決方法移除瓶頸。效能計數器和其他效能監視應用程式,例如 SCOM、 項目中追蹤及分析問題的主要工具,讓您可以開發解決方案。System bottlenecks represent a point of contention where there are insufficient resources to service user transaction requests. These may be physical hardware, operating environment, or application-based. Often, the reason for the bottleneck will be inefficient custom code or third-party solutions, and a review of those could yield better results than adding hardware. Another common cause of bottlenecks is a misconfiguration of the farm, or an inefficient solution implementation that structures data in a way that requires more resources than necessary. For a system administrator, you should manage bottlenecks by constantly monitoring performance. When you identify a performance issue, you must assess the best resolution for removing the bottleneck. The performance counters and other performance monitoring applications, such as SCOM, are the key tools in tracking and analyzing problems, so that you can develop a solution.

實體瓶頸解決方法Physical bottleneck resolution

實體瓶頸是根據處理器、磁碟、記憶體和網路競爭而來:太多的要求在競爭太少的實體資源。<監視效能>主題中所述的物件和計數器會指出效能問題所在位置 (例如硬體處理器或 ASP.NET)。瓶頸解決方法需要您找出問題,然後進行變更以減輕效能問題。Physical bottlenecks are based on processor, disk, memory, and network contention: too many requests are contending for too few physical resources. The objects and counters described in the Monitoring Performance topic indicate where the performance problem is located, for example, hardware processor or ASP.NET. Bottleneck resolution requires that you identify the issue and then make a change or changes that mitigate the performance problem.

問題很少會持續發生;如果您使用效能監視工具或更精密的系統 (例如 SCOM) 定期進行監視,則通常會追蹤到效能逐漸下降。針對這兩個選項 (程度不同),您可以在警示中透過建議文字或指令碼命令形式來內嵌解決方案。Problems seldom happen instantaneously; there is usually a gradual performance degradation that you can track if you monitor regularly, using your performance monitor tool or a more sophisticated system, such as SCOM. For both of these options, to varying degrees, you can embed solutions within an alert, in the form of advisory text or scripted commands.

您可能必須由變更硬體或系統設定,一旦您已決定他們不導致的組態不正確、 效率低自訂程式碼或協力廠商解決方案或無效率解決方案實作解決瓶頸問題。下表找出問題閾值] 和 [可能的解決方法選項。某些選項的建議硬體升級或修改。You may have to resolve bottleneck issues by making changes to hardware or system configurations, once you have determined that they are not caused by a mis-configuration, inefficient custom code or third party solutions, or inefficient solution implementation. The following tables identify problem threshold and possible resolution options. Some of the options suggest hardware upgrades or modifications.

物件和計數器Objects and Counters 問題Problem 解決方式選項Resolution Options
處理器Processor
Processor - % Processor TimeProcessor - % Processor Time
超過 75-85%Over 75-85%
升級處理器Upgrade processor
增加處理器數目Increase number of processors
新增其他伺服器Add additional server(s)
磁碟Disk
Avg. Disk Queue LengthAvg. Disk Queue Length
逐漸增加,系統不穩定而且正在備份佇列Gradually increasing, system not in a steady state and queue is backing up
增加磁碟數目或速度Increase number or speed of disks
變更要設為等量的陣列組態Change array configuration to stripe
將部分資料移到替代伺服器Move some data to an alternative server
% Idle Time% Idle Time
小於 90%Less than 90%
增加磁碟數目Increase number of disks
將資料移到替代磁碟或伺服器Move data to an alternative disk or server
% Free Space% Free Space
小於 30%Less than 30%
增加磁碟數目Increase number of disks
將資料移到替代磁碟或伺服器Move data to an alternative disk or server
記憶體Memory
Available MbytesAvailable Mbytes
網頁伺服器上小於 2GB。Less than 2GB on a Web server.
新增記憶體。Add memory.
> [!NOTE]> SQL Server 的可用記憶體會不足根據設計,並不一定表示有問題。> [!NOTE]> SQL Server available memory will be low, by design, and does not always indicate a problem.
Cache Faults/secCache Faults/sec
大於 1Greater than 1
新增記憶體Add memory
如果可能,請增加快取速度或大小Increase cache speed or size if possible
將資料移到替代磁碟或伺服器Move data to an alternative disk or server
Pages/secPages/sec
大於 10Greater than 10
新增記憶體Add memory
分頁檔Paging File
% Used 和 % Used Peak% Used and % Used Peak
伺服器分頁檔 (有時稱為交換檔) 會將「虛擬」記憶體位址保留在磁碟上。如果程序必須停止並等待將必要「虛擬」資源從磁碟擷取至記憶體,則會發生分頁錯誤。如果實體記憶體不足,則這些項目會更為頻繁。The server paging file, sometimes called the swap file, holds "virtual" memory addresses on disk. Page faults occur when a process has to stop and wait while required "virtual" resources are retrieved from disk into memory. These will be more frequent if the physical memory is inadequate.
新增記憶體Add memory
NICNIC
Total Bytes/secTotal Bytes/sec
超過 40-50% 的網路容量。這是透過網路介面卡傳送和接收資料的速率。Over 40-50% of network capacity. This is the rate at which data is sent and received via the network interface card.
監視 Bytes received/sec 和 Bytes Sent/sec,以進行進一步調查。Investigate further by monitoring Bytes received/sec and Bytes Sent/sec.
重新評估網路介面卡速度Reassess network interface card speed
檢查記憶體緩衝區的數目、大小和使用情況Check number, size, and usage of memory buffers
程序Process
Working SetWorking Set
大於 80% 的總記憶體Greater than 80% of total memory
新增記憶體Add memory
% Processor Time% Processor Time
超過 75-85%。Over 75-85%.
增加處理器數目Increase number of processors
將工作負載轉散發至其他伺服器Redistribute workload to additional servers
ASP.NETASP.NET
應用程式集區回收Application Pool Recycles
每天會有數次,導致間歇性緩慢。Several per day, causing intermittent slowness.
請確定您尚未實作不需要在一天內自動回收應用程式集區的設定。Make sure that you have not implemented settings that automatically recycle the application pool unnecessarily throughout the day.
Requests QueuedRequests Queued
已排入佇列的數百或數千個要求。Hundreds or thousands of requests queued.
實作其他網頁伺服器Implement additional Web servers
此計數器的預設上限是 5,000,而且您可以在 Machine.config 檔案中變更此設定The default maximum for this counter is 5,000, and you can change this setting in the Machine.config file
Request Wait TimeRequest Wait Time
等待事件數增加時,使用者會體驗到分頁呈現效能下降。As the number of wait events increases, users will experience degraded page rendering performance.
實作其他網頁伺服器Implement additional Web servers
Requests RejectedRequests Rejected
大於 0Greater than 0
實作其他網頁伺服器Implement additional Web servers

另請參閱See also

概念Concepts

SharePoint Server 2013 的效能測試Performance testing for SharePoint Server 2013

SharePoint Server 2013 的容量規劃Capacity planning for SharePoint Server 2013

其他資源Other Resources

Capacity management and sizing overview for SharePoint Server 2013Capacity management and sizing overview for SharePoint Server 2013