效能調優是系統管理的重要部分,而最常使用的工具就是Windows內建的Performance Monitor了,特別是從windows 2008開始,Performance Monitor有了極大的改進。
在 Performance Monitor中可以看到,該工具主要包括data collector sets和reports兩部分,其中每部分又都分為user defined和system兩部分。user defined為使用者自訂的data collector sets和reports,而system部分則為windows內建的data collector sets和reports,在有大量的效能監控器時進行分析就是一個非常的麻煩的事情了。SQL Server 2008也有很大的改進,和Windows 2008一樣也有data collector。利用SQL Server內建的Data collector功能就可以進行SQL Server的效能分析,通常在出現問題的SQL Server 2008啟用Data Collector就不太好了,一樣可以使用Windows 效能分析工具PAL ,我之前簡要介紹過這個工具如何分析Performance Monitor (PerfMon) Log,Performance Analysis of Logs (PAL) Tool,是codeplex上的開源項目,主要用來進行效能分析,8月31日這個工具發布了2.0版本,是http://pal.codeplex.com/releases/view/51623。
運行該程式,可以看到如下的介面
輸入產生的效能計數器記錄檔的檔案路徑
選擇日誌分析的模板,微軟的所有產品都支援IIS, MOSS, SQL Server, BizTalk, Exchange, 和Active Directory,自己還可以自訂相關的模板:
調整伺服器的具體參數,如記憶體、cpu等
選擇執行選項,我們選擇立即執行,並點擊完成。
這時會彈出一個powershell表單開始進行資料處理。由於PAL實在powershell基礎上開發的,因此需要在運行前確保已經安裝了合適的頗為而設立了版本和其他相關的組件。
在經過一段時間的處理後,我們就可以得到一份圖文並茂的效能分析報告了,由於該報告過長,這裡只截取了一個片段,完整的版本可查看下面的附件。在該報告中可以看到對每一個監控資料是否合理的一個提示,非常有效協助分析和解決效能問題。
完整的報告可查看PAL網站的樣本。
Performance Analysis of Logs (PAL) Tool: Part 1
Performance Analysis of Logs (PAL) Tool: Part 2
Performance Analysis of Logs (PAL) Tool: Part 3
Microsoft – Performance Analysis of Logs (PAL) Tool – v2.x – Using PAL template files in MS Windows 2008
Forefront TMG Performance Troubleshooting with PAL v2.x Part 1 – Data Collection
Forefront TMG Performance Troubleshooting with PAL v2.x Part 2 – Data Analysis and Reporting
SQL Server 2008的資料庫分析方法參考以下文章:
The SQL Server 2008 Data Collector: Part 1
The SQL Server 2008 Data Collector- Part 2
The SQL Server 2008 Data Collector: Part 3
使用效能監視器收集Hyper-V的效能,並透過PAL Tool產出報表