TCPIP Networks for DBAs

Preview:

DESCRIPTION

Everything DBAs should know about TCPIP networks - captures, firewalls, roundtrips, latency and bandwidth.

Citation preview

Everything a DBA Should Know about TCP/IP Networks

Chen (Gwen) Shapirahttp://prodlife.wordpress.com

My Stories

• ORA-12545 on connection to RAC• Job does not finish running• Reading 2M rows• Copying redo logs to DR site

Will Show

• Collect hard data – Don’t guess• When & What to tune• Back of the envelope calculations

ORA-12545 Connecting to RAC

Why guess when you can

Capture?

I want to connect

Go to that server! Bye!

Go where???

Solutions

• Fix LOCAL_LISTENER• Fix DNS

Batch Job Never Finishes

Capture on bothClient & Server

Run this procedure

ACK!

Hello? Are you alive? No?BYE!

Two hours later…

Waiting

The firewall is eating my packets!

Solutions

• Talk to network admin• Configure SQLNET.EXPIRE_TIME• Configure tcp_keepalive_time

Give Me 2M Rows ASAP

Start with Wait Events

SQL*Net Message to client-

Meaningless

SQL*Net Message from client-

Nearly Meaningless

Do the numbers make sense?

• Bytes Sent• Time• Roundtrips

Tune the ArraySize

• Or setFetchSize()• With 2M rows:• Fetch 10 => 200,000 Roundtrips• Fetch 5000 => 400 Roundtrips

(Don’t) Tune SDU

• Oracle’s buffer – 2K or 8K • Can set to max – 32K• Can set to multiple of 1476 byte• Highly unlikely target

Beware:Compulsive Tuning Disorder

Get Redo Logs to DR Site

Q1: Bandwidth?

OC3 => 155 Mb/s => ~ 70G/hour => ~ 60G with headers

Key problem:Line utilization

Q2: Latency?

TNSPing Roundtrip time – 500ms

Data < 1500 bytes

ACK500 ms

Data < 1500 bytes

ACK

155Mb/s * 500ms=9.6MBytes

Advertised Windows

• net.core.wmem_default• net.core.wmem_max• net.core.rmem_default• net.core.rmem_max

Congestion WindowW

indo

w S

ize

Time

Errors

WAN Accelarator

$

$$

$

Rememeber

• Collect hard data – Don’t guess• When & What to tune• Back of the envelope calculations

Questions?