• Aucun résultat trouvé

PerforInance Analysis

5.8 Exploiting Client Behavior

5.8.1 Locality of reference

A name service client" s behavior is characterized by the frequency of operations it per-forms and the database objects those operations affect. Recall that a particular client's reference mix is represf'nted by a list of the probabilities of accessing individual database objects. Tu1 . . . TuK for client 'U. and that the effect of the client's referencing behavior on its expected operation cost is as given in Equation 5.1:

K

E(Lu)

= L

TukE(Luk)' (5.18)

k==1

Locality of reference occurs if the most frequently accessed database objects are those that can be operated on with the lowest expected cost. generally objects that are in the proximity of the client.

If the client references all database objects with equal likelihood, T uk

=

T ul for all

1 ~ k, l ~ K. then the overall expected operation co~t does not depend on the particu-lar assignment of authority, assuming that all nanle servers are assigned the same number of database objects. Even if database objects are referenced with varying frequencies, the expected lookup cost remains independent of the client's particular reference mix as long as the assignnlent of authority for database objects is performed arbitrarily.

As an example. for a simple organizationally partitioned name space. the expected cost obtained fronl plugging Equation 5.7 into Equation 5.18 is

K

becomes

K

E(Lu) = (Cu main

+

du main

+

Cu)

E

rule

1e=1

=

Cu main

+

du main

+

Cu'

Note that this expected cost is independent of the values for rut .. · ruK'

(5.20)

Substantial gains in the expected operation cost can only be achieved by storing data close to where it is frequently used. In other words, E( Lu) is reduced if for two database objects dble and db" Lule

<

Lui when rule> ru,. Fortunately, localities of interest naturally arise in large distributed systems. For example, clients residing in a local environment, such as Berkeley, are presumably most often interested in objects created within that environ-ment, and Inuch less frequently interested in referring to distant objects. The assignment of authority for storing database objects should be done intelligently to exploit the measured or expected locality of interests. Replication can be used in cases where two geographically-distant clients share certain localities of interest. Chapter 6 discusses the results of an experiment to measure the locality present in the Grapevine system.

5.8.2 Lookup/update ratio

A second aspect of clients' referencing behavior that can· be exploited to reduce the expected name service costs is the frequency of various operations, such as the ratio of update to lookup operations. While E(Lu) is the expected cost of performing a given name service operation, the overall cost incurred by a particular client, E(TOT ALu), is the sum over all operations, weighted by the probabilities of those operations. For the two operations, lookup and update, this is given by

E(TOT ALu)

=

Prob(lookup)E(L'ooleupu)

+

Prob(update)E(Lupdate u) where Prob(lookup)

+

Prob(update)

=

1.

(5.21)

Generally, techniques that reduce the expected cost of one operation increase the cost of another. This is, choices can be made that trade off the costs of different operations. For example. as demonstrated earlier in this chapter, increasing the replication factor of database objects improves the cost of lookups. but renders updates more expensive. The proper choices for configuring the name service thus depend on the expected ratio of operations.

Probe lookup) / Probe update). For Prob(lookup)

> >

Prob( update), efforts should be made to reduce E(L'ooleup u), and vice versa for Prob(lookup) < < Probe update).

XEROX PARe. CSt-8S-I. FEBRUARY 1985

CHAPTER 5. PERFORMANCE ANALYSIS 95

Given that name services are primarily used to locate and maintain information about named objects, and that long-lived objects move infrequently, one would expect name service lookups to be much more prevalent than updates. Therefore, one's intuition would be to optimize the cost of name service lookup operations at the expense of updates.

5.9 Summary

Once a naming convention and associated Ilame space management strategy have been selected, the observed performance of name service operations is dictated primarily by the placement of the name servers, the distribution of the name service database, and the pat-terns of reference to name service information. The simple analytical model of a distributed name service presented in this chapter allows one to quantitatively measure the high-level impact of a name service's configuration on a given client's level of performance.

Since the costs of communicating with name servers in a large distributed computing environment may vary from client to client and server to server by several orders of magni-tude, lllinimizing the number of interactions with servers and localizing those interactions is the key to low operation costs. The name management policy adopted determines the amount of communication required to resolve a name and access the appropriate database object. Reducing the cost of this communication is achieved mainly through replicating name service data and exploiting inherent localities of client r~ferences.

The random selection of a fixed number of storage sites for database objects was analyzed as a particularly naive configuration technique. For such a scheme, the degree of replication of database entries was shown to considerably impact the cost of accessing a given database entry. In cases where some locality of reference exists, and data is distributed intelligently so as to coincide with its regions of interesL the cost formulas based on randomly selected storage sites can serve as a lower bound on performance.

XEROX PARCo CSL-85-1. FEBRUARY 1985

XEROX PARC. CSL·8S·I. FEBRGARY 1985

Chapter 6