可在session log中使用線程統計信息來判斷source,target或組的性能瓶頸
默認狀況下,Integration Service在運行session時,使用一個reader thread,一個transformation thread,還有一個writer thread
若是其中一個thread有很是高的busy percentage,則說明該部分可能有性能上的瓶頸session
session log中提供如下幾個線程相關的信息:app
Run time:
運行時間,即thread運行的總時間
Idle time:
空閒時間,即thread運行的空閒時間,它包括了thread等待其餘thread處理的時間
空閒時間包括的是thread被Integration Service鎖定的時間,而不是被操做系統鎖定的時間
Busy time:
工做時間,即工做時間佔總運行時間的百分比
公式:(run time - idle time) / run time X 100
若是總的運行時間很是短,如60秒之內,則能夠忽略,由於這麼短的時間不足以斷定爲性能上的瓶頸
Thread work time:
Integration Service處理運行組件所花費的時間
在session log中,使用以下格式顯示,若是組件花費的時間不長,則它是不會出如今session log中的
Thread work time breakdown:
<transformation name>: <number> percent
<transformation name>: <number> percent
<transformation name>: <number> percent
若是在session log中,thread沒有準確的統計信息,則說明session運行的時間很短,所以在session log中會提示統計信息不許確
評估性能瓶頸
使用線程統計信息評估性能瓶頸,主要經過如下幾點:
1 若是reader和writer線程的Busy time是100%,能夠考慮在source和target中使用string類型,由於針對非string類型需額外處理
2 若是某一組件的work time是100%,能夠考慮在segment中追加一個分區點
當向mapping追加一個分區點時,Integration Service會在session運行時增長處理該組件的線程數
但若是所在機器的內存已達到或者接近滿負荷狀態,則不要進行該操做
3 若是一個組件須要比其餘組件更多的處理時間,則可考慮爲該組件追加一個pass-through partition point 性能
實例spa
當運行session,session log中關於線程相關的信息會像以下: ***** RUN INFO FOR TGT LOAD ORDER GROUP [1], CONCURRENT SET [1] ***** Thread [READER_1_1_1] created for [the read stage] of partition point [SQ_two_gig_file_32B_rows] has completed. Total Run Time = [505.871140] secs Total Idle Time = [457.038313] secs Busy Percentage = [9.653215] Thread [TRANSF_1_1_1] created for [the transformation stage] of partition point [SQ_two_gig_file_32B_rows] has completed. Total Run Time = [506.230461] secs Total Idle Time = [1.390318] secs Busy Percentage = [99.725359] Thread work time breakdown: LKP_ADDRESS: 25.000000 percent SRT_ADDRESS: 21.551724 percent RTR_ZIP_CODE: 53.448276 percent Thread [WRITER_1_*_1] created for [the write stage] of partition point [scratch_out_32B] has completed. Total Run Time = [507.027212] secs Total Idle Time = [384.632435] secs Busy Percentage = [24.139686] log中包含了以下信息: 1 運行transformation的整體時間是506秒,工做時間是99.7%,可得知transformation thread幾乎沒有空閒時間,所以可斷定transformation是該session的性能瓶頸 2 reader thread和writer thread的的工做時間分別爲9%和24%,可得知空閒的時間佔了大部分,所以可斷定reader和writter並不存在性能瓶頸 3 關於斷定transformation中是哪一個組件致使性能問題,可參考Thread work time breakdown列表,可看到組件RTR_ZIP_CODE的工做時間最高,是53%,所以可針對此組件調