The present described embodiments have application within the telecommunication sector, and especially, in the area of web content provisioning.
In order to minimize delivery delays when a user request a web content to an internet server, communication networks are typically distributed in a system of intermediate nodes. Instead of delivering the requested web content directly from the server to the end user, the requested context is cached in the intermediate nodes. However, the storing capacity of the intermediate nodes is limited, and not all the information from every server can be duplicated in every single node. For this reason, the data stored in a node is constantly updated in an effort to comprise the most popular and request web content, typically following a Least Recently Used (LRU) replacing policy.
In order to maximize the speed at which the node provide cached web content to an end user, the nodes typically comprise two different kinds of storage media: a fast Random Access Memory (RAM), and a slower hard disk (HD). If the node needs to deliver content from the hard disk, the web caching system of the node needs to first store the requested content in the RAM, replacing any other contents stored in the RAM to free the required space. Therefore, the web caching system of the node constantly reorganizes web content in both storage media, in an effort to keep the most popular content in the RAM, and the rest of the popular content in the HD. Also, content downloaded from the server through the RAM of the node needs to be copied to the HD to minimize data loss in case of power outages.
HD management systems are required to handle simultaneously read and write operations. Since conventional web caching systems treat both types of operations equally, read requests can be delayed when operating under heavy activity. As users only perceive the delay in read operations, but are unaware of when writing operations occur in the HD, this results in a deterioration of the overall performance perceived by the user.
Several proposals have been made in order to increase the performance of hard disk based storage systems and reduce the average delay suffered in the provisioning of a web content requested by a user. For example, the performance of a hard disk strongly depends on how the mechanical read and write headers are moved across the disk to fetch and write data. For this reason, various scheduling policies have been proposed to optimize the aggregated disk throughput, such as SCAN (elevator algorithm), FCFS (First come first serve) and SSTF (Shortest seek time first). For real time applications, Earliest Deadline First (EDF) policies are typically applied. However, these policies are designed for general purposes and do not take into account the specific characteristics of the web content being read/written in intermediate nodes, and therefore, they do not optimize user experience in web caching systems.
A different strategy to optimize HD performance is to improve the hardware performance of the device, using faster storage technologies. For example, US 2010/0199036 A1 presents a hierarchical classification of multiple hard disks, sorted according to their access rate. The most popular data is therefore allocated in the fastest hard disks, thus minimizing the average delay of a read request. Also, US 2010/0235569 A1 optimizes a solid state memory lifespan by distributing write operations fairly across the physical memory, avoiding hot spots that may damage the device. These techniques are transparent to the web caching scheduling, and therefore compatible with any web caching system.
Various object replacement schemes have been devised to replace basic LRU algorithms and optimize the data that is kept in a memory when said memory becomes saturated and new data needs to be written. For example, U.S. Pat. No. 6,266,742 B1 maximizes the efficiency of caching systems by using a metric that takes into account access frequency, size, lifetime and time to fetch of an object. U.S. Pat. No. 6,425,057 B1 propose the inclusion of a probability function to evaluate the cost of keeping or replacing an object in the cache. U.S. Pat. No. 6,772,199 B1 allow applications to define the criteria for cache replacement. These techniques improve cache memory usage by optimizing the data that is stored in the memory, but do not affect the time required to access said memory in a read operation. Therefore, read operations can still be delayed by write operations in scenarios of heavy activity, and the user experience can be degraded.
Therefore, there is a need in the state of the art for a method and system of caching web content in intermediate nodes equipped with hard disks that improve the average delay of web content delivery to a user, regardless of the hardware architecture and the replacing policy of said node.
The present disclosure solves the aforementioned problems by disclosing a method, system and computer program that prioritizes read operations versus write operations, therefore reducing the delay suffered by web content retrieval requests and improving the user experience.
In a first aspect of the present disclosure, a method of caching web content in a node with a hard disk is disclosed. According to the disclosed method, write requests of web content issued to the hard disk are queued in a first queue with a lower priority, whereas read requests of web content issued to said hard disk are queued through a second queue with a greater priority. Therefore, read requests are prioritized when scheduling access requests to the hard disk, and the average delay when providing web content to a user is reduced. Preferably, the method further comprises monitoring a saturation level of the hard disk, that is, the relation between an actual data throughput in relation to the maximum data throughput of the hard disk. The information about the saturation level is then applied to the scheduling of read and write requests coming out of their respective queues, always maintaining a greater priority for read operations. More preferably, no write operations queued at the write operations queue are scheduled unless the saturation level of the device is below a given first threshold. Therefore, the hard disk is only accessed to write web content when said hard disk is not saturated, and can still provide requested web content without an increased delay.
Preferably, the method comprises scheduling multiple writing operations when the hard disk saturation level is below a given second threshold. Therefore, in scenarios with low hard disk activity, multiple write operations can be simultaneously scheduled to also optimize the delay of web content storing operations.
Preferably, the queue for write requests is a first-in first-out (FIFO) queue. Also preferably, requests in said queue are divided into data blocks of a constant size. This allows to progressively store web content in the hard disk using the remaining data throughput allowed by read operations, in scenarios where said remaining data throughput would not be enough to store a whole web content object without delaying read operations.
Since write requests can be indefinitely delayed in their queue when a continuous flow of read requests is present, the method preferably comprises checking an expiration of said write requests, and removing from the queue any expired request.
In a second aspect of the present disclosure, a system of caching web content in a node with a hard disk is presented. The system comprises:
First scheduling means, which queue read requests of web content cached in the hard disk of the node in a first queue, and write requests to cache web content in said hard disk in a second queue. Preferably, the queue for write request is a FIFO queue, and queued web content is divided into data blocks with a fixed size.
Preferably, monitoring means adapted to measure a data throughput of a hard disk.
Second scheduling means, which schedule read and write requests queued at the two queues, giving a greater priority to the queue of read requests. Preferably, the second scheduling means perform the scheduling of write and read requests according to the monitored data throughput of the hard disk. More preferably, the second scheduling means are configured to only schedule queued write requests when the data throughput is below a given first threshold, that is, when the hard disk is not saturated. Also preferably, more than one write request can be scheduled simultaneously when the monitored data throughput is below a second threshold (lower than the first threshold). Preferably, the second scheduling means verify an expiration of queued write requests and dismiss any expired requests.
In a third aspect of the present disclosure, a computer program is disclosed, comprising computer program code means adapted to perform of the described method when said program is run on a computer, a digital signal processor, a field-programmable gate array, an application-specific integrated circuit, a micro-processor, a micro-controller, or any other form of programmable hardware.
With the disclosed method, system, and computer program, the average time required to deliver any web content cached in the hard disk of an intermediate node is reduced, optimizing the user experience provided by the web caching service. Additionally, the disclosed embodiments can be applied to any hard-disk-based web caching system, since it is completely independent of hardware characteristics, allocation criteria, and replacement schemes. These and other advantages will be apparent in the light of the detailed description.
For the purpose of aiding the understanding of the characteristics of the presently described embodiments, according to a preferred practical embodiment thereof and in order to complement this description, the following figures are attached as an integral part thereof, having an illustrative and non-limiting character:
The matters defined in this detailed description are provided to assist in a comprehensive understanding of the described embodiments. Accordingly, those of ordinary skill in the art will recognize that variation changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the described embodiments. Also, description of well-known functions and elements are omitted for clarity and conciseness.
Note that in this text, the term “comprises” and its derivations (such as “comprising”, etc.) should not be understood in an excluding sense, that is, these terms should not be interpreted as excluding the possibility that what is described and defined may include further elements, steps, etc.
In conventional web caching systems, in order to access files in hard disks, the web caching application (1) calls different kernel APIs (3), but all calls are treated uniformly because operating systems are typically designed to provide a fair service to all applications. Being agnostic to the characteristics of each application, web caching applications (1) implemented in conventional storage systems can suffer unnecessary response time degradations due to sudden disk write operations.
The web caching object management (14) plane comprises a web caching object pool (10), which acts as first scheduling means; a device performance monitor (11), which monitors the data throughput of the hard disk, and therefore its saturation level; and an object persistence manager (12) which acts as second scheduling means.
If the requested web content is cached in the node (20), the web caching object pool (10) verifies (21) if said web content is stored in the RAM. If not (22), a request to retrieve the web content is sent (23) to the object persistence manager (12). Otherwise (24), the web content is delivered (25) to the user from the RAM. In both cases, the process at the web caching object pool (10) finishes (26).
Additionally, the web caching object pool (10) manages all stored web content objects in the node, tracks a fixed amount of RAM memory, and keeps the most popular web content cached in the RAM according to any of the object replacement policies for cached data known in the state of the art. When the web caching object pool (10) determines that a web content that is stored in the RAM is to be removed, the web caching object pool (10) checks if the web content object is already stored in the hard disk. If that is the case, the web content is simply removed from the RAM and no further actions are taken. If the object is not stored in the RAM, and according to particular embodiments, the caching object pool (10) may decide to store it in the hard disk, or not to take further actions, in which case the object is effectively removed from web caching at the node and the next request for said object will generate a new request to the origin server.
Once a web content object is downloaded from the origin server, the download manager (9) informs the web caching object pool (10) of the reception of the new object. The web caching object pool (10) checks if the object has to be cached depending, for example, on HTTP headers and expiring information, or on any other cache management criteria. If the web caching object pool (10) decides to cache the object, the object persistence manager (12) is requested to store the object in the hard disk. Otherwise, the object is only stored in the RAM and no other operation is performed at the hard disk.
The hard disk accesses the items of the disk operation queue (32), that is, the queued read operations (29) and read operations (27) and performs the corresponding tasks (write data into the hard disk or retrieve data from said hard disk). When a disk operation (that is, a read or write operation in the hard disk) is completed (33), the disk operation scheduler may queue more operations in the disk operation queue (32), prioritizing read requests (29). All the queues of the object persistence manager (12) are FIFO queues.
Since requests queued at the object persistence manager (12) may correspond to web content of different sizes, the disk operation scheduler (31) converts these requests into disk operations with a fixed size, that is, disk operations that retrieve or write a fixed number of bits. Also, since write requests (27) can be infinitely delayed in the first queue (28), the object persistence manager (12) periodically checks if the web content related to the write request (27) is expired. If the web content is expired or is close to be expired, the write request (27) is cancelled by the object persistence manager (12), avoiding unnecessary write operations.
The disclosed scheduling architecture and policies allow to prioritize users requests for web content cached in the hard disk versus data storing operations issued by the web caching object pool (10), and therefore improving the overall experience of the user, who perceives a shorter delay when asking for data cached in the hard disk. Also, the method and system may be advantageously combined with any other web caching optimizing technique regarding hardware, allocation criteria, or object replacement techniques.
Number | Date | Country | Kind |
---|---|---|---|
12382510.1 | Dec 2012 | EP | regional |
This application is a national stage application, and claims the benefit of priority, of International Patent Application No. PCT/EP2013/077158, filed Dec. 18, 2013, and entitled “Method And System of Caching Web Content In A Hard Disk,” which claims the benefit of priority of European patent application EP 12382510.1, filed Dec. 18, 2012, each of which is incorporated herein by reference in its entirety and for all purposes.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2013/077158 | 12/18/2013 | WO | 00 |