Worker
From XtremWebCH Wiki
Contents |
Description
The worker module includes three components: the activity monitor, the execution thread and the communication manager.
Activity monitor
The activity monitor controls whether some computations are taking place in the hosting machine regarding parameters such as CPU idle time and mouse/keyboard activity. According to this monitoring, it processes the effective performance that can be provided by the worker and sends it to the coordinator via the Work Request.
Execution Thread
The execution thread extracts the assigned task, recreates its environment as provided by the coordinator (binary code, input data, directories structure, etc.), starts computation and waits for the task to complete.
Communication Manager
The communication manager of the worker is similar to the communication manager of the coordinator. It “spies” the workload of the network and splits output files into fixed size packets. A sleep time separates the transmission of two successive packets. This time depends on the load of the network load: the higher the load the bigger the sleep time.
Worker states
Each worker could be in one of the four states: ready to execute a task, receiving input data of the allocated task, running a task or sending output data to the warehouse.
When it is in a ready state, a worker sends periodically Work Requests to the coordinator to inform it about its availability. The worker passes to a receiving state if a task is assigned to it: the input data needed by the task is downloaded by the communication manager.
The third state (running) indicates that the worker is executing its allocated task.
A worker passes from running to sending state when the task finishes its execution; the result file is then uploaded to the warehouse.
Installation
The worker module can be downloaded from this page: http://www.xtremwebch.net/xtremweb.php
A given worker machine should be able to send requests to the coordinator machine on the three ports specified in the "xw.conf" file of the coordinator: XWPort, XWAlivePort and XWFilePort. In addition, every worker machine should be able to data file search requests to at least, one warehouse machine on these ports: 6666 and 2222.
After installing the worker module, the "xwrc" file located in the /bin directory should be updated in order to be compliant with the coordinator's configuration. Here is a detailed description of the xwrc file parameters. The optional parameters are marked by a star:
- dispatcher.host: IP address or URL of the coordinator
- dispatcher.port: port used by the worker to send Work Request (WR), Register Request (RR) and Work Result Signal (WRS) to the Coordinator. This port is fixed by the coordinator's adminitrator (XWport in the file xw.conf. The default value is 4322)
- login: account used by the worker to connect to the coordinator (by default: anonymous account)
- password: login's password
- p2p.upload (*): Output network bandwidth (default value:0)
- p2p.download (*): Input network bandwidth (default value:0)
- p2p.thisrepositoryfile: port used by the worker to send data files to other workers. This port is fixed by the worker's administrator.
- p2p.repositorymaxconnection: Maximum number of data files that can be sent at the same time by the worker to other workers (default value: 10)
- p2p.wanip: Public IP address of the worker (default value:0)
- localip (*): Private IP address of the worker. By default, this parameter does not exist in the xwrc file. It must be specified if the worker machine has a private IP address different form the public IP address.
- p2p.port: This parameter is not used any more in the current vesrion of XWCH. However, it should not be removed.
- xwchname: Identifier of the worker
- cpu.nb: Number of processors in the worker machine
- cpu.speed: Speed of the processor (expressed in term of Mhz)
- mem.total: memory size (expressed in term of Mbyte)
- restrictions.1.hours.from (*): Start of slot 1
- restrictions.1.hours.to (*): End of slot 1
- restrictions.2.hours.from (*): Start of slot 2
- restrictions.2.hours.to (*): End of slot 2
- restrictions.3.hours.from (*): Start of slot 3
- restrictions.3.hours.to (*): End of slot 3
The worker can be disabled during one or several slots of times. The slot number x is defined by the two parameters "restrictions.x.hours.from" and "restrictions.x.hours.to". Only 3 slots can be defined (x = 1, 2 or 3).
The xwrc file can be automatically generated by a java GUI which is available in the worker module package:
Windows platforms : java xtremweb.worker.WizardInstaller (or click on the "Confugure XtremWeb-CH" icon) Linux platforms : java -cp ../classes/lib/XWCH.jar xtremweb.worker.WizardInstaller
