Changing system parameters like gcluster_rebalancing_concurrent_count in GBase 8a can be done in two ways — one gives you instant effect with a catch, the other is permanent but requires a restart. Here's how both work in a gbase database.
Two Approaches at a Glance
| Method | How | When It Takes Effect | Persistence | Best For |
|---|---|---|---|---|
| Config file | Edit .cnf / .conf files |
After restarting the module | Permanent | All parameters, especially read-only ones |
| SET GLOBAL | SET GLOBAL param = value; |
New sessions immediately | Lost on restart | Dynamic, tuneable parameters |
| SET SESSION | SET [SESSION] param = value; |
Current session only | Session ends | Debugging or one-off queries |
Example: Adjusting Rebalance Concurrency
The parameter gcluster_rebalancing_concurrent_count controls how many tables can be rebalanced in parallel. It's a performance tuning knob that supports dynamic change.
Method 1: SET GLOBAL (Immediate, for Quick Tuning)
SET GLOBAL gcluster_rebalancing_concurrent_count = 5;
-- Verify in a new session
SHOW GLOBAL VARIABLES LIKE 'gcluster_rebalancing_concurrent_count';
New rebalance tasks will use the updated count instantly. Already running tasks are unaffected.
Method 2: Config File (Permanent)
Edit the gcluster config file at $GCLUSTER_BASE/config/gbase_8a_gcluster.cnf, find or add:
gcluster_rebalancing_concurrent_count = 5
Then restart the module:
gcluster_services gcluster restart
After restart, this value becomes the new default. Any SET GLOBAL changes made before the restart will be replaced by the config file value.
Key Points
- Read‑only parameters (e.g., security settings) can only be changed in config files and require a restart.
-
Parameter prefixes tell you which file to edit:
gcluster_→gbase_8a_gcluster.cnf,gbase_→gbase_8a_gbase.cnf. -
Always verify with
SHOW GLOBAL VARIABLESandSHOW VARIABLESto confirm the effective value at global and session levels.
Recommended Workflow
| Scenario | Method | Why |
|---|---|---|
| Online tuning, instant effect | SET GLOBAL |
No restart, quick validation |
| Make permanent, standardize config | Config file + restart | Survives restarts |
| Temporary debug | SET SESSION |
Minimal scope, safe |
| Read‑only parameter change | Config file + restart | Only option |
For performance parameters, the best practice is: test with SET GLOBAL first, then persist the winning value in the config file, and restart during a maintenance window to make it stick. This gives you both agility and long‑term stability in your gbase database.
Top comments (0)