How to get Redo Rate per second

oracle

I am configuring data guard. So I want to calculate required bandwidth as formula:

Bandwidth in MBPS = (redo bytes per sec /0.7)8)/1,000,000

Can someone explain how would I be able to calculate the Redo bytes per second in order to calculate the above formula? I'm using Oracle 11g.

Regards,

Sarith

Best Answer

GV$ARCHIVED_LOG contains information about each archived log file that was generated (archived logs are just archived versions of the redo logs). So you can query that. Something like

SELECT SUM(blocks*block_size) total_bytes
  FROM gv$archived_log
 WHERE first_time BETWEEN <<some start date>> AND <<some end date>>

will give you the total amount of redo generated over that period of time. Divide by the number of seconds between the dates to get a redo rate. You'll need to use a date range that is large enough given the number of redo log switches you see to avoid huge variations if a log switch happens just before or just after the window but not so large that you average out an entire day's activities and find that you don't have enough bandwidth to handle peak redo load. It's probably reasonable to find the hour or two during the day that constitutes your peak load and compute the rate of redo generation over that window for, say, a week.