本文介紹如何對基本最佳化問題進行故障排除。
基本WAAS最佳化包括TCP流最佳化(TFO)、資料冗餘消除(DRE)和持續Lempel-Ziv(LZ)壓縮。
TCP連線的數量、狀態和配置可以指示特定位置的WAAS系統的運行狀況。正常的系統將顯示大量連線,其中大部分連線正常關閉。show statistics tfo detail命令可指示特定WAAS裝置與網路中其他裝置之間的連線數量、狀態和處置情況。
可以使用show statistics tfo detail命令檢視全域性TFO統計資訊,如下所示:
WAE# show statistics tfo detail Total number of connections : 2852 No. of active connections : 3 <-----Active connections No. of pending (to be accepted) connections : 0 No. of bypass connections : 711 No. of normal closed conns : 2702 No. of reset connections : 147 Socket write failure : 0 Socket read failure : 0 WAN socket close while waiting to write : 0 AO socket close while waiting to write : 2 WAN socket error close while waiting to read : 0 AO socket error close while waiting to read : 64 DRE decode failure : 0 DRE encode failure : 0 Connection init failure : 0 WAN socket unexpected close while waiting to read : 32 Exceeded maximum number of supported connections : 0 Buffer allocation or manipulation failed : 0 Peer received reset from end host : 49 DRE connection state out of sync : 0 Memory allocation failed for buffer heads : 0 Unoptimized packet received on optimized side : 0 Data buffer usages: Used size: 0 B, B-size: 0 B, B-num: 0 Cloned size: 0 B, B-size: 0 B, B-num: 0 Buffer Control: Encode size: 0 B, slow: 0, stop: 0 Decode size: 0 B, slow: 0, stop: 0 Scheduler: Queue Size: IO: 0, Semi-IO: 0, Non-IO: 0 Total Jobs: IO: 1151608, Semi-IO: 5511278, Non-IO: 3690931 Policy Engine Statistics ------------------------- Session timeouts: 0, Total timeouts: 0 Last keepalive received 00.5 Secs ago Last registration occurred 15:00:17:46.0 Days:Hours:Mins:Secs ago Hits: 7766, Update Released: 1088 Active Connections: 3, Completed Connections: 7183 Drops: 0 Rejected Connection Counts Due To: (Total: 0) Not Registered : 0, Keepalive Timeout : 0 No License : 0, Load Level : 0 Connection Limit : 0, Rate Limit : 0 <-----Connection limit overload Minimum TFO : 0, Resource Manager : 0 Global Config : 0, TFO Overload : 0 Server-Side : 0, DM Deny : 0 No DM Accept : 0 . . .
活動連線數欄位報告當前正在最佳化的連線數。
在輸出的Policy Engine Statistics部分中, Rejected Connection Counts部分顯示了連線被拒絕的各種原因。Connection Limit計數器報告連線因超過最大最佳化連線數而被拒絕的次數。如果這裡看到高數值,則應該研究過載情況。有關詳細資訊,請參閱排除過載條件一文。
此外,由於無法最佳化流量而從其他AO向下推送的連線的TFO最佳化由通用AO處理,這在通用AO故障排除一文中有介紹。
您可以使用show statistics connection命令檢視TFO連線統計資訊。有關使用此命令的詳細資訊,請參閱過載故障排除條件一文中的「檢查最佳化的TCP連線」部分。
當預期有應用加速但未觀察到時,請驗證是否對流量應用了適當的最佳化,以及DRE快取是否適當地減少了最佳化流量的大小。
用於DRE和LZ最佳化的策略引擎對映包括:
各種情況可能導致無法將DRE和/或LZ應用於連線,即使已配置此連線:
附註:在所有上述情況下,show statistics connection命令將報告此為協商策略的連線的加速「TDL」。檢視DRE或LZ旁路流量的數量可以瞭解是否實際應用了DRE或LZ最佳化。使用show statistics connection conn-id命令(如下文所述),然後檢視DRE編碼編號,以檢視DRE或LZ比率是否接近0%,以及大多數流量是否被繞過。前三個條件將由「由於編碼旁路」欄位報告,後三個條件由流量資料模式產生,並在報告的DRE和LZ比率中說明。
您可以檢視特定連線的統計資訊,以確定已配置、與對等體協商並通過show statistics connection conn-id命令應用的基本最佳化。首先,您需要使用show statistics connection命令確定特定連線的連線ID,如下所示:
WAE#show stat conn Current Active Optimized Flows: 1 Current Active Optimized TCP Plus Flows: 0 Current Active Optimized TCP Only Flows: 1 Current Active Optimized TCP Preposition Flows: 0 Current Active Auto-Discovery Flows: 0 Current Reserved Flows: 10 Current Active Pass-Through Flows: 0 Historical Flows: 375 D:DRE,L:LZ,T:TCP Optimization RR:Total Reduction Ratio A:AOIM,C:CIFS,E:EPM,G:GENERIC,H:HTTP,M:MAPI,N:NFS,S:SSL,V:VIDEO ConnID Source IP:Port Dest IP:Port PeerID Accel RR 343 10.10.10.10:3300 10.10.100.100:80 00:14:5e:84:24:5f T 00.0% <------
您將在輸出末尾找到列出的每個連線的連線ID。要檢視特定連線的統計資訊,請使用show statistics connection conn-id命令,如下所示:
WAE# sh stat connection conn-id 343 Connection Id: 343 Peer Id: 00:14:5e:84:24:5f Connection Type: EXTERNAL CLIENT Start Time: Tue Jul 14 16:00:30 2009 Source IP Address: 10.10.10.10 Source Port Number: 3300 Destination IP Address: 10.10.100.100 Destination Port Number: 80 Application Name: Web <-----Application name Classifier Name: HTTP <-----Classifier name Map Name: basic Directed Mode: FALSE Preposition Flow: FALSE Policy Details: Configured: TCP_OPTIMIZE + DRE + LZ <-----Configured policy Derived: TCP_OPTIMIZE + DRE + LZ Peer: TCP_OPTIMIZE + DRE + LZ Negotiated: TCP_OPTIMIZE + DRE + LZ <-----Policy negotiated with peer Applied: TCP_OPTIMIZE + DRE + LZ <-----Applied policy . . .
Application Name和Classifier Name欄位將告訴您應用於此連線的應用程式和分類器。
「策略詳細資訊」部分中列出了最佳化策略。如果「已配置」和「已應用」策略不匹配,這意味著您為此型別的連線配置了一個策略,但應用了其他策略。這可能是因為對等裝置發生故障、配置錯誤或過載。檢查對等WAE及其配置。
以下輸出部分顯示與DRE編碼/解碼相關的統計資訊,包括消息數、已應用DRE的數量、已應用LZ或繞過的DRE和LZ:
. . . DRE: 353 Conn-ID: 353 10.10.10.10:3304 -- 10.10.100.100:139 Peer No: 0 Status: Active ------------------------------------------------------------------------------ Open at 07/14/2009 16:04:30, Still active Encode: Overall: msg: 178, in: 36520 B, out: 8142 B, ratio: 77.71% <-----Overall compression DRE: msg: 1, in: 356 B, out: 379 B, ratio: 0.00% <-----DRE compression ratio DRE Bypass: msg: 178, in: 36164 B <-----DRE bypass LZ: msg: 178, in: 37869 B, out: 8142 B, ratio: 78.50% <-----LZ compression ratio LZ Bypass: msg: 0, in: 0 B <-----LZ bypass Avg latency: 0.335 ms Delayed msg: 0 <-----Avg latency Encode th-put: 598 KB/s <-----In 4.3.3 and earlier only Message size distribution: 0-1K=0% 1K-5K=0% 5K-15K=0% 15K-25K=0% 25K-40K=0% >40K=0% <-----In 4.3.3 and earlier only Decode: Overall: msg: 14448, in: 5511 KB, out: 420 MB, ratio: 98.72% <-----Overall compression DRE: msg: 14372, in: 5344 KB, out: 419 MB, ratio: 98.76% <-----DRE compression ratio DRE Bypass: msg: 14548, in: 882 KB <-----DRE bypass LZ: msg: 14369, in: 4891 KB, out: 5691 KB, ratio: 14.07% <-----LZ compression ratio LZ Bypass: msg: 79, in: 620 KB <-----LZ bypass Avg latency: 4.291 ms <-----Avg latency Decode th-put: 6946 KB/s <-----In 4.3.3 and earlier only Message size distribution: 0-1K=4% 1K-5K=12% 5K-15K=18% 15K-25K=9% 25K-40K=13% >40K=40% <-----Output from here in 4.3.3 and earlier only . . .
上述編碼和解碼的示例中突出顯示了以下統計資訊:
如果您看到大量旁路流量,則DRE壓縮比將小於預期。這可能是由於加密流量、小型消息或其他不可壓縮的資料造成的。考慮聯絡TAC以獲得進一步的故障排除幫助。
如果您看到大量LZ旁路流量,這可能是由於大量加密流量(通常不可壓縮)造成的。
平均延遲數對於調試吞吐量問題非常有用。根據平台,編碼和解碼的平均延遲通常為ms的個位數。如果使用者遇到低吞吐量,並且這些數字中的一個或兩個都較高,則表明編碼或解碼有問題,通常在延遲較高的一端。
使用show statistics dre detail命令檢視DRE統計資料可能很有用,例如最舊的可用資料、快取記憶體大小、已用快取記憶體的百分比、使用的雜湊表RAM等,如下所示:
WAE# sh stat dre detail Cache: Status: Usable, Oldest Data (age): 10h <-----Cache age Total usable disk size: 311295 MB, Used: 0.32% <-----Percent cache used Hash table RAM size: 1204 MB, Used: 0.00% <-----Output from here is in 4.3.3 and earlier only . . .
如果您沒有看到顯著的DRE壓縮,可能是因為DRE快取沒有填充足夠的資料。檢查快取記憶體使用時間是否較短並且使用的快取記憶體是否少於100%,這將表明出現這種情況。隨著快取記憶體填充更多資料,壓縮率應會提高。如果100%的快取被使用,並且快取時間較短,則表明WAE可能過小而無法處理流量卷。
如果您沒有看到顯著的DRE壓縮,請檢視命令輸出的以下部分中的Nack/R-tx計數器:
Connection details: Chunks: encoded 398832, decoded 269475, anchor(forced) 43917(9407) <-----In 4.3.3 and earlier only Total number of processed messges: 28229 <-----In 4.3.3 and earlier only num_used_block per msg: 0.053597 <-----In 4.3.3 and earlier only Ack: msg 18088, size 92509 B <-----In 4.3.3 and earlier only Encode bypass due to: <-----Encode bypass reasons remote cache initialization: messages: 1, size: 120 B last partial chunk: chunks: 482, size: 97011 B skipped frame header: messages: 5692, size: 703 KB Nacks: total 0 <-----Nacks R-tx: total 0 <-----Retransmits Encode LZ latency: 0.133 ms per msg Decode LZ latency: 0.096 ms per msg . . .
Nacks和R-tx計數器通常應該相對於流量低。例如,大約每100 MB原始(未最佳化)流量有1個。如果看到計數明顯增加,可能表示DRE快取同步問題。使用clear cache dre命令清除所有裝置上的DRE快取,或聯絡TAC。
編碼旁路原因計數器報告由於各種原因而旁路的位元組數。這可幫助您確定導致旁路流量的原因(不可最佳化的資料模式除外)。
識別連線的和活動的對等WAE並檢視對等統計資訊(可以使用show statistics peer dre命令執行以下操作)有時會很有用:
WAE# sh stat peer dre Current number of connected peers: 1 Current number of active peers: 1 Current number of degrade peers: 0 Maximum number of connected peers: 1 Maximum number of active peers: 1 Maximum number of degraded peers: 0 Active peer details: Peer-No : 0 Context: 65027 Peer-ID : 00:14:5e:95:4a:b5 Hostname: wae7.example.com <-----Peer hostname ------------------------------------------------------------------------------ Cache: Used disk: 544 MB, Age: 14d23h <-----Peer cache details in 4.3.3 and earlier only Cache: Used disk: 544 MB <-----Peer cache details in 4.4.1 and later only Peer version: 0.4 <----- Ack-queue size: 38867 KB | Buffer surge control: |<---In 4.3.3 and earlier only Delay: avg-size 0 B, conn: 0, flush: 0 | Agg-ft: avg-size 20902 B, conn: 388, flush: 0 | remote low-buff: 0, received flush: 0 <----- Connections: Total (cumulative): 3226861, Active: 597 Concurrent Connections (Last 2 min): max 593, avg 575 . . .
此命令的其他輸出顯示與單個連線類似的編碼和解碼統計資訊。