2. Related work

File prefetching is an effective technique for improving file access performance. File prefetching brings two major advantages. First, applications execute smoothly because they hit more in the file cache. Second, there is less “burst” load placed on the network because prefetching is done only when there is network bandwidth available rather than on demand. On the other hand, there are two main costs of prefetching. One cost is the CPU cycles expended by the client in determining when and what to prefetch. Cycles are spent both on gathering the information which is necessary to make prefetching decisions, and on actually executing the prefetching.

The other cost is the network bandwidth wasted when prefetch decisions inevitably prove less than perfect [5].

There are kinds of distributed file systems using file prefetching to improve performance. File prefetching has also been used in web prefetching for tolerating web access latency. The following briefly describes works involving file prefetching on distributed file system, Web prefetching, and automatic prefetching.

2.1 Distributed file system

Now a day, network file system [11] is more and more mature. Network file system is usually named as distributed file system, because shared files and directories can be supported by many unlike computers on network. Distributed file system can let users from different computing systems access their own files in the same directory. The primary concept of distributed file system is client/server system. One computer system provides other computers for accessing services. The supply device is server, and the request one is client.

For all users who use or manage computers, distributed file system provides

12

many very important advantages. A user can access files in the same form from one or different computers. For system management, they can simplify the manage works like backup or recovery and can centralize the standard system manage work like create/delete account or monitor the use of system and so on.

Because the high-speed network, powerful local servers, and distributed file system which have been tested by time work well in the “open source code” environment, we can use distributed file system more easily than before. The following is a brief introduction of some kinds of distributed file system. z AFS (Andrew File System) & OpenAFS

AFS [12] [13] is a distributed file system product, pioneered at Carnegie Mellon

University and supported and developed as a product by Transarc Corporation (now

IBM Pittsburgh Labs). It offers client/server architecture for file sharing, providing location independence, scalability and transparent migration capabilities for data.

IBM branched the source of the AFS product, and made a copy of the source available for community development and maintenance. They called the release

OpenAFS. The original release is distributed here as OpenAFS 1.0.

OpenAFS is based on client/server architecture model and is aimed at WAN application. To reduce the delay of network transmission, OpenAFS uses cache to overcome this problem. While a user is opening a file to edit, the file server sends the front blocks to the client device. S/he may very likely want to edit the rest part of this file. About this reason, OpenAFS file server will fetch the whole file and send it to the cache of the client device. When this user continues to edit this file, the rest of this file has already been the local cache. Before writing back this file, there is no more network transmission. z NFS (Network File System)

The Network File System (NFS) [14] is the most popular distributed file system.

13

Almost all UNIX and UNIX-like system can use NFS. It was developed to allow

machines to mount a disk partition on a remote machine as if it were on a local hard

drive. This allows for fast, seamless sharing of files across a network.

It also gives the potential for unwanted people to access your hard drive over the

network (and thereby possibly read your email and delete all your files as well as

break into your system) if you set it up incorrectly. So please read the Security section

of this document carefully if you intend to implement an NFS setup.

The latest one, NFS (Network File System) version 4 [15] is a distributed file

system protocol which owes heritage to NFS protocol versions 2 [16] and 3 [17].

Unlike earlier versions, the NFS version 4 protocol supports traditional file access

while integrating support for file locking and the mount protocol. In addition, support

for strong security (and its negotiation), compound operations, client caching, and

internationalization have been added. Of course, attention has been applied to making

NFS version 4 operate well in an Internet environment.

z

Coda [18] [19] is an advanced networked file system. It has been developed at

CMU since 1987 by the systems group of M. Satyanarayanan. in the SCS department.

Actually, Coda is a branch of AFS and is produced based on the source code of AFS

version 2. So, Coda can share many functions with AFS.

Its main goal is to solve problems with worse or even inexistence network

connection. Coda is the first distributed file system supporting disconnected

operation for mobile computing. This means that a user can continue to operate files in cache even if the network is disconnected. While reconnecting, the client device will synchronize files in the local cache and those in the file server automatically. z GFS (Global File System)

Sistina GFS [20] is the industry’s most advanced and mature scalable file system.

14

Recognized as the de facto cluster file system on Linux, Sistina GFS is a highly stable

