Answered Priming -B and -B2 on database startup

Chris Hughes

ProgressTalk.com Sponsor
I've seen this question asked about every database platform I've ever worked on without a sensible solution but want to check my understanding is correct here for OpenEdge.

on 10.2b+ I have a 4GB database, assume my -B is 1GB and my -B2 is 2GB (LRU not activated).
If I start this DB, then immediately run a proutil dbanalys, every block gets read.
Therfore my B2 is populated as I don't fill it, my B has the last 1GB of data I read.

Therefore users don't need to read any B2 from disk and although my B is full they stand a better chance of grabbing a cached block than if I hadn't ran the analysis.

Promon seems to support my theory just looking for some confirmation by the experts :)

Thanks in advance
 

TheMadDBA

Active Member
Assuming you have the B2 sized large enough to hold every object... then yes that is correct. You can also run dbanalys (or tabanalys/idxanalys) once per storage area. I have used that trick before to help speed up dumps of heavily fragmented tables. Or used dd to load up all of the extents into the unix buffer cache when I was stuck with a large DB on 32 bit Progress.

You can see the buffer pool fill up just like when you run a probkup without the -Bp option.

If you should do it is an entirely different question though :D
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
You could also do some code generation to write a program to read all ABP-assigned tables, with all ABP-assigned indexes. I wrote a quick 'n dirty program to do this recently as part of a -B2-sizing exercise.

But this might be slower than TheMadDBA's methods of using dd or dbanalys; it would depend on your data and your assignments.

It also depends on your application. If you have a business-hours app and you want it to be fast for users first thing in the morning, and you're doing this maintenance at 03:00, go nuts and do lots of reads to warm up the caches. But if you're 24/7 and need low latency like some of my clients, flooding the system with I/O requests could be counter-productive and make transactions time out.

In short, YMMV. :)
 
Top