• 沒有找到結果。

FCFS Fairness for P2P Networks…

The fairness models described in the previous chapter do not cover the landscape of P2P networks for resource sharing and scheduling entirely. Many fairness measures are asymptotic in nature. For example, consider a DHT-based file sharing system that distributes files among peers evenly through file key randomization. The load balancing index (e.g. Jain’s fairness index) is measured over a long period of time. However, the measure assumes that new files enter the P2P network continuously. Before the number of files stored in the network grows to a certain point, load balance cannot be achieved with certainty. In addition, assume that files are large in quantity and have been evenly distributed among peers, there are still uneven distribution about the file request patterns – some files may receive significantly more interests than the others, and the peers hosting these popular files will see much more network traffic then the others. This scenario points out at least one important aspect of fairness: not only does it depend heavily on the types of resources being shared, but also depend subjectively from different point of views. In the example above, the network is fair in terms of file storage (more precisely, file counts), but unfair in terms of network traffic.

For the sake of comparison, consider another important class of systems that share files over unstructured P2P networks. For example, Gnutella in its original form allows a user, through a representing peer, to issue (keyword-based) queries. Gnutella floods the queries over the P2P overlay with bounding distance, and peers what store files matching queries will reply the query with results. Because Gnutella peers (servents) mainly share their own files to the rest of the network and do not have to “cache” files they are not interested, applying the same load-balancing measure as the case for DHT-based systems is less relevant. Instead, it is more relevant if the fairness index is used to measure the overhead of replying requests (when the peer has matching files) plus forwarding requests (flooding). On the other hand, Freenet –

another well-known file sharing system over unstructured P2P networks – randomizes the keys of files in a way similar to DHT-based methods, and the user is supposed to know the hashed keys when forming queries (with the help of other auxiliary tools external to the core of Freenet overlay). Freenet then attempts to re-organize the overlay structure adaptively to increase query response time and hit rates. In this case, the load-balancing measures for both file storage and messaging overhead seem relevant.

In this thesis, we focus on sharing generic, vaporous resources that can be consumed once only, which is quite different from sharing of files discussed above. For simplicity, we assume there is only one type of resources; hence the requests are also of the same type. All resource providers, each serving as a peer in the P2P network, provide the same type of resources, and requests for resources can be issued by any peer. The goal of such a resource sharing P2P system is, for each resource request, to locate a resource, preferably from among peers close to the requesting peer, to fulfill the request.

The kind of resources described above is quite common, such as machine cycles or file storage. However, some adjustment, at least conceptually, is needed. Although both machine cycles and storage space are generic, they are not considered vaporous in literature in general.

In our model, when machine cycles are the resources to be shared, a peer providing a resource means the peer is available for processing a request, and the availability may be advertized by the peer to some registry. In other words, each peer provides at most one resource at a time, and which the resource is matched by a request, the peer enters into a “computing” mode and cannot accept next request until the request is processed completely (or equivalently, the peer no longer provides the resource during request processing). Furthermore, upon completion, the peer needs to advertize again about its availability. Therefore, our resource model still differs slightly from the resource model assumed by the general resource scheduling problem studied in grid or cluster computing. Similarly, storage space as a generic, vaporous resource

in our model can be interpreted. The main point is that the allocated storage space is treated like a temporary working space since after the allocated space serves its job fulfilling a request, it cannot serve as a persistent entry in the P2P network for subsequent access (or the cost of accessing it subsequently should be assumed ignorable), otherwise the model falls back to file sharing. Note that the assumption of single-type requests does not prevent requests from representing different kinds of jobs, as long as all resources can perform all the jobs. Hence, for example, our model can describe “cycle-stealing” P2P systems such as SETI@Home directly. With additional modification, our model can also be used to deal with more general resource scheduling problems that are addressed, for example, in cluster or grid computing research.

With the resource sharing model described above, what are the potential issues when fairness is concerned? As mentioned, this topic is closely related to the resource scheduling problem studied extensively in cluster or grid computing communities. However, most resource scheduling approaches in this context assume steady supply of resources from providers, and different approaches emphasize mainly on improving request fulfillment performance from the perspective of resource (or job) requestors. Such a biased view can easily lead to unfairness for resource providers if resource assignment is based on expected turn-around time or locality. For example, consider a situation in which a series of requests come steadily and moderately from a particular requestor in a P2P network for a period of time, while other requestors in the network remain (relatively) silent. Assuming that all resource providers are of similar processing power, it is likely that decentralized schedulers that make decisions based on gradually accumulated status about other peers will select the providers in the vicinity of that requestor to process the requests. If such a pattern of requests persist, providers at a distance from the focal requestor will be driven into starvation. This situation poses no problems for clusters and grids not only because most existing systems are