solution for enterprise and technical computing applications requiring reliable access to data.

Sistina GFS allows multiple servers on a Storage Area Network (SAN) to have read and write access to a single file system on shared SAN devices, delivering the strength, safety and simplicity demanded by enterprise and technical computing environments. z InterMezzo

InterMezzo [21] is a new distributed file system with a focus on high availability.

InterMezzo will be suitable for replication of servers, mobile computing, managing system software on large clusters, and for maintenance of high availability clusters.

For example, InterMezzo offers disconnected operation and automatic recovery

from network outages. InterMezzo is an Open Source (GPL) project. InterMezzo entered the at version 2.4.15. z Sprite

Sprite [22] [23] is a research developed at the University of

California, Berkeley, by John Ousterhout's research group.

Sprite is a distributed operating system that provides a single system image to a cluster of workstations. It provides very high file system performance through client and server caching. It has process migration to take advantage of idle machines. It was used as a testbed for research in log-structured file systems, striped file systems, crash recovery, and RAID file systems, among other things. z xFS

There is a serverless file system called xFS [24] which will attempt to provide low latency, high bandwidth access to file system data by distributing the functionality of the server among the clients. The typical duties of a server include

15

maintaining cache coherence, locating data, and servicing disk requests.

The developers of xFS are currently developing cache coherence protocols which

use the collective memory of the clients as a system-wide cache. By reducing the

amount of redundant caching among clients and allowing the memory of idle

machines to be utilized, cooperative caching can lower the latency of reads by

reducing number of requests which must go to disk.

The function of locating data in xFS is distributed by having each client

responsible for servicing requests on a subset of the files. File data is striped across

multiple clients to provide high bandwidth. The striped data includes parity

information which can be used to reconstruct a missing stripe segment due to, for

example, a machine being down. In this way, no node is a single point of failure.

2.2 Web prefetching

People use the World Wide Web (WWW) because it gives quick and easy access to a

tremendous variety of information in remote locations. Users do not like to wait for

their results; they tend to avoid or complain about Web pages that take a long time to retrieve. That is, users care about Web latency. In distributed information systems like the World Wide Web, prefetching techniques attempt to predict the future requests of users based on past history, as observed at the client, server, or proxy. Prefetching for the Web is an active area of study that has considerable practical.

The objective of prefetching is the reduction of the user perceived latency. Web

servers are in better position in making predictions about future references, since they

log a significant part of requests by all Internet clients for the resources they own. The

prediction engine can be implemented by exchange of messages between the server

and clients, having the server piggybacking information about the predicted resources

onto regular response messages, avoiding establishment of any new TCP connections.

16

WMo is a new algorithm whose characteristics include three factors: a) the order

of dependencies between page accesses, b) the noise present in user (i.e., access that

are not part of a pattern), c) the ordering of accesses within access sequences, that

characterize the performance of predictive web prefetching algorithms [25] [26].

However, there is no way for the approach to pre-retrieve documents that are

newly created or never visited before. For example, all anchored URLs of a page are

fresh when a client gets into a new web site and none of them will be pre-fetched by

the approaches. For dynamic HTML sites where a URL has time-variant contents, few

existing approaches can retrieve desired documents.

NewsAgent [27], a client-side prefetching system monitor client’s web surfing

behaviors and dynamically establishes keyword-oriented access preferences. It employs neural networks to predict future requests based on the preferences. Such a domain-specific prefetching system is not necessary to be running all time; it could be turned on or off on-demand like many other advanced browser features.

Figure 5 presents the architecture of semantics-based predictive prefetching. It

assumes that a personalized information agent (or proxy) is running behind the

browser interface and watching over its client web access behaviors. This agent

analyzes the documents that its client is browsing with an intention to extract their

semantics and find out the semantic relationships between the accesses (step 1). The

semantic information is represented in an open model, which accumulates client

knowledge about the client preferences with a self-learning capability (step 2). Based

on the knowledge, the agent makes predictions about its client’s future requests (step

3) and “steal” network bandwidth to prefetch related Web documents from the

Internet (step 4). The prefetched documents are temporarily stored in the agent’s internal cache (step 5). This prefetching agent also serves as a client-side proxy of the browser. It provides the browser with requested Web pages transparently from its

17

