Management System. Optimal file allocation has been shown to be effective in reducing the average transacfion processing time in a database system built upon ...
An Optimal File Allocation Policy in u Networked Datubase Management System Optimal file allocation has been shown to be effective in reducing the average transacfion processing time in a database system built upon a computer communications network. This paper investigates the use of a networked computing system to distribute files and to manage the system in an optimal fashion so as to minimize the sum of file storage and internode file transfer cost. By D. Saha and A, Mukherjee
Introduction he decreasing cost, the growth in technology and the diversification of applications caused computer sysems to evolve from being centralized to being distributed.l” A distributed computer system may possess a large number of general- and specialpurpose computing nodes interconnected by a computer communication network. A distributed dutabuse system (DDBS)is a physical partitioning of a database over several computing nodes (or sites), while providing users with integrated access to data as a whole. The justifications for a networked database are many.- A large number of application environments require sharing of data among diverse users in a network with different computing facilities. Reliability can be
T
D. Saha and A. Mukherjee teach at Jadavpur University, Calcutta, India.
218 DECEMBER 1994
T
he increasing availability of database management sopware for microcomputers, as well as advances in hard disk technology for these computers, can be viewed as an added incentive for distributed database design.
improved by locating data at different nodes and even sometimes maintaining multiple copies of the same data at different locations. Due to the reduced size of local databases, storage requirement per node becomes less. However, despite these advantages, a DDBS gives rise to a host of problem^^^^-'^ such as concurrency control, inconsistency in updating, uniformity among replicated copies, etc., and, most importantly, the optimal distribution of data”-’* over the network. In a distributed computing environment made
up of networked processing nodes, data partitions comprising a DDBS must be assigned to the sites (or nodes) so as to make efficient use of the database.14 A distributed computing system has some configuration of nodes each with its own storage, control and data (or file). A computer network interconnects these nodes to allow sharing of resources on a transactions basis. Given a distributed system of some configuration made up of N nodes, and a DDBS made up of M files an efficient file allocation strategy assigns the files to the nodes in such a way that the sum of the storage and communication costs is minimized, i.e. the amount of internode communication is minimized while taking advantage of specific storage capacity of some nodes. The file allocation has been shown to be NP-complete for a general N node distributed system where M files have multiple copies to enhance reliability and reduce transaction processing time.I9 In this paper we show that the problem can also be attempted with a conventional subgradient optimization technique with the 0-1 restriction imposed on the solution to ensure that files remain atomic. The organization of this paper is as follows. The following section gives a brief overview of the past work on the file allocation problem followed by two sections presenting the formulation of the problem and its solution, respectively. The results are discussed in the subsequent section and the final section concludes the paper.
Previous work Since the beginning of distributed computation the file allocation problem (FAP) has been conceived and attempted at various levels.1P19Even microeconomic approaches for the problem have been studied." The problem has been formulated in different ways at different points of time? However, the basic problem in FAP addresses the question of distributing the files in a DDBS among the nodes of a distributed system to optimize system performances.The problem refers to both the cases of distributing a single file (or copies of a file) and an entire file system over the network. In the first case, the file may be fragmented, i.e. the unit of allocation is a file record. In the second, the unit of allocation is a file itself. In both cases, however, there is a divisible resource, which may be the file
or the file system, and the allocation of this resource will result in a certain pattern of accesses to be directed towards the nodes to which the resource fragment has been allocated. The algorithm proposed in this paper is applicable to the general problem and thus to all formulations of the file allocation problem. However, in this paper, for brevity, we refer only to the first formulation of the FAP and present its solution technique, using the subgradient approach.19 The FAP has been the topic of much previous research and here we briefly review this work. The details can be found in references 4 and 17. Depending on the optimization goal selected in those work, research on FAP can be divided into two groups: (1)minimization of overall communi, ~ ~ ' (2) ~ optimization of some cation C O S ~ ' ~ , ' ~ and performance metric such as average time delay.13,18In the first grouping the file may be either fragmented between several nodes or atomic, i.e. it is not divisible and must reside completely at one node. In the latter case FAP becomes an NP-complete nonlinear integer (0-1) programming pr~blem",'~for which heuristic solutions have been attempted in reference 15. Most of the algorithms for file allocation falls under this category. The first solution is due to ChuI4 who reduced the nonlinear (0-1) equations to a set of linear (0-1) equations and then solved it by the standard linear (0-1)programming technique: In second grouping, the queueing theoretic model has been applied and normally file fragmentation has been allowed. A lookup directory is then required to determine the nodes where the fragments of a particularly file reside. This improves the performance over the previous integer allocation case due to concurrent access of file and increased reliability during node and/or link failures. Queueing theory-based FAP algorithms are discussed in reference 13.
Formulation of the problem Allocating individual data files to computers in a network during organization of DDBS is an important design criterion3*10 and is usually based on the locality of file usage rate, response time requirements for different files at different sites, communications and storage cost, and reliability requirements. The overall operating cost related to
INTERNATlONAL JOURNAL OF NETWORK MANAGEMENT
219
files is considered to consist of transmission and storage cost. The problem can be stated as follows."-18 Given a set of computer nodes in a DDBS that process common information files, find the optimum allocation of the files so as to yield minimum overall operation cost subject to the constraints such as: (1)expected time to access each file is less than a given bound, (2) amount of storage needed at each node does not exceed the available storage capacity, (3) availability of each file is above a certain threshold level, and so on? The following notations are used throughout the paper:
M = number of distinct files in a DDBS N = number of nodes in the network X, = a binary variable to indicate that the jth file is stored in the ith node, ie[l,Nl and je[l,M] = 1, if the jth file is stored in the ith node = 0, otherwise request rate for the entire or part of the jth file at the ith node per unit time expected time for the ith computer to retrieve and perform a transaction on the jth file from the kth node (from initiation of request until start of reception) number of redundant copies of the jth file, i E [LMI available memory size of the ith node, i E [1,N] maximum allowable retrieval time of the jth file to the ith node storage cost of the jth file per unit length and per unit time at the ith node communication cost from the kth node to the ith node per unit length the average length of the segment of the jth file requested by a transaction overall operating cost per unit time for processing M distinct file required in common by N nodes. the frequency of modification of the jth file after a transaction at the ith computer computational cost parameter (>1) Using the above notations, the constraint equations for our case can be formulated as follows. Storing rj redundant copies of the jth file in the information system gives the first equation as:
220 DECEMBER 2994
To ensure that the storage capacity of each computer is not exceeded it is required to have the second equation as:
CXuLj5 bjfor i = 1 , N
(2)
i
To ensure that aijk5 Tijthe third equation is formulated as:
Let us first consider the simplified situation where the DDBS has no multiple copies, i.e. rj = 1 for all je[l,M]. If rj = 1 Vj, then from constraint equation (1) we know that x$&j=O for i#k, and subsequently the constraint equation (3) reduces to XipkjsTq,i#k, j=l,N. However, if rj#l then no such simplification is possible. The general case will be dealt in our next paper. Here we restrict ourselves to the simple case without replication. Nevertheless, the total cost is always given by
c=
C$$j
+ x(1 /b)ckL/u&k,(1 -xu) + 2 c'kLju&jff
i.1
(4)
i.j. k
where the first two parts on the RHS of equation (4) constitute the cost of storage and the third part is the cost of communication. We want to minimize equation (4) subject to the nonreplication availability of storage and access time requirement constraints given in equations (l), (2) and (3), respectively. However, C can be rearranged as:
where Dij > 0 and E , > 0. When rj = 1 Vj, then XkjXij= 0, for k#i and further, since Cii = 0 C = ED&, i.j
The Solution of the File Allocation Problem We first take the Lagrangean relaxation of the dual function given in equation (5)with respect to
the constraints given by equations (1)-(3).We then apply the subgradient optimization algorithm and the solutions obtained are normalized to either 0 or 1, depending upon whether its value is less than the threshold value or not, respectively. The thresdepends On the problem and decreases with increases in M and N. We consider X,(A) to be an optimal solution to the problem for a fixed vector A. This vector A is a Lagrangean multiplier. The basic steps of the algorithm are given below (for details see reference 19): Initialization-set C to an arbitrarily large value; select an initial set of multipliers A,: set the iteration counter k to 0; set the improvement counter IJJ to 0; set A' to A'; the current best value of L(A) is set to 0 and the stepsize 6 is set to tio. Solving the Lugrangean relaxation-(i) k and IJJ are incremented by 1; (ii) the Lagrangean relaxation problem is solved using Ak as the Lagrangean multipliers; and (iii) L(Ak) and X$are found. The Lagrangean relaxation can be rewritten as
size t k = 6 (C - L(A))/llpkII* and the new multipliers A?' = min (-1, A: + tkp'), 1 = 1,2, and set k k+l. (5) End s t e p 4 0 to Step (2).
-
It has been shown that the solution obtained by this procedure converges in a few hundred iterations to a solution which is very close to L(A'). The rate of convergence and quality of bound generated depends to a large extent on the limis set on the improvement and iteration counters. We solved the proposed formulation for various sets of data to ilustrate the applicability of the technique to a number of non-trivial problems. Some of them are provided in the next section.
Computational Results This section deals with two of the set of design problems used to verify the technique as well as to study the effects of various parameters on the allocation strategy. The test matrices are shown in Figures 1 and 2
Conclusion
if X,l > threshold then X,= 1, else X,= 0. (3) Updating the parameters-(i) If L(A') is greater than the current best value of L(A), then L(A) is replaced by L(Ak) and A' is set to Ak and I) is reset to 1; (ii) if Xt is feasible for minimizing problem, then its associated objective function for this minimizing problem is computed-if this value is less than the current value of C then C is set to this value; (iii) if the improvement has reached a prespecified upper limit then set 6 - 6 / 2 and \Ir is set to 0 and again it is started from step 2(i); (iv) if k crosses a prespecified limit, or if 6 is less than a prespecified limit, or if tk is less than a prespecified limit or if (C - L(A' ))/L(A*) is less than a prespecified error tolerance, then the process terminates. (4) Updating the multipliers-compute the new subgradients as ~.l(Ak)=ZZ(X,ul,- T,) and p2(Ak)= ZZ(l-X,) and compute the new step
With the proliferation of computer networks, distributed systems supporting DDBS has become common. The increasing availability of database management software for microcomputers, as well as advances in hard disk technology for these computers, can be viewed as an added incentive for distributed database d e ~ i g n . ~ We have considered the file allocation problem in a DDBS and have proposed a Lagrangean relax-
0.0703 0.5233 0.1458 0.1458 0.1458
0 1 0 0 0
0.5988 0.1458 0.2213 0.1458 0.0703
1 0 0 0 0
0 0 1 0 0
0.0703 0.0703 0.7498 0.0703 0.0703
0 0 0 1 0
0.0703 0.0703 0.1458 0.6743 0.2213
0.0703 0.0703 0.1458 0.0703 0.5988
0 0 0 0 1
Figure I , File allocation problem.
INTERNATIONAL [OURNAL OF NETWORK MANAGEMENT
221
0.0703 0.3345 0.1458 0.1835 0.0703 0.1684 0.1684
0.0703 0.0703 0.1005 0.4478 0.1609 0.0854 0.0703
0.3723 0.0703 0.0854 0.1684 0.1156 0.0703 0.1458
0.0703 0.0703 0.4100 0.0929 0.1684 0.1382 0.0703
0.0929 0.0854 0.0703 0.1307 0.1382 0.4176 0.1005
0.1005 0.1080 0.0703 0.1458 0.0854 0.1307 0.4478
0.0929 0.0703 0.0703 0.1307 0.4704 0.1080 0.0?03
Acknowledgements
The authors wish to thank Professors S. K. Chaudhury and D. R. Poddar for their kind help and permission to work in the laboratory in the ETCE department.
References 0 1 0 0 0 0 0
0 0 0 1 0 0 0
1 0 0 0 0 0 0
0 0 1 0 0 0 0
0 0 0 0 0 1 0
0 0 0 0 0 0 1
0 0 0 0 1 0 0
1. C. J. Date, A n Introduction to Database Systems, vols I and 11, Addison-Wesley, Reading, 1986. 2. S. B. Davidson, Optimization and consistency in partitioned distributed database system, ACM Trans. on Database Systems, 19, No. 3, 456-481, September 1984. 3. C. J. Egyhazy, Microcomputers and relational database management system: A new strategy for Figure 2. File allocation problem. decentralizing databases, Databases, 16, No. 1, 1520,1984. 4. L. W. Dowdy and D. V. Foster, Comparative models of the file assignment problem, ACM Computing Survey, 14, No. 2, 287-313, June 1982. P. A. Bernstein et al. Query processing in a system 5. he increasing availability of database for distributed databases SDD-1, ACM Trans. on Datmanagement software for abase Systems, 6, 602-625, December 1981. microcomputers, as well as advances in 6. C. T. Yu and C. C. Chany, Distributed query prohard disk technology for these computers, cessing, ACM Computing Survey, 16, No. 4, 399433, December 1984. can be viewed as an added incentive for 7. M. Satyanarayanan, The influence of scale on disdistributed database design. tributed file system design, l E E E Trans on Software Eng., 18, No. 1, 1-8, January 1992. 8. A. Hisgur et al. Availability and consistency tradeoffs in the echo distributed file system, Proc. 2nd IEEE Workshop on Workstation Operating Systems, September 1989. ation approach which finds suboptimal solutions 9. J. H. Howard et al., Scale and performance in a disfor the general (0-1) combinatorial optimization tributed file system, ACM Computing Survey, 6, problem. The problem is solved by applying the No. 1, February 1988. well-known subgradient optimization algorithm 10. P. H. Levine, The Apollo DOMAIN distributed file with the restriction that the variables are binary in system, NATO AS1 Series: Theory and Practice of Distributed Operating systems, Y. Parker, J-P. Bananature. This is d u e to the assumption that files are tre and M. Bozyigit (eds), Springer-Verlag, New atomic in strucutre. However, this restriction can York, 1987. be relaxed for fine-grain partitioning of the DDBS. 11. J. F. Kurose and R. Simha, A microeconomic In this case, relations can be divided further either approach to optimal resource allocation in distribhorizontally or vertically to make the solution a n uted computer system, I E E E Trans. Comput., 38, No. 5, 705-717, May 1989. optimal one. 12. S. Ceri, G. Pelagatti and G. Martella, Optimal file In a DDBS after the files have been created a n d allocation in a computer network A solution based allocated, a directory”J6 is needed to specify the on a knapsack problem, Computer Networks, 6, 345physical and logical characteristics of the files so 367, 1982. that the user of the system can easily locate and 13. P. Chen, Optimal file allocation in multilevel storage systems, Proc. AFIPS, 42, No. 2, 277-282, 1973. access a particular file on demand. This directory 14. W. W. Chu, Optimal file allocation in a multiple may again be replicated and distributed throughcomputer system, I E E E Trans. Comput., 18, No.5, out the DDBS. The organization and distribution 885-889, 1969. of the directory also influence transaction traffic 15. M. Mahmoud, and J. Riordan, Optimal allocation of pattern in the network and thus affect the resources in distributed information networks, ACM Trans. Database System, 1, No. 1, 66-78, 1976. operating cost a n d performance of the ~ y s t e m . ~ , ~
T
222 DECEMBER 1994
16. R. Suri, A decentralised approach to optimal file allocation in computer networks, Proc. IEEE Con$ Decision Contr., IEEE Press, 1979, pp. 141-146. 17. B. Wah, File placement in distributed computer systems, IEEE Computer, 17,No. 1, 23-33, January 1984. 18. M. Woodside and S. Tripathi, Optimal allocation of file servers in a local area network, IEEE Trans. Software Eng., 12, 84445, 1986. 19. D. Saha, A. Mukherjee and S. K. Dutta, Design considerations for file allocation in a multicomputer distributed processing environment, Technical Report, JU/CSE/DS/11/93, June 1993.
If you wish to order reprints for other articles in the International JournaZ of Network Management, please see the Special Reprint instructions inside the front cover. 105.57148/94/040218-06 0 1994 by John Wiley & Sons, Ltd
INTERNATIONAL IOURNAL OF NETWORK MANAGEMENT
223