Páginas filhas
  • GridServer - How to configure

Information and Configuration of Grid environment

Product:

Microsiga Protheus

Versions:

11 and 12

Description:

Processing Grid is an environment prepared to run processes simultaneously using more than one server. The application and/or program responsible for the process is designed to run independent fractions of this process, which are distributed to other servers and executed in parallel.


The AdvPL Processing Grid is a component integrated Framework to the AdvPL language, which offers infrastructure for running distributed specialized processes. It is responsible for controlling the optimized distribution of processing requisitions and for handling exceptions.


It is not any ERP routine that is prepared to be used in the Grid. Some routines meet the criteria of parallelism and adherence to Grid usage conditions, so you can set such parameters to use the Grid infrastructure of AdvPL processing. To know if certain routine is ready to be run in Grid, contact the support team in charge of the respective module.


The execution of processes in Grid needs an Application Servers separated group. The group is composed by a main AppServer called GridServer or Coordinator, and, at least, more two AppServers called GridAgents. These AppServers must be set to run only the Grid service, and it must not execute other Jobs or applications.


The group of AppServers (GridServer and GridAgents) may be set in the same server or different servers, However, the servers must have access to each other in the network.


To start the configuration of a Processing Grid, first copy Appserver folder (Protheus binary) and rename them in order to identify the GridServer and the GridAgents. After copying, edit the appserver.ini files as guidelines below.

GridServer Configuration - Distributed Processes Coordinator


This is an Application Server configured to exclusively run the process (JOB) of controlling and distributing agents and processes in Grid (GridServer). It must not be a service that runs other applications or JOBS. You must not even add it to the list of load balancing servers.

To set the configuration, you must create the GridServer service.

Example of an appserver.ini configuration file of GridServer:


Block Code
[ONSTART]
Jobs=GridServer
RefreshRate=15

[GridServer]
Main=GridServer
Environment=P12
MinProcAgent=3

[GridAgent]
Main=GridAgent
AgentIp=10.172.55.65
AgentPort=1217
Instances=3,3
Environment=P12
CoordServer=10.172.55.65
CoordPort=1217



1. You must specify the GridServer job in section [OnStart] of the service, and call the management function GridServer.
2. You must configure the GridServer exclusively for one environment.
3. Use IP address
4. MinProcAgent line refers to the minimum quantity of agents of Grid processing in the structure



Configuration of GridAgents – Agent Executing Processes


After having already set the GridServer to the environment, create the section configuration [GridAgent] to each of the Agents for the same Environment used in the GridServer.

Example of an appserver.ini configuration file of GridAgent:

Code Block
[ONSTART]
Jobs=GridAgent
RefreshRate=15

[GridAgent]
Main=GridAgent
AgentIp=10.172.55.65
AgentPort=1219
Instances=3,3
Environment=P12
CoordServer=10.172.55.65
CoordPort=1217



Notes:

The JOB GridAgent must be entered in the [OnStart] section of each Agent, and the RefreshRate key set to 15 seconds, thus setting a time interval for the service to check the number of agent processes online.



2. The only necessary change of these settings between each Agent will be the TCP key indicating the port it starts and the AgentIp and AgentPort keys, where you must indicate the IP address and port of the AppServer of this server that is responding to the GridServer.


IMPORTANT: Do not use "localhost" in this configuration, because this would force the GridServer service and all other grid agents and clients to be in the same server. This agent configuration requires the IP of the server in which this service is running, because the GridServer will use this information to notify Grid client processes which agents are allocated to it.


3. The AgentIp line indicates the IP of this server where this Agent is, and the AgentPort line indicates the port that is in the TCP section of this AppServer.


4. The Instances line indicates the initial amount of Threads that will be used and the maximum amount.


5. The CoordServer line should point to the server IP where the GridServer is, and the CoordPort line, the GridServer Appserver port


Additional Settings:

The following lines can also be added to the [GridAgent] section:

GridLog=1 (Enables the creation of an execution log for the agent with key enabled) GridProfiler=1 (Enables the generation of the profile of the request of agents (For the operation of this GridLog key must be activated))



If the configurations are OK, the consoles must display these messages:
GridServer Console

GridAgent - Console


Additional information

Many limiting factors influence the decision of how many processes to enter for each Agent in the Grid environment. Thus, configuring a high number of instances for the agent may degrade the performance of the entire environment or reach the limits of the infrastructure in use, such as the CPU of the database computer and/or the network traffic between servers, harming the performance for all users connected to the environment.


So you must first configure only one instance, or two instances at the most, of the Agent process for each TOTVS License Server and the like). Application Server slave service, to then run a program using the Grid infrastructure and check whether these parameters did not create any bottleneck in the infrastructure (CPU use 100%). You should also check the TOTVS DBAccess Database computer and the Master computer (c-tree Server, TOTVS License Server and likeables).

If you do not detect any significant performance loss in the application, and if some surplus of resources is available to this process, you can increase the Agent instances by one unit and redo the test.

Consumption of licenses

The AdvPL processing grid is a component of the AdvPL Framework, which provides a control layer for the distribution of processes. The consumption of licenses for the Grid processes depends on the implementation of the ERP functionality coded by the product development team to use the Grid. For example, the payroll calculation is a process you can run in Grid. To know the consumption rules of payroll calculation in Grid, open a ticket and inquire the SIGAGPE module development team.









  • Sem rótulos