ProTop monitors several application extent-related metrics to keep your extent management honest. It lets you know when you might be approaching a limit that will impair your chosen extent management approach. All of these are in etc/alert.*.cfg except where noted:
When using the variable extent management approach, you define a variable extent for each application data and index area in your database. Then you allow the database to grow those variable extents as needed. Typically you have a manageable extent size you prefer to work with (say ~250GB), and you want to know when any of your variable extents are around that size to stop that extent from growing further.
For this approach, we use the varGB alertable metric found in the StorageArea data collector as mentioned above. To be alerted once each day when a variable extent has reached and or passed 250GB:
varGB num >= 250 "" "daily" "Variable Extent &1 &2 &3" alert
When you receive the alert you defined above, add a new variable extent. This can be done online or offline with these steps:
prostrct [add|addonline] <dbname> add.st
The current variable extent is fixed at its current size, and the new variable extent is added.
prostrct list <dbname>
Do I Really Need Fixed Length (preallocated) Storage Areas?
The most common argument against variable-length storage areas is that there is a performance cost every time the area needs to grow. Technically, this is true. However, in the real world, the cost is less than negligible.
Don't believe us? How much does your database grow every month? In our experience, 1-2 GB of growth per month covers more than 98% of the databases out there. For our example, let's assume 2GB of growth per month on a system that is only running Monday-Friday, 9-5. That's 8 hours per day, approximately 21 days per month, or 168 hours per month. 2 GB of growth, divided by 168 hours = 12 MB per hour.
A 512 block per cluster storage area in an 8KB block size database will grow 4 MB, or one cluster (512 X 8192 bytes = 4 MB), per extension. This means that our theoretical database will grow 3 times per hour (12 MB of growth per hour, divided by 4 MB per expansion event). An ok SAN (not too fast, not too slow), can grow a file at approximately 10 MB/sec. Pull out your calculator, and you'll see that the "performance penalty" for our 2 GB / month database growth is 400ms, three times per hour.
There are cases when fixed-length data extents are preferred, but those situations are rare. Not sure? Ask the experts.
There could be an argument against variable length AI extents as these tend to grow quickly and continuously. However, our benchmark testing has shown that even for AI extents, the benefits of variable extents outweigh the minor performance cost. Or to put it another way, it is very rare that the business will notice the effect of variable length AI extents, even if the DBA can measure the degradation. Most OpenEdge OLTP applications are 98% read versus 2% write. A small degradation on a tiny portion of database activity is by definition negligible.
When using the fixed extent approach, you still have a variable extent defined for each application storage area, but only as a backup to your fixed extent approach; this is considered an OpenEdge database best practice. Should a last fixed extent fill (you missed the alert to add a new extent, for instance, because it grew too fast, etc.) and you do not have a variable extent defined, the database cannot grow and will shut itself down.
This approach involves monitoring the space used in the last fixed extent rather than the growth of the variable extent as described above. It relies on the pctLastX alert, which exists in etc/alert.cfg by default:
pctLastX num > 85 "" "daily" "Last fixed extent &1 &2 &3" alert # export PCTLASTX=yes in bin/localenv to enable
But, as the comment at the end of the line above indicates, it has to be enabled.
To be alerted once a day when any last fixed extent is 85% used:
export PCTLASTX=yes # enable alerts for the last fixed extent becoming full
When you receive an alert with the subject "Last fixed extent [num] > 85", follow these steps to add new fixed and variable extents. NOTE: This must be done offline as you have to remove the existing variable extent, which cannot be done online.
prostrct remove <dbname> d [area-name]
prostrct add <dbname> add.st
prostrct list <dbname>
Yes, ProTop can tell you when to add a fixed and or variable length extent to your database areas. Going with all variable or fixed plus variable extents is up to you. Once you configure ProTop accordingly, ProTop will watch your extents, so you don't have to.