Today, I read the blog of Uwe Hesse about multiple dbverify sessions accessing one large datafile in parallel. I had some doubts if running multiple dbverify in parallel can significantly speed up the verification process but it looked like a good idea to me, so I decided to write a perl script to fetch size of the datafile, then spawn dbverify processes according to the desired parallelism.

Here’s the test result:

As you see, it took about 17 seconds to process 2 GB data file with dbverify. Then I run my script to run dbverify in parallel:

It took only 11 seconds. Not a significant improvement but all these tests are done in a virtual machine and I only processed about 2 GB datafile. If you test it on bigger datafiles, you can get surprising results. I used “date” function to measure the time, and I cleared the Linux Filesystem read cache between tests (and repeated the tests multiple times to be sure about the results).

If you want to test dbverify in parallel, you can download the perl file (dbvp.pl) and test it by yourself:

dbvp.pl

 

My script (dbvp.pl) takes only 2 arguments: filename and parallelism (number of threads). For example the following command will let dbvp script to spawn 5 dbverify processes to check the datafile:

Because it uses dbv, you should set ORACLE_HOME and PATH variables according to your Oracle Home. I should say that I wrote this script just for fun and tested only on 11gR2, so there’s no guarantee that it would work on any other system. Anyway, if you find any bug, you may contact me and ask for a fix. If you like it, you can use it as you wish.

One Response to “Dbverify (dbv) in parallel”

  1. Hi Gokhan!

    Thanks for shared interesting informtion and your script. It is very useful. Thanks Uwe, too.

    Mahir

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">