Tối ưu hóa viễn thông và thích nghi Kỹ thuật Heuristic P14 pot

30 173 0
Tối ưu hóa viễn thông và thích nghi Kỹ thuật Heuristic P14 pot

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

14 Exploring Evolutionary Approaches to Distributed Database Management Martin J. Oates and David Corne 14.1 Introduction Many of today’s data intensive applications have the common need to access exceedingly large databases in a shared fashion, simultaneously with many other copies of themselves or similar applications. Often these multiple instantiations of the client application are geographically distributed, and therefore access the database over wide area networks. As the size of these ‘industrial strength’ databases continue to rise, particularly in the arena of Internet, Intranet and Multimedia servers, performance problems due to poor scalabilty are commonplace. Further, there are availability and resilience risks associated with storing all data in a single physical ‘data warehouse’, and many systems have emerged to help improve this by distributing the data over a number of dispersed servers whilst still presenting the appearance of a single logical database The Internet is a large scale distributed file system, where vast amounts of highly interconnected data are distributed across many number of geographically dispersed nodes. It is interesting to note that even individual nodes are increasingly being implemented as a cluster or ‘farm’ of servers. These ‘dispersed’ systems are a distinct improvement over monolithic databases, but usually still rely on the notion of fixed master/slave relationships (mirrors) between copies of the data, at fixed locations with static access configurations. For ‘fixed’ systems, initial file distribution design can still be complex and indeed evolutionary Telecommunications Optimization: Heuristic and Adaptive Techniques, edited by D. Corne, M.J. Oates and G.D. Smith © 2000 John Wiley & Sons, Ltd Telecommunications Optimization: Heuristic and Adaptive Techniques. Edited by David W. Corne, Martin J. Oates, George D. Smith Copyright © 2000 John Wiley & Sons Ltd ISBNs: 0-471-98855-3 (Hardback); 0-470-84163X (Electronic) Telecommunications Optimization: Heuristic and Adaptive Techniques236 algorithms have been suggested in the past for static file distribution by March and Rho (1994, 1995) and Cedano and Vemuri (1997), and for Video-on Demand like services by Tanaka and Berlage (1996). However as usage patterns change, the efficiency of the original distribution can rapidly deteriorate and the administration of such systems, being mainly manual at present, can become labour intensive as an alternative solution, Bichev and Olafsson (1998) have suggested and explored a variety of automated evolutionary caching techniques. However, unless such a dispersed database can dynamically adjust which copy of a piece of data is the ‘master’ copy, or indeed does away with the notion of a ‘master copy’, then it is questionable whether it can truly be called a ‘distributed’ database. The general objective is to manage varying loads across a distributed database so as to reliably and consistently provide near optimal performance as perceived by client applications. Such a management system must ultimately be capable of operating over a range of time varying usage profiles and fault scenarios, incorporate considerations for multiple updates and maintenance operations, and be capable of being scaled in a practical fashion to ever larger sized networks and databases. To be of general use, the system must take into consideration the performance of both the back-end database servers, and the communications networks, which allow access to the servers from the client applications. Where a globally accessible service is provided by means of a number of distributed and replicated servers, accessed over a communications network, the particular allocation of specific groups of users to these ‘back-end’ servers can greatly affect the user perceived performance of the service. Particularly in a global context, where user load varies significantly over a 24 hour period, peak demand tends to ‘follow the sun’ from Europe through the Americas and on to the Asia Pacific region. Periodic re-allocation of groups of users to different servers can help to balance load on both servers and communications links to maintain an optimal user-perceived Quality of Service. Such re-configuration/re- allocation can also be usefully applied under server node or communications link failure conditions, or during scheduled maintenance. The management of this dynamic access configuration/load balancing in near real time can rapidly become an exceedingly complex task, dependent on the number of nodes, level of fragmentation of the database, topography of the network and time specific load characteristics. Before investigation of this problem space can be contemplated, it is essential to develop a suitable model of the distributed database and network, and a method of evaluating the performance of any particular access and data distribution given a particular loading profile is required. This model and evaluation method can then be used for fitness function calculations within an evolutionary algorithm or other optimisation technique, for investigating the feasibility and effectiveness of different access configurations based on sampled usage and other data. Armed with such a ‘performance predicting’ model, an automated load balancing system can be devised which uses an optimiser to determine ideal access configurations based on current conditions, which can then be used to apply periodic database self-adaption in near real time. 14.2 An Overview of the Model Figure 14.1 shows a block diagram of such an automated, self adapting, load balancing, distributed database. The system employs a performance predicting model of the servers Exploring Evolutionary Approaches to Distributed Database Management 237 Figure 14.1 Schematic of an automated, self-adapting, load-balancing distributed database. and communication links, and an optimiser which produces possible allocations of groups of users to ‘back-end’ servers. These ‘allocations’ (solution vectors) are evaluated by the model, which uses them to determine how to combine respective workloads onto selected servers and predicts the degraded performance of each server and communication link using two key formulae based on the principles of Little’s Law and MM1 queuing. These are: )TAR)BTT/1(( 1 Time Response Degraded − = (14.1) where BTT is the server Base Transaction Time and TAR is Transaction Arrival Rate, and: i Si i Si Si i TRmaxTRmaxTRCVCTR ∈∈ ∈ +         −         ⋅= ∑ (14.2) where CTR stands for Combined Transaction Rate, taking into account individual transaction rates TR from a range of sources S, and where CV is a Contention Value representing a measure of the typical degree of collision between transactions. Each node can be considered to be both a client (a source of workload) and a potential server. As a client, the node can be thought of as a ‘Gateway’ or ‘Portal’ aggregating user load for a particular geographical sub-region or interest group. This is referred to as the ‘Client node’ loading and is characterised for each node by a Retrieval rate and Update rate together with a transaction overlap factor. As a server, each node’s ability to store data and/or perform transactions is characterised by its Base Transaction Time (the latency experienced by a solitary transaction on the server – this then degrades as work load OPTIMISER MODEL CONFIGURATIONS USAGE DATA PREDICTED PERFORMANCE Telecommunications Optimization: Heuristic and Adaptive Techniques238 increases) and a resource contention factor. Workload retrievals from a particular node are performed on the server, specified in a solution vector supplied by the optimiser, with updates applied to all active servers. Each nodal point-to-point communications link is also characterised by a Base Communications Time which deteriorates with increased load. Specified as a matrix, this allows crude modelling of a variety of different interconnection topologies. The optimiser runs for a fixed number of evaluations in an attempt to find a configuration giving the least worst user transaction latency, moderated by a measure of overall system performance (variants of this will be described in due course). As the system is balancing worst server performance, communications link performance and overall system performance, this effectively becomes a multi-objective minimisation problem which can be likened to a rather complex bin-packing problem. Experiments described here utilise 10 node ‘scenarios’ for the problem space which are described later. A typical solution vector dictates for each client node load, which server node to use for retrieval access as shown below : Client 12345678910 Server to use1334133413 This solution vector is generated by the optimiser using a chromosome of length 10 and an allelic range of the integers 1 through 10 – and is manipulated as a direct 10-ary representation rather than in a binary representation more typical of a cannonical genetic algorithm (see Bäck, 1996; Goldberg, 1989; Holland, 1975). Previous publications by the author and others have demonstrated differential algorithmic performance between HillClimbers, Simulated Annealers and differing forms of GA on this problem set (see Oates et al. 1998; 1998a; 1998b), under different tuning values of population size and mutation rates (see Oates et al., 1998c), on different scenarios (Oates et al., 1998b) and using different operators (Oates et al. 1999). Some of these results are reviewed over the next few pages. The scenarios investigated typically vary the relative performance of each node within the system and the topography of the communications network. Two such scenarios were explored in (Oates et al., 1998b) where the first, Scenario A, consists of all servers being of similar relative performance (all Base Transaction Times being within a factor of 2 of each other) and similar inter-node communication link latency (again all within a factor of 2). The communications link latency for a node communicating with itself is obviously set significantly lower than the latency to any other node. This scenario is shown schematically in Figure 14.2 and, with the basic ‘least worst performing server’ evaluation function, is found to have many different solutions with the same globally optimum fitness value. Scenario B considers the case where the 10 nodes are split into two regions, all nodes in each region being connected by a high speed LAN and the two LANs being interconnected by a WAN, the WAN being 10 times slower than the LANs. This is represented by high communication latencies for clients accessing servers outside their region, medium latencies for access within their region, and the lowest latencies for access to themselves. One node in each region is considered a Supernode, with one tenth the Base Transaction Time of the other nodes in its region. This scenario, shown in Figure 14.3, has only one optimal solution Exploring Evolutionary Approaches to Distributed Database Management 239 under most load conditions, where all nodes in a region access their own region’s supernode. Figure 14.2 Logical topology of Scenario A. Figure 14.3 Logical topology of Scenario B. L Med o Med w S e r v e r C l i e n t Node 1 3000 Node 2 2800 Node 3 3100 Node 4 2900 Node 5 4000 Node 6 5000 Node 7 3500 Node 8 4000 Node 9 4500 Node 10 3750 Node 1 5000 ms Node 2 5000 Node 3 5000 Node 4 500 Node 5 5000 Node 6 5000 High Speed LAN High Speed LAN Lower Speed WAN Node 7 5000 Node 8 500 Node 9 5000 Node 10 5000 Med Med Hi Hi S e r v e r C l i e n t Telecommunications Optimization: Heuristic and Adaptive Techniques240 Several different optimisation algorithms have been explored, and selected results from these experiments are presented and compared below. As a baseline, a simple random mutation ‘Hill Climber’ was used, where the neighbourhood operator changed a single random gene (Client) to a new random allele value (representing the server choice for that client). If superior, the mutant would then become the current solution, otherwise it would be rejected. This optimisation method is later referred to as HC. A Simulated Annealer (SA) was also tried, using the same neighbourhood operator, with a geometric cooling schedule and start and end temperatures determined after preliminary tuning with respect to the allowed number of iterations. Three types of genetic algorithm were also tried, each of these maintaining a population of potential solution vectors, intermixing sub-parts of these solutions in the search for ever better ones. Firstly a ‘Breeder’ style GA (see Mühlenbein and Schlierkamp-Voosen, 1994) was used employing 50% elitism, random selection, uniform crossover and uniformly distributed allele replacement mutation. Here, each member of the population is evaluated and ranked according to performance. The worst performing half are then deleted, to be replaced by ‘children’ generated from randomly selected pairs of parent solutions from the surviving top half of the population. These are created, for each client position, by choosing the nominated server from either of the two parent solutions at random. This process is known as Uniform Crossover (see Syswerda, 1989). These ‘children’ are then all evaluated and the entire population is re-ranked and the procedure repeated. The population size remains constant from one generation to the next. This is later referred to as ‘BDR’. The results from a simple ‘Tournament’ GA (Bäck, 1994) were also compared, using three way single tournament selection, where 3 members of the population were chosen at random, ranked, and the best and second best used to create a ‘child’ which automatically replaces the third member chosen in the tournament. This GA also used uniform crossover and uniformly distributed allele replacement mutation and is later referred to as ‘TNT’. Finally, another ‘Tournament’ style GA was also used, this time using a specialised variant of two point crossover. With this method the child starts off as an exact copy of the second parent but then a random start position in the first parent is chosen, together with a random length (with wrap-around) of genes, and these are overlaid into the child starting at yet another randomly chosen position. This is then followed by uniformly distributed allele replacement mutation. This gives a ‘skewing’ effect as demonstrated below and is later referred to as ‘SKT’. Gene Position : 12345678910 First Parent : A B C D E F G H I J Second Parent : a b C d e f g h i j Random start position in second parent : 8 Random length chosen from second parent : 5 Random start position in child : 4 Resulting Child A B C h i j a b I J Exploring Evolutionary Approaches to Distributed Database Management 241 Figure 14.4 The ‘Basic’ model evaluation function. 14.3 The Model The basic model was devised by Derek Edwards as part of the Advanced Systems and Networks Project at British Telecommunications Research Labs, and is demonstrated in Figure 14.4. It assumes that all nodes can act as both clients and servers. For each client node, its Effective Transaction Rate (ETR = combined Retrieval and Update rates) is calculated using equation 14.2, and this is entered into the left hand table of Figure 14.4 under the server entry denoted for this client by the solution vector. The update rate from this client is entered into all other server positions in that row. This is then repeated for each client. In the example shown (with only 6 nodes) the solution vector would have been 1, 4, 3, 4, 3, 1. Reading down the columns of the left hand table and using equation 14.2 with the appropriate server resource contention value, the Combined Transaction Rate (or aggregate load) is then calculated for each server. Using equation 14.1 for each server, this is then converted into a Degraded Response Time (DRT) using the server’s specified BTT. Using equation 14.1 the degraded response time for each point-to-point link is now calculated and entered into the right hand table using the appropriate base communications time and the traffic rate specified in the corresponding entry in the left hand table. The highest entry in each communications table column is now recorded, denoting the slowest response time to that server seen by any client. Each of these communications times is then added to the corresponding server’s DRT to produce the worst overall response time Servers Comms Links Server Server C ETR UR UR UR UR UR C Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me l UR UR UR ETR UR UR ⇒ l Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me i UR UR ETR UR UR UR i Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me e UR UR UR ETR UR UR e Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me n UR UR ETR UR UR UR ⇒ n Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me t ETR UR UR UR UR UR t Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me ↓↓↓↓↓↓ ↓↓↓↓↓↓ Agg Load C TR C TR C TR C TR C TR C TR Worst Rate Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me ↓↓↓↓↓↓ / DRT Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me / \++ / Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me Resp Ti me Worst Seen Performance ↑ Telecommunications Optimization: Heuristic and Adaptive Techniques242 as seen by any client to each server. The highest value in this row now represents the worst overall response time seen by any client to any server and it is this value that is returned by the evaluation function. It is the optimisers job to minimise this, leading to the concept of ‘least worst’ performance. Checks are made throughout to ensure that any infinite or negative response time is substituted by a suitably large number. Figure 14.5 The ‘Plus Used’ model evaluation function. Several variants of this ‘basic’ evaluation function have been explored. The first of these (plus avg) again assumes that all nodes are potential servers. It therefore applies updates to all nodes, however this time 10% of the average performance of all nodes is added to the performance of the worst transaction latency seen by any user. Another variant restricts updates only to those servers considered to be ‘active’, i.e. appear in the solution vector and are therefore ‘in use’. This variant is termed ‘just used’ and has been investigated but is not reported on here. Yet another variant starts from the ‘just used’ position but this time adds a usage weighted average to the worst communications time as shown in Figure 14.5. This the ‘plus used’ variant and is seen as a good overall reflection of user perceived quality of service. It is the basis of many results presented here. Previous publications have shown how different combinations of these scenarios and evaluation functions produce radically different fitness landscapes which vary dramatically in the difficulty they present to Genetic Search (see Oates et al., 1998b; 1999). Servers Comms Links Server Server C ETR 0URUR0 0 C Resp Ti me XResp Ti me Resp Ti me XX l UR 0 UR ETR 00 ⇒ l Resp Ti me XResp Ti me Resp Ti me XX i UR 0 ETR UR 0 0 i Resp Ti me XResp Ti me Resp Ti me XX e UR 0 UR ETR 00 e Resp Ti me XResp Ti me Resp Ti me XX n UR 0 ETR UR 0 0 ⇒ n Resp Ti me XResp Ti me Resp Ti me XX t ETR 0URUR0 0 t Resp Ti me XResp Ti me Resp Ti me XX ↓↓↓↓↓↓ ↓↓↓↓↓↓ Agg Load CTR 0 CTR CTR 0 0 Worst Rate Resp Ti me XResp Ti me Resp Ti me XX ↓↓↓↓↓↓ DRT Resp Ti me XResp Ti me Resp Ti me XX Usage Wghtd Avg Resp Ti me XResp Ti me Resp Ti me XX \++ / Resp Ti me 0Resp Ti me Resp Ti me 00 Worst Seen Performance ↑ Exploring Evolutionary Approaches to Distributed Database Management 243 14.4 Initial Comparative Results For each optimiser and each scenario, 1000 trials were conducted, each starting with different, randomly generated initial populations. For each trial, the optimisers were first allowed 1000 and then 5000 iterations (evaluations) before reporting the best solution they had found. For the SA, cooling schedules were adjusted to maintain comparable start and end temperatures between the 1000 iteration and 5000 iteration runs. For the BDR GA, the number of ‘generations’ used was adjusted with respect to population size. Of the 1000 trials it is noted how many trials found solutions with the known globally optimal fitness value. These are referred to as being ‘on target’. It was also noted how many times the best solution found was within 5% of the known globally optimal fitness value, as this was deemed acceptable performance in a real-time industrial context. Finally it was noted how many times out of the 1000 trials, the best solution found was more than 30% worse than the known globally optimal fitness value – this was deemed totally unacceptable performance. The results of these trials for Scenario A with the ‘plus average’ fitness model are shown in Figure 14.6. Figure14. 6 Scenario A with the ‘plus average’ fitness model. Here it can be seen in the left-hand set of columns that at only 1000 evaluations (the foreground row), very few trials actually found the global optimum solution. The Breeder (BDR) and Skewed Tournament (SKT) genetic algorithms actually perform worst however neither Hillclimber (HC) nor Simulated Annealing (SA) nor Tournament Genetic Algorithm (TNT) deliver better than a 3% success rate. Still at only 1000 evaluations, Hillclimber can be seen to totally fail (right hand set of columns) around 5% of the time, with all other techniques never falling into this category. At 5000 evaluations (the background row), the HC SA BD R TNT SKT HC SA BD R TNT SKT HC SA BD R TNT SKT 1K evals 5K evals 0 10 20 30 40 50 60 70 80 90 100 Percentage Category (on Tgt, <5%, >30%) / Optimiser Evaluation Limit Telecommunications Optimization: Heuristic and Adaptive Techniques244 performance of the genetic algorithms improves significantly with Skewed Tournament delivering around 30% ‘on target’ hits. For best results falling within 5% of the global optimum fitness value (the middle set of columns), there is little to choose between Simulated Annealing, Breeder or Skewed Tournament GA, all delivering success rates above 99%. The third set of columns at 5000 evaluations shows the failure rate where best found solutions were more than 30% adrift of the global optimum fitness value. Only Hillclimber has any significant entry here. Interestingly it is only Hillclimber that fails to show any significant improvement in its performance when given five times the number of evaluations. This implies the fitness landscape must have some degree of multi-modality (or ‘hanging valleys’) which Hillclimber quickly ascends but becomes trapped at. Figure 14.7 shows similar performance charts for the five optimisers on Scenario B with the ‘plus used’ evaluation function. Here it is clear that only the Skewed Tournament Genetic Algorithm gives any degree of acceptable performance, and even this requires 5000 evaluations. In terms of best solutions found being worse than 30% more than the global optimum, even at 5000 evaluations all techniques, with the exception of Skewed Tournament, are deemed to fail over 75% of the time. Skewed Tournament gives on target hits 99.7% of the time with no complete failures. Figure 14. 7 Scenario B with the ‘plus used’ fitness model. These results and others are summarised in Table 14.1 with respect to the performance of simulated annealing. In this table, the difficulty with which simulated annealing was able to find the best result on various scenario/evaluation function pairings is classified roughly as either ‘Very Easy’, ‘Easy’, ‘Moderate’, ‘Fairly Hard’ or ‘Very Hard’. One clear trend is that the imposition of the ‘plus used’ evaluation function on Scenario B produces a landscape that makes optimal solutions particularly difficult to find. However it is intriguing HC SA BD R TNT SKT HC SA BD R TNT SKT HC SA BD R TNT SKT 1K evals 5K evals 0 10 20 30 40 50 60 70 80 90 100 Percentage Category (On Tgt, <5%, >30%) / Optimiser Evaluation Limit [...]... Telecommunications Optimization: Heuristic and Adaptive Techniques 116300 114250 112200 110150 Fitness 108100 106050 104000 101950 99900 5w 1w Worst - Best 3b 2m 5m 1a 4a 114250-116300 112200-114250 110150-112200 108100-110150 106050-108100 104000-106050 101950-104000 99900-101950 Median - Mean Figure 14.14 3D fitness landscape projection for Scenario B with the ‘plus avg’ model Another potential criticism of... distance increases, evaluation values in excess of 100,000 become more frequent (however it must be borne in mind that each point shown on the plot can represent 1 or 246 Telecommunications Optimization: Heuristic and Adaptive Techniques many instances out of the 100 samples, all with the same evaluation value Figure 14.10 gives the same plot for ‘plus used’ 120000 100000 Fitness 80000 60000 +avg +used... the first deviation to produce a radically worst first nearest neighbour, but with the effect reducing with increased Hamming distance, and would produce exactly the 248 Telecommunications Optimization: Heuristic and Adaptive Techniques negative selection pressure postulated The fact that more ‘used servers’ are performing worse is irrelevant to this model as it considers the average of client access... servers 8 Hamming Distance 7 6 5 4 3 2 1 0 100000 102500 105000 107500 110000 112500 115000 117500 120000 Evaluation Value Figure 14.11 ‘Many evaluation’ fitness distribution for ‘plus avg’ The ‘cusp’ hypothesis is not as directly applicable in the case of Scenario A In Scenario A, not only are there several solutions attainable which share the ‘best known fitness value’, but these solutions usually contain... Deviations from these solutions will have a far less marked effect than in a case when the best known solution is a unique vector, or perhaps a small set containing very little diversity However, such potential shallow multimodality will produce a degree of ruggedness which, as already demonstrated by Figure 14.6, is seen to be sufficient to prevent a basic hillclimbing algorithm from finding the global... followed by the even valued ones might expose more of a ‘clustered’ feature Clearly, it would not be practical to explore all possible permutations in both dimensions 250 Telecommunications Optimization: Heuristic and Adaptive Techniques Further, it can be argued that simply plotting fitness values over a range of allele values for two specified genes is not representative of the landscape as ‘seen’ by... selection pressure exists amidst what could be a multi-modal or deceptive landscape Crossover complicates this by allowing the GA to make multiple changes to a chromosome in each evolutionary step, therefore potentially jumping from ‘x’th nearest neighbour to ‘y’th nearest neighbour in a single step, where ‘x’ and ‘y’ may be significantly different values Nonetheless, the beneficial effects of crossover are... and their fitnesses plotted in a concentric fashion around the fitness of the global optimum solution In our ADDMP examples we have 10 gene positions each with 10 possible allele values Hence we have 90 potential first nearest neighbours to the global optimum (10 genes by 9 other allele values) Given that this quantity is quite low, this set can be exhaustively evaluated If the range were higher, some... plots, but this is clearly not the case Indeed, in the case of the ‘plus used’ plot, it was hoped to see a peak value at 1 mutation, dropping off as Hamming distance increased This would have supported a hypothesis of a ‘cusp’ in the 10 dimensional search space which would have provided a degree of negative selection pressure around the global optimum solution, hence making it ‘hard’ to find An examination... and mutation rates have been explored with each result shown being the average of 50 runs, each run starting with a different randomly generated initial population 254 Telecommunications Optimization: Heuristic and Adaptive Techniques The performance of the GA was measured over a range of population sizes (from 10 to 500 members in steps of 10) and over a range of mutation rates starting at 0%, 1E-05% . evolutionary Telecommunications Optimization: Heuristic and Adaptive Techniques, edited by D. Corne, M.J. Oates and G.D. Smith © 2000 John Wiley & Sons, Ltd Telecommunications Optimization: Heuristic and Adaptive. work. Telecommunications Optimization: Heuristic and Adaptive Techniques252 Figure 14.14 3D fitness landscape projection for Scenario B with the ‘plus avg’ model. Another potential criticism of the above. between transactions. Each node can be considered to be both a client (a source of workload) and a potential server. As a client, the node can be thought of as a ‘Gateway’ or ‘Portal’ aggregating

Ngày đăng: 01/07/2014, 10:20

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan