When analyzing database performance, two engineers can read the same onstat -g glo output and reach completely different conclusions. One says the virtual processors (VPs) are idle, while the other believes they are overloaded.
The problem is often not incorrect data. It is how the metrics are interpreted.
In GBase Database (GBase 8s), understanding the difference between total and per sec values in VP statistics is essential for accurate performance monitoring and capacity planning.
1. Understanding onstat -g glo Output
Start by checking the virtual processor statistics:
onstat -g glo | head -20 The output lists virtual processors by class, including:
-
cpu: CPU virtual processors -
aio: Asynchronous I/O virtual processors -
lio: Logical log I/O virtual processors -
pio: Physical I/O virtual processors -
adm: Administrative virtual processors -
soc: Network-related virtual processors
The statistics include cumulative CPU information as well as total and per sec values.
These two measurements describe different aspects of database activity.
2. Total vs. Per Sec: What Is the Difference?
Total: Cumulative Activity
The total value represents accumulated activity since the instance started.
It is useful for understanding historical resource consumption, but it has an important limitation: uptime dilutes short-term activity.
For example, a GBase Database instance running for three months may experience a five-minute period of heavy VP activity. That short peak contributes very little to the overall cumulative total.
Looking only at total can therefore hide temporary performance pressure.
Per Sec: Activity Rate
The per sec value represents activity normalized by time.
It provides a more immediate view of VP activity and is generally more useful when investigating current workload pressure.
For performance troubleshooting, start with per sec and use total as historical context.
3. Why Cumulative Totals Can Hide Performance Spikes
Consider two executions of the same SQL workload.
Their cumulative total values may look similar, but one execution may show a per sec rate five times higher than the other.
If you compare only cumulative totals, you might conclude that both executions have similar resource consumption.
However, their actual activity patterns are very different.
The same problem appears when analyzing long-running database instances.
Imagine an instance that has been running for 90 days, with one VP experiencing a five-minute workload spike.
That short period contributes very little to 90 days of accumulated activity, but its per-second rate can clearly reveal the peak.
This distinction matters when evaluating GBase Database performance and planning additional capacity.
4. Use Consistent Sampling to Identify Real Trends
Although per sec is more useful for understanding activity rates, a single sample can be misleading.
For example, one measurement taken during a business peak may show unusually high VP activity. That does not necessarily indicate a persistent capacity problem.
A more reliable approach is to collect samples at consistent times across a complete business cycle.
For example, capture three samples at comparable time points each day for one week:
# Capture VP statistics with a timestamp onstat -g glo | head -20 > /tmp/vp_$(date +%H%M).txt For production monitoring, consider including the full date in the filename and recording the business period alongside each sample.
This makes it easier to compare:
- Normal business hours
- Peak transaction periods
- Batch processing windows
- Off-peak maintenance periods
The objective is to compare equivalent workload periods rather than unrelated snapshots.
5. Cross-Check VP Process IDs
Another detail worth checking is the process ID (pid).
Use ps -ef to cross-check process information:
ps -ef This helps verify process identities and avoid confusing a VP process with an unrelated operating-system process during troubleshooting.
Combining VP statistics with operating-system process information provides better context for resource analysis.
6. Make VP Metrics Useful for Capacity Planning
The key principle is simple:
- Use
per secto investigate activity rates and identify workload pressure. - Use
totalto understand accumulated activity since startup. - Use consistent sampling to distinguish temporary peaks from persistent trends.
- Compare the same VP classes across equivalent business periods.
For GBase Database capacity planning, a single high-rate sample should not automatically trigger resource expansion.
Look for consistently elevated rates across comparable workload cycles, then correlate the results with CPU utilization, I/O activity, and actual workload requirements.
Database performance metrics are meaningful only when interpreted in the right time window.
The same applies to capacity planning: understanding when resource pressure occurs is just as important as knowing how much activity has accumulated.
When analyzing VP performance in GBase Database, do you rely more on cumulative totals or per-second rates?