cache, if they are available (step 6). Otherwise, it fetches the pages from the Internet.

Expectedly, the cache would contain some prefetched documents that are never

accessed by the client. This information will be used as a feedback to improve the

prediction accuracy in the future.

Figure 5: Architecture of Semantics-based Prefetching

2.3 Automatic prefetching

Automatic prefetching is also called as “Intelligent prefetching.” This technique is widely used to improve I/O performance, earn a higher cache hit rate, and reduce network latency. The following is some studies about the implementations of automatic prefetching. z Context modeling

With the rapid increase of processor speeds, file system latency is a critical issue in computer system performance. Standard Least Recently Used (LRU) based caching techniques offer some assistance, but by ignoring any relationships that exist between file system events, they fail to make full use of the available information.

18

Just as a word in a sentence occurs in a context, a character in a string can be considered to occur in a context. For example, in the string “object” the character “t” is said to occur within the context “objec”. However, we can also say that “t” occurswithin the context “c”, “ec”, “jec”, and “bjec”. The length of a context is termed its order. In the example string, “jec” would be considered a third order context for “t”. In text compression these contexts are used to model which characters are likely to be seen next. For example, given that we have seen the context “object” it may be likely that the next character will be a space, or possibly an “i”, but it is unlikely that the next character is an “h”. On the other hand, if we only consider the first order context, “t”, then “h” is not so unlikely.

Imitating the relationship of the context, there are sequences of file system events. In [28], they generate a maximum-likelihood estimation of the probability of that child’s event occurring. There is a probability threshold set to choose the data which is prefetched into the cache for this event. Prefetched data is placed at the front of the cache, and since the cache replacement is still LRU, the data will most likely be in the cache for the next several events. The result is that although the cache prefetches based on predictions for what the next event will be, since the prefetched data is likely to be in the cache for more than just the next event, as long as the event occurs before its data is removed from the cache we still avoid a cache miss. Figure 6 is a example trie for sequence CACBCAABCA. After context “CA” occurred, the probability of accessing “A” is 1/3, the probability of accessing “C” is 1/3, and accessing nothing has the 1/3 probability. Accounting to the present context, it can choose the next file to prefetch by the accessing probability.

19

Figure 6: Context Modeling Example

To implement this method with using a tire, a data structure based on tree to store, it needs lots of memory space to store data. If there are n different files and the highest degree is m, the time complexity is O(nm). The further researches design the improved method Partitioned Context Modeling (PCM) [29] and Extended PCM

(EPCM) [30]. But it only reduces little memory space. z Automatic file prefetching in MAS TC/S

In MAS TC/S [2], a practical approach for file prefetching in distributed file system

[4] is proposed. This method will analyze the past system access record, if an application access pattern matches the existing access pattern, the file prefetching will do so. An application tree is based on user-operation trace which records the user’s all operation trace. An application tree is combined by three kinds of nodes and connects with each node by their relationship. The three kinds of nodes are a) process node, b) program file node, and c) data file node. The process node records the process information. The program file node records the information of the execution file. The data file node records the information of files accessed by the process. Figure 7 is an application tree example.

During a session, a user’s using trace forms as user-operation trace. To analyze the user-operation trace, it gets many application trees. Then, by analyzing these application trees, it gets the corresponding total-ordered trace and pattern tree table.

Figure 8 illustrates the process from user-operation trace to total-ordered trace. Figure

20

9 is an example of the pattern tree table.

Figure 7: An application tree example

User-operation trace Application treeAccording to Total-ordered trace occur-time

Figure 8: The process from user-operation trace to total-ordered trace

1

2

3

4

5

Figure 9: Pattern tree table

21

After a user login MAS TC/S, system call analyzer will generate the pattern tree table

based on past file access records. During the session of the user this time, it must

generate the real-time user-operation. System call tracer will send the user-operation

to prefetch manager to analyze at once. While there is a matched pattern tree with the

analyzed prefetch tree table, prefetch manager immediately request cache manager to

prefetch the prefetch file candidate in this pattern tree. The cache manager must

consider the size of cache. Based on Least Recently Used (LRU) mechanism, while

the size of cache is not enough, cache manager should appropriately write back the

file which has not been accessed in the longest time for getting freer space for the prefetched files.

22