May 28, 1996 - Sony Computer Science Laboratory Inc. .... (2;4), and when S = (3;4;7;9;10;13). 1. 111 ... Figure 3: Gene exchange mechanism with crossovers.
Gene-Exchange-Based Autonomous Dynamic Load Balancing Model Toru Ohira, Ryusuke Sawatari,Mario Tokoro SCSL-TR-96-011 May 28, 1996
Sony Computer Science Laboratory Inc.
3-14-13 Higashi-gotanda, Shinagawa-ku, Tokyo, 141 JAPAN
Copyright c 1996 Sony Computer Science Laboratory Inc.
In the proceedings of the International Conference on Neural Inforamation Processing (ICONIP'96), pp.816 (Springer) September, 1996, Hong Kong
Gene-Exchange-Based Autonomous Dynamic Load Balancing Model Toru Ohiray, Ryusuke Sawatariz, Mario Tokoroyz
y Sony Computer Science Laboratory 3-14-13 Higashi-gotanda, Tokyo 141, Japan (ohira, mario)@csl.sony.co.jp
z Department of Computer Science Keio University, 3-14-1 Hiyoshi, Yokohama 223, Japan (sawatari, mario)@mt.cs.keio.ac.jp
Abstract
This paper emphasizes the role of genes as information carriers, encoding properties of individuals in a mutually interacting environment in order to construct a model autonomous load distribution system. The model deals with a system comprised of many mutually connected and communicating computational units. Each unit encodes its dynamically changing load distribution into \gene" packets and exchange them with its immediate neighbors. Based on the local transaction of these genes, each processor decides locally on task transactions, rather than using a central control unit or a global tness function. We found through simulation experiments that crossover procedures on genes from neighboring units can enhance the autonomous load distribution eciency. Based on these simulation experiments, we infer and discuss the general characteristics of the emergent behavior of this gene-exchange-based model as well as a direction for implementation on a real computer network.
1
Introduction
A standard GA emphasizes the adaptation aspect of evolution with a selection mechanism based on a global tness function [1]. Other aspects of the functions of genes and genetic operations are also important in nature. Genes act as compact carriers of individual information and genetic operations help the spatial spread of information and help to maintain of diversity. The main theme of this paper is to use this latter aspects of genes and genetic operations in trying to construct an emergent adaptive system composed of many simple units, each of which encodes its information onto genes, exchanges genes with its neighboring units, and takes action based on local decision rules rather than referring to a global tness function. As a concrete example, we propose a gene-exchange-based dynamic load balancing model and a simulation study applied to a 1-dimensional network. In a dynamic load balancing task, where processes are given to the network one after the other, we would like to have the network better spread its load autonomously without a central control unit (see e.g. [2]). In the model, each computational unit encodes its current load information onto binary genes in a distributed manner with a certain scheme. It then exchanges the genes with its two neighbors to obtain its local load information. When a process arrives at a particular computational unit, the unit decides whether it should process the task or transfer it to either of its two neighbors with lower loads based on the local information read from genes. We have found through simulation that when we further introduce crossovers of genes from neighboring units, the spread of the load over the network is improved. We examine the eect of crossovers with quantitative data from simulation experiments with varying conditions. Based on these simulation experiments, we infer and discuss the general characteristics of the emergent behavior of this gene-exchange-based model as well as a direction for implementation on a real computer network.
2
2. Model
2
Model
In this section, we describe the dynamic load balancing model based on the gene-exchange mechanism. 2.1
Architecture
The model we discuss here is for a one{dimensional ring network of processors (Fig.1). However, the (c) (a)
(b)
Figure 1:
Schematic view of the dynamic load balancing system model with gene-exchange.The elements are (a)processor, (b)gene, and (c)process (task).
model itself is general enough to extend to general network architectures. The aim of the model is the better distribution of tasks, which are introduced to processors in the network one after the other, based solely on local information exchange and local decisions. The network does not possess a central control unit or a global tness function to evaluate the distribution strategy. Rather, it relies on an emergent behavior based on local actions and decisions based on gene exchanges. We consider the load balancing of two properties in each processor in the network: CPU capability (Pc ) and memory capability (Pm ). Hence, each processor's state is characterized by these two variables (Pc ; Pm ). The computational tasks (processes) are given to the network at a xed time interval . During processing, each task is assumed to consume the resources of a processor and decreases its computational capability by (dc ; dm ). Each task is assumed to be processed in time L once a processor starts processing. Hence, the load on the network changes dynamically. The actions of each processor are as follows: At each time step, each processor encodes its current load state (Pc; Pm ) onto a gene in the manner described in the following sub-section. Then it exchanges copies of the gene with its two neighbors. Each processor creates a new gene based on the crossover and rotation mechanism described below. These process are repeated iteratively. When a task is given to a processor either from outside or from one of its two neighbors, it decodes information written onto the genes of neighboring sites. It then computes the following local decision function to choose the best site to move the task.
V = wc Gc dc + wm Gm dm
(1)
where Gc and Gm are information decoded from genes, and wc and wm are parameters to control the decision weighting between memory or CPU. If V is largest for that processor, then the processor starts to process the task itself and its state changes to (Pc 0 dc ; Pm 0 dm ). If one of its neighbor has the largest V , it passes the task to its neighbor. These two actions, gene transactions and task transactions, of each processor is repeated aiming to distribute tasks to more processors in the network without a global evaluation. 2.2
Information Coding onto Genes
The method of coding the processor state is described here. We employ a \distributed representation" of information coding (e.g. [3]). In this representation, bits on the gene collectively carry the information encoded. This is analogous to information representation in neural networks, where the collective activity of neurons in the network encode information, rather than a single neuron representing particular information (see e.g.[4]). We will now describe our \distributed encoding" scheme. We number each bit from the left of the gene 0 through n. Two pieces of information (Pc ; Pm ) for the processors are encoded.
3
2. Model
For this we randomly pick Pc numbers from the even integers 0 though n. In the same manner, we pick Pm odd numbers. The set S is de ned as the set of Pc + Pm numbers picked from [0; n]. The 0th bit on
the gene is chosen to be 0 or 1 randomly. The 1st bit is set to be dierent from the 0th bit, if the number 1 is found in the set S . Otherwise, it is set to be the same as the 0th bit. We repeat this procedure for the entire gene. Namely, if k is in set S , the k + 1th bit is set to be dierent from the k th bit. Otherwise, the k + 1th bit is set to be the same as the kth bit. In Figure 2, we gave the example of (Pc ; Pm ) = (2; 4), and when S = (3; 4; 7; 9; 10; 13). Bit #
0
1
3
4
5
0
0 0 0
1
0 0
Figure 2:
2
6
7
8
0 1
9
10
1 0
11 12
13 14
15 16
1
1
0 0
1
0
Example of a gene with the proposed encoding scheme.
This encoding scheme is a rather complex scheme to encode two pieces of information. The following points, however, are advantages. First, each bit in this coding carries an equal small amount of information. Hence, information deterioration due to errors in encoding or decoding is kept small. Secondly this uniform bit encoding can take advantage of operations such as crossovers used in genetic algorithms. The third point gives a potential security function. Note that each bit is used and shared by both pieces of information and that there are multiple representation for a single set of information . This fusion of multiple pieces of information over randomly distributed bits could be developed for security purposes. 2.3
Gene Exchange Mechanism
Each processor in the network encodes its current state onto its gene in the manner described in the previous subsection. The simple local gene transaction is to exchange copies of these genes with its two neighbors. Thus, each processor will have three genes including its own from which it can decode information to decide whether it should process a task or pass it to one of its neighbors. We call this gene transaction \no-crossover exchange." By passing the tasks iteratively to processor of more processing power, this exchange method can achieve task distribution. As will be shown in the next section , however, the gene transaction with crossover can improve the load balancing performance. The mechanism of gene exchange with crossover is as follows (Figure 3). After the initial genes are created
a
b
c
c a b
(1)
c a B
(2)
b’
(3)
rotate
Figure 3:
Gene exchange mechanism with crossovers.
with the encoding method described above, each processor performs a crossover of neighboring genes. For the 1{dimensional network, one third of the gene slices from two genes from neighbors and from its own gene re ecting its current state are needed. Then, the bit position of the created gene is rotated by a random amount. The \crossed gene" constructed in this manner does not re ect directly the (Pc ; Pm ) of its processors state. Rather, it re ects roughly the \average state" of neighboring processors, which
4
3. Simulation Results
we denote as (Gc ; Gm ). The iterative procedure of this gene transaction carries the processors' state information spatially. The random rotation procedure is introduced to prevent some part of the gene information simply being passed from one to the other. In this \crossover exchange," a processor bases its decision for a task transaction by comparing the crossed genes, decoding (Gc ; Gm ) from neighboring processors and evaluating the local decision function V
3
Simulation Results
In this section, we consider how the proposed model described in the previous section performs as a dynamic load balancing model. The model network contains N = 80 processors. For simplicity, we consider that all processors are of equal capability with quantized levels of 0 Pc 180 and 0 Pm 200. In order to accommodate these levels, the gene length is set to be 400 bits. We set the basic time step t = 1 as the time taken for the processor to update its genes. The tasks has a xed \lifetime" of L which is introduced from a single point in the network at a xed frequency with a time interval of . The \weight" of each task on the processors' CPU and memory are set to be dc = 20 and dm = 20. The balance between CPU and memory in the local decision function is set to be equal with wc = wm = 0:5. With the above parameters set, we compare the two gene exchanged models with and without crossovers. As a measure of model performance, we have rst tracked the number of processors in use in the network. The more processors are used, the better the loads are distributed. Examples of simulation results with varying L and are shown in Figure 4. (Simulations are repeated 100 times for each parameter set and the average number of busy processors are plotted.) Figure 5 shows the load distribution on the CPU at a sample time. We clearly observe that the crossover exchange model (a)
(c)
(b)
20
20
15
20
15
X
15
X
X
10
10
10
5
5
5
0
25000
50000
75000
0
25000
50000
75000
0
25000
Figure 4:
50000
75000
Time
Time
Time
Number of busy processors, X, as a function of time with the crossover model (solid line) and non-crossover model (dashed line). The parameters are (a) = 10000, = 400, (b) = 15000, = 450, and (c) = 20000, = 500.
L
(a)
L
(b)
proces s ors
Figure 5:
L
proces s ors
Load distribution on CPU over the network. (a) crossover model (b) non-crossover model. The parameters are = 2500. The data is taken at time = 150000.(The load distribution on memory is similar.)
L = 100000, and
t
enhances the load balancing nature of the system. It is generally found as shown in the gures that the crossover procedure is more eective when the \lifetime" of tasks are longer. To gain more insight into the system, we next plotted the average time for a task to \migrate" over the network before it is started to be processed by one of the processors (Figure 6). The gure shows that the tasks in the crossover model require more time to \migrate" over the network. This re ects a part of the inevitable trade-o for this setup of single point introduction of tasks onto the network: it takes more time to distribute tasks further away from the point of introduction. It should be noted, however, that the increase in migration time with the crossover model as we increase the lifetime of the tasks is not substantial compared to the increase in task distribution.
5
3. Simulation Results
(a)
5
T
(b)
5
4
4
3
T 3
2
2
1
1
1
0
0
0
25000
50000
75000
(c)
5 4
T
3 2
25000
50000
75000
25000
Figure 6:
50000
75000
Time
Time
Time
Average migration time of tasks, T, as a function of time with the crossover model (solid line) and non-crossover model (dashed line). The parameters are (a) = 10000, = 400, (b) = 15000, = 450, and (c) = 20000, = 500.
L
L
L
Next we turn our attention to the eect of errors in gene transaction information between the two models. We simulated the situation as a decoding error. When a processor decodes information from the genes, it reads (Gc + c ; Gm + m ). The c and m are parameters to specify the size of decoding errors, and is a random variable in (0; 1). We have compared how the average number of busy processor can be aected by this error with and without the crossover model. The simulations are performed with the same set as above with L = 20000 and = 500. The average number of busy processor is taken as t = 30000 and plotted against varying = c = m . (Figure 7). 20
(a)
18
X
16
(b) 14 12 10
2
4
6
8
10
12
14
16
α
Figure 7:
Average number of busy processors, X, as a function of increasing decoding errors, model, and (b) the non-crossover model.
, with (a) the crossover
We see that the increased decoding error gradually destroys the enhanced load balancing capability which comes from using crossovers. The reason is thought to be destruction of local information passing by decoding errors. It should be noted, however, that the model with crossover keeps its advantage in load balancing up to around an error of magnitude up to around 10% of the bits on each gene. We have considered decoding errors in our simulation. The cause of the error, however, can be other factors such as errors during transmission. Though the detailed behavior would be dierent, we expect from our results here that the model with crossover can tolerate a certain amount of such errors. Through these simulation results, the model with crossover can be more eective when the transaction time of tasks is not substantial compared to the \lifetime" of the tasks. One eect we infer from the better distribution of the model with crossover is that the \local minima" in the computational capability are \smoothed out" better by the crossover. Also, the crossover model can maintain its eectiveness, thought it diminishes gradually, in the presence of decoding errors. More thorough quantitive analyses and simulations are needed to fully uncover the eect of the role of crossovers in spreading information spatially.
4. Discussion
4
6
Discussion
The proposed model here belong to a class of models aiming at \emergent computation." Related models spans from researches in such areas as distributed arti cial intelligence [5, 6] and arti cial neural networks, to network computation models [7, 8]. The major challenge in such models are how one can design a local rules or strategies without a global or central evaluation function or unit for the eective collective information behavior to emerge. Our model here is an application of ideas used in GA aiming at an emergent computational system. There are a couple of discussion points. The rst point is that the function of crossover in this context is similar to the simulated annealing scheme for neural networks [9]. Just as stochastic updating of the system enhances the chances of jumping out of the local minimum, the crossovers here introduce the chance of coming out of local minima. The dierence is that our model is achieving this through a local information diusing process, rather than using external noise. The second point is that we have seen more oscillatory behavior in the dynamics of load distribution. We belive that this is related to the delay in the transmission of information due to local crossover. Though it is microscopically intricate, analytical concepts such as \Delayed Random Walks"[10] could be used to describe the macroscopic structure of such behavior. Finally, we are currently looking in the direction of implementation on an actual computer network. The basic design of the model can be transformed rather transparently, and this is under way. Problems may arise from the more asynchronous nature of real multiple computer activities. Analysis of the behavior of real network systems, however, is expected to lead us to more insight into the design of autonomous emergent information processing systems.
References [1] J. Holland, Adaptation in Natural and Arti cial Systems. Michigan: University of Michigan Press, 1975. [2] S. Chowdhury, \The greedy load sharing algorithm," Journal of Parallel and Distributed Computing, vol.9, 1990. [3] T. Ohira, R. Sawatari, and M. Tokoro, \Distributed interaction with Computon" in Agents Breaking Away, W. Van de Velde and J. W. Perran (Eds.), Lecture Notes in Arti cial Intelligence 1038. Berlin, Springer, 1995 [4] J. Cowan, \Fault and Failure Tolerance," Santa Fe Institute Technical Report 95-10-096, July 1995. [5] J. Rosenshein and M. Genesereth,\Deals Among Rational Agents," Proceedings of IJCAI-85, pp.9199, 1985. [6] G. Zlotkin and J. Rosenschein, \Negotiation and Task Sharing Among Autonomous Agents in Cooperative Domains," Proceedings of IJCAI-89, pp.912-917, 1989. [7] B. Huberman, (Ed.) The Ecology of Computation, North-Holland, 1988. [8] M. Tokoro, \Computational Field Model: Toward a new computational model / Methodology for Open Distributed Environment," Proceedings of Workshop on OS for the 90s and Beyond, Kaiserslautern, Germany, July, 1991. Also Available as Sony Computer Science Laboratory Technical Report TR-90-006, June, 1990. [9] S. Kirkpatrick et al., \Optimization by Simulated Annealing," Science, vol. 220, pp. 671-680, 1983. [10] T. Ohira and J. Milton, \Delayed random walks," Physical Review E, vol. 52, No. 3, pp. 3277-3281, 1995. Also Available as Sony Computer Science Laboratory Technical Report TR-94-026, November, 1994.