Tech Tip: DB2 HADR Simulator
Adam Koile 270000GAYM Visits (3890)
IBM DB2 Support has put out the following developerworks page:
This simulator will help you to better tune DB2 HADR and the network settings with out impacting current performance on the system. It is recommended you run the simulator when the systems are most active.
In addition you can use the db2flushsize.pl (perl script) against the largest log files you have to find the largest flush size. Once you have the number you will need to * 4096, then use the number to increase the DB2_HADR_SOSNDBUF and DB2_HADR_SORCVBUF accordingly.
For example lets say if the largest flush size is 55 pages then DB2_HADR_SOSNDBUF and DB2_HADR_SORCVBUF needs to be 55 * 4096 bytes or bigger.
run "db2flushsize <logFile1> <logFile2> ... <logFileN>|tee db2flushsize.out"
Click here is to download the db2flushsize.pl
You can also use the number for the -flushSize option in simhadr.
You need to first pick the simhader for you OS:
If you need the simulator on other platforms, email db2h
Once you have done that you need to run it on both the primary and standby. An example of this would be:
On the PRIMARY do:
simhadr -role p -syn
On the STANDBY:
simhadr -role s -lho
The above commands are just examples you may need to add more or less flags, in addition you will need to fill in the values according to the db2 db cfg settings you have for each machine. For more information on the command options for simhadr see the following link:
In addition here are some other links that may help in tuning HADR better:
For additional tuning of HADR see the following two tools:
Click here for step by step guide on using those tools.