goldengate的datapump調優

myownstars發表於2013-05-12
Excessive LAG on OGG extract Data Pump Sending Data Over WAN, calculate TCP TCPBUFSIZE TCPFLUSHBYTES [ID 1071892.1]
Version 10.4.0.12 and later
症狀:
datapump程式嚴重lag,並未達到預期的網路吞吐量

誘因:
OGG的tcpbufsize預設30000位元組,對繁忙網路設定過小;
系統沒有啟用tcp window scale;
系統的socket buffer過小;

診斷:
先透過ping檢視RTT,並計算實際吞吐量;
開啟tcp window scale;
提升socket buffer;


$ ping -s target 56 4
PING target: 56 data bytes
64 bytes from target.mydomain.com (10.221.65.15): icmp_seq=0. time=39. ms
64 bytes from target.mydomain.com (10.221.65.15): icmp_seq=1. time=39. ms
64 bytes from target.mydomain.com (10.221.65.15): icmp_seq=2. time=39. ms
64 bytes from target.mydomain.com (10.221.65.15): icmp_seq=3. time=39. ms
----redsap58 PING Statistics----
4 packets transmitted, 4 packets received, 0% packet loss
round-trip (ms)  min/avg/max = 39/39/39

由上可得rtt=39ms,假定頻寬為155Mbps,網路吞吐量=min(155M,socket_buffer/rtt),則socket_buffer=155M*rtt/8=755625 bytes
將tcpbufsize/tcpflushbytes設定為755625
RMTHOST target, MGRPORT 7809, TCPBUFSIZE 755625, TCPFLUSHBYTES 755625;
開啟tcp scale window;
增大socket buffer
net.core.rmem_max
net.core.wmem_max
net.ipv4.tcp_rmem
net.ipv4.tcp_wmem
net.ipv4.tcp_window_scaling

具體可參照
http://space.itpub.net/15480802/viewspace-757720

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15480802/viewspace-760890/,如需轉載,請註明出處,否則將追究法律責任。

相關文章