based on centralized control, but also because the goal is to minimize job processing time from the requester’s perspective. In P2P settings, whether this result is considered unfair or not depends on the application. In case, for example, processing each request implies earning some credits for the providers; then naturally resource providers would contend for requests, and it is unprecedented that the scheduler should be fair all the time irrespective to any pattern of requests that may occur. Moreover, there may be application areas where the demand for fairness may override all other performance metrics, such that the provider who provides the resource “first” should receive the next available request, even though doing so may incur additional overhead when the request is issued by a remote requestor across the P2P network, leading to a FCFS requirement effectively.

We are interested in such FCFS-oriented fairness measures for P2P networks.

Accordingly, our resource sharing model can be viewed as a virtual producer-consumer problem as depicted in Figure 3.1 below, which in some sense is a reverse of the ordinary resource scheduling problem where what arrive are jobs that demands resources, and the scheduler (the middle man) dispatches jobs to available resources actively based on some scheduling policies. In contrast, in our model the scheduler, that is, a virtual producer-consumer queue played by the P2P overlay, serves largely as a passive registry, and queued resources are only consumed when requested.

Naturally, the FCFS fairness is achieved by ensuring that the P2P overlay collectively implements a central FCFS queue with the obvious property, that is, earlier arriving requests or resources expect to be fulfilled or consumed than those arrive later. However, unlike scheduling jobs in operating systems or clusters, the events of job arrivals as well as status changes of resource availability cannot take effect immediately and it takes time to propagate the knowledge throughout the P2P network. Accordingly, there is no straightforward means to evaluate which comes first when two events from two distant peers are generated roughly “at the same time.”

To address this problem without going into the trouble of deriving a logical causality framework (e.g. [28]), in this thesis we simply assume the existence of a global timer solely for the measurement of FCFS fairness, although the global timer is not visible to the actual P2P system. Using this “non-existent” global timer, all events have their corresponding timestamps, and the time when a resource (request) enters the virtual queue is determined the moment the provider (requestor) expresses its intent, often by initiating some protocol-specific messages. With this model, it becomes straightforward to measure FCFS

Figure 3.1. FCFS fairness modeled via a virtual producer-consumer queue resources

providers consumers

requests P2P Overlay

fairness: for a given resource (request) entering the queue, how many resources (requests) queue-jump it (i.e. cut in the line) subsequently.

FCFS Fairness Index (FFI): for each request (resource) entering the virtual

queue, the average numbers of requests (resources) that queue-jump it.

To illustrate the idea of FFI further, consider Figure 3.2 in which there are three resource providers A, B, and C who enter the virtual queue successively (in the order A-B-C). Because B enters the queue after A, yet gets fulfilled earlier than A, it therefore queue-jumps A. On the other hand, C is served last and does not queue-jump others. Accordingly, the FFI is 1 for A, and the average FFI for the whole system is 1/3.

Note that FFI measures requests and resources separately. Indeed, in this thesis we focus on minimizing FFI for resources only. Minimizing FFI for both resources and requests simultaneously and efficiently is considered future work. Also note that different variations of FFI measures are possible, especially if we measure the maximum number of queue-jumping experienced by the resources or requests rather than the average. The benefit of this variation is that it measures the “worst-case” scenario rather than averages. Nevertheless, our

serve

Figure 3.2: A cut in line example +1

simulation experiments are based on the average indexes only. Also note that the definition of FFI above makes it difficult, if not impossible to realize a true FCFS queue in P2P settings, as two requests occurring in a given order (based on the global timer) may reach a given peer in the reverse order due to unpredictable communication delays. However, the index is quite intuitive and straightforward to implement in simulator.

With the definition of FFI in mind, our goal is to investigate suitable implementation of an efficient, decentralized virtual queue over P2P networks. The implementation should be decentralized such that each peer should communicate with its neighbors and made scheduling decisions based on local information, although some local information may in fact contain partial global knowledge accumulated gradually as the network evolves. The idea can be illustrate in Figure 3.3 below, where the virtual queue is implemented as a collection of distributed but mutually collaborating queues.

Figure 3.3. FCFS fairness modeled via multiple distributed queues

The implementation should result in both low FFI and low request processing time, which are somewhat mutually conflicting since achieving low FFI suggests that some global knowledge should be accumulated or searched, e.g. to find the longest-waiting resources across the P2P network, which may result in longer response time in total when compared to simply searching for available resources nearby.

In addition, the desirable implementation should be as proximity-aware as possible. A proximity-aware algorithm tries to locate resources whose peers are close to the requesters in terms of communication speed, which is important, for example, for grid applications where executing a job may imply large-volume data transfers. As discussed in Chapter 2, although proximity-aware algorithms are desirable, the property is not built-in in many well-known P2P systems and requires additional infrastructure support.

Finally, the implementation should be adaptive. This is crucial because both the patterns of request generation and resource supply can vary over time, and the trend may last for a long period of time. As an illustration, simply consider different time zones around the globe.

One probable, recurring trend may be that machines generate more requests during day time, while providing more resources during midnight. Obviously, it is possible to improve overall response time if the knowledge about request and resource supply patterns can be exploited when routine requests to resources.

相關文件