- Disable load balancing: increased speed?
Managing the load balancing (dynamic load balancing on server)
Available only with this kind of connection
The server that is hosting a HFSQL database engine can be very busy.
The HFSQL server has a load balancing system.
This system is used to assign computer time to all the processes, to prevent one only process from taking up all the resources of the server.
Load balancing is enabled by default.
Two different modes are available:
- The automatic mode, that shares the resources according to the number of accesses to the server. A process that requires a lot of resources will share its execution time with smaller processes. Therefore, a large process will have no effect on the other accesses.
- The priority mode, that shares the resources according to their priority. A process with a high priority will use most of the server resources. This enables you to limit the resources of a client computer that runs a lot of simultaneous accesses: the other users will not be affected.
The priority mode can be managed "dynamically", without having to restart the server through programming (HPriority
For each user, a load factor is calculated for his operations performed on the server. This load factor is calculated in real time. The resources are allocated to the user according to this load factor.
In automatic mode, only this load is taken into account.
The load of each user is calculated from several coefficients. The importance of each counter can be modified in the formula for calculating the load of each user on the server. This setting (advanced feature) can be performed by the constants of HSetServer
Disable load balancing: increased speed?
In certain cases, the absence of load balancing can boost response times.
A significant improvement in performance can be observed, especially on powerful servers.
But each case, each server, each architecture is different on its own. there is no general rule!
OUR SUGGESTION: perform tests (performance measurements) on your production servers, with and without load balancing.
Don't hesitate to measure performance at different times during the day or week, or during the execution of heavy batches, etc.
For example, in general, for servers that are used mainly during the day it is recommended to disable load balancing for batches executed at night.
You will progressively discover the best settings to select for each configuration.
There are 2 methods to disable load balancing:
- Programmatically: with HSetServer(connection, hlbActive, false). This method does not require a server restart (see HSetServer). It is applied immediately.
This method through programming makes it possible to refine settings according to particular processes
- By manual configuration in the HFCONF.INI file: add the line LoadEnable=0 in the [INIT] section. This method requires a server restart.
This page is also available for…