A hybrid storage technology for low power consumption and high I/O performance in an IPTV set-top box
来源期刊:中南大学学报(英文版)2012年第5期
论文作者:KIM Deok-hwan YANG Jun-sik
文章页码:1267 - 1275
Key words:IPTV set-top box; hybrid hard disk; prefetching; spin-down; low power consumption
Abstract:
A new method of prefetching data blocks from the NVCache to the page cache in main memory and cascading prefetching n-blocks from a hard disk to the NVCache together was proposed to reduce the spin-up frequency of a hybrid hard disk drive and thus enhance I/O performance. The proposed method consists of three steps: 1) Analyzing the pattern of read requests in block units; 2) Determining the number of blocks prefetched to the NVCache; 3) Replacing blocks in the NVCache according to the block replacement policy. The proposed method can reduce the latency time of a hybrid hard disk and optimize the power consumption of an IPTV set-top box. Experimental results show that the proposed method provides better average response time compared to an existing adaptive multistream prefetching (AMP) method by 25.17%. It also reduces by 20.83% the average power consumption over that of the existing external caching in energy saving storage system (EXCES) method.
J. Cent. South Univ. (2012) 19: 1267-1275
DOI: 10.1007/s11771-012-1138-7
KIM Deok-hwan, YANG Jun-sik
Department of Electronics Engineering, Inha University, Incheon 402-751, Korea
? Central South University Press and Springer-Verlag Berlin Heidelberg 2012
Abstract: A new method of prefetching data blocks from the NVCache to the page cache in main memory and cascading prefetching n-blocks from a hard disk to the NVCache together was proposed to reduce the spin-up frequency of a hybrid hard disk drive and thus enhance I/O performance. The proposed method consists of three steps: 1) Analyzing the pattern of read requests in block units; 2) Determining the number of blocks prefetched to the NVCache; 3) Replacing blocks in the NVCache according to the block replacement policy. The proposed method can reduce the latency time of a hybrid hard disk and optimize the power consumption of an IPTV set-top box. Experimental results show that the proposed method provides better average response time compared to an existing adaptive multistream prefetching (AMP) method by 25.17%. It also reduces by 20.83% the average power consumption over that of the existing external caching in energy saving storage system (EXCES) method.
Key words: IPTV set-top box; hybrid hard disk; prefetching; spin-down; low power consumption
1 Introduction
Internet protocol television (IPTV) provides interactive data services such as video on demand (VoD), TV shopping, online game, Internet chat, live TV broadcast, and e-magazines through the use of internet protocol over a computer network infrastructure. For these services, a set-top box in the home decodes the delivered TV program content and then displays it on a multimedia appliance, as shown in Fig. 1. In particular, a personal video recorder (PVR) plays a major role in the operation of IPTV set-top boxes, and an auxiliary storage medium is required to play a recorded TV program.
Recently, high-capacity storage devices such as hard disk drives are used to record and play video data for time shifting and VoD services in soft real time. However, hard disk drives have major limitations, including the high amount of power and their latency time, as they perform I/O operations mechanically. Moreover, while the recorded VoD data are playing, the data must be transmitted from the hard disk drive to the main memory periodically. In order to access the data periodically, the drive should maintain its spindle motor in active status. This requires power, and may be problematic when attempting to achieve low power consumption.
On the other hand, hybrid storage technology combining the advantages of a hard disk drive and flash memory has recently been announced. This technology allows a hard disk drive to cache data by placing flash memory between the drive and the main memory. This minimizes the action of the spindle motor in the drive by performing I/O operations using data that are prefetched to the flash memory [1-2].
However, although I/O operations can be accomplished through flash memory, it is impossible to prefetch all data on a hard disk drive to flash memory. Hence, it is necessary to spin up the spindle motor of the hard disk drive to access video data [3]. The operation of the spindle motor leads to I/O delay and incurs additional power costs. Even when the hard disk drive is replaced with a hybrid storage system, as the start-up frequency of the spindle motor in the hard disk drive increases, the performance of the hybrid storage system decreases and its power consumption increases.
In this work, an n-block cascaded prefetching technique using hybrid storage adaptable to a set-top box of IPTV is proposed. Blocks prefetched from the NVCache to the page cache are used to meet quality of service requirements when playing video frames in IPTV, and n-blocks that are cascaded and then prefetched to the NVCache from the hard disk are organized with a set of temporally and spatially continuous blocks on the hard disk. Therefore, the proposed method can reduce the power consumption of IPTV set-top boxes and improve their I/O performance.
Fig. 1 Architecture of an IPTV system
2 Related work
The hard disk drive is a storage device that consumes a considerable amount of power in consumer electronics. Therefore, it is important to decrease the power consumption and improve I/O performance by keeping the spindle motor idle as much as possible and by minimizing its active status during I/O operations. This can be done by decreasing the mechanical movement in the drive.
In preceding studies, researchers improved system performance using hybrid devices in which a hard disk drive and flash memory were combined in their computer system environments.
USECHE et al [4] proposed the use of flash memory as a cache for prefetching frequently used data. When the system requests a prefetched block, power consumption can be reduced by running the I/O service through flash memory without accessing the hard disk drive.
BISSON et al [5-6] enhanced the prefetching technique by dividing the data blocks in flash memory into frequently accessed blocks and infrequently accessed blocks. The frequently accessed blocks are pinned so that the number of disk accesses can be minimized while the infrequently accessed blocks are unpinned to utilize the flash memory space effectively.
The RA method [7] is used to execute pre-reading and prefetching continuous position blocks in Linux for improved system performance.
GILL and BATHEN [8] proposed the AMP method. The AMP method generates the history by obtaining prefetching grades and trigger distance factors. In addition, it can change the prefetching grade and trigger factors dynamically. The AMP method can also prefetch other requests simultaneously while several applications are running.
A system based on the IPTV set-top box must transmit the data continuously at a fixed period to play a video stream. However, the earlier research methods did not consider the real-time constraints of VoD service. Hence, the frequent state changes of the spindle motor result in sudden under-run, implying that screen is paused while the buffer refills.
3 IPTV storage system architecture
The overall architecture of the storage system in an IPTV set-top box is described. The proposed storage system, which uses a hybrid disk drive in an IPTV set-top box, uses n-block cascaded prefetching for I/O operations. When a read request comes from an IPTV, the proposed storage system inspects the page cache in the main memory as the traditional set-top box does. If the corresponding pages do not exist in the page cache, it transmits the blocks prefetched in the NVCache of the hybrid storage system to the IPTV instead of directly accessing hard disk drive. This reduces the spin-up frequency of the hard disk drive and initiates a spin-up of the hard disk only when a read-miss occurs in the NVCache.
3.1 Storage system architecture in IPTV set-top box
Figure 2 shows the overall architecture of the storage system in an IPTV set-top box. The architecture was implemented in Linux (kernel 2.6.24). The gray boxes represent the new components of the proposed system, whereas the white boxes represent existing components of the Linux kernel. A DRAM cache manager exists at the top level, an I/O request analyzer, n-block prefetching manager and power manager are located at the middle level, and a hybrid hard disk device driver is located at the bottom level. The DRAM cache manager checks the buffering level of the page cache and prefetches blocks from the NVCache to the page cache if needed. As data blocks are prefetched in the page cache when sequentially playing video, most data access operations are performed in the page cache. When a frame of the VoD content that is playing is not found in the page cache, the I/O request analyzer inspects the requested blocks in the NVCache. If there is no match, it forwards I/O requests to the block device driver to prefetch n-blocks from the hard disk drive. The I/O request analyzer then performs an analysis of the block with respect to the request of the I/O scheduler in the kernel and redirects I/O requests to the hard disk drive or the NVCache. The n-block prefetching manager replaces the blocks in the NVCache considering the access frequency of the prefetched blocks in the NVCache. In order to maintain the soft-real time constraints in the IPTV system, the I/O scheduler assigns different priority values to the read requests, write requests and data communication requests for IPTV service, respectively. The I/O scheduler assigns the highest priority to read requests of VoD content to prevent under-runs and guarantee seamless VoD service.
3.2 Power manager
The power manager measures the power consumption of the hybrid hard disk. As shown in Fig. 3, it is divided into two parts:
1) Measurement of the power consumption of the hard disk based on a status change of the spindle motor;
2) Measurement of NVCache power consumption.
Based on the I/O log data of the hybrid hard disk, the hard disk power measurement module measures the power consumption in the hard disk [9]. In addition, the NVCache power management module measures the power consumption in the NVCache. The total power consumption of a hybrid hard disk drive can be measured using the duration of the hard disk drive status, the number of status changes of the spindle motor in the hard disk drive, the duration of the NVCache status and the power consumption during each state:
(1)
where j represents the active, idle, stand-by and sleep state; Pj represents the power consumption of each status of the hard disk; Tj represents the duration of the hard disk status; Ekl represents the power consumption when the hard disk status changes from k to l; Nkl represents the number of status changes from k to l; m represents status (read, write, erase mode) of the NVCache; Gm represents the power consumption of each status in the NVCache; Tm represents the duration of the NVCache status.
Fig. 2 Storage system architecture in IPTV set-top box
Fig. 3 Structure of power measurement module in hybrid hard disk drive
3.3 I/O flow
When a block is requested from the IPTV, as shown in Fig. 4, the DRAM cache manager attempts to locate the requested block in the page cache. A radix tree is used to locate blocks requested from the page cache as a hierarchical index using a division of bits and enables a speedy retrieval. If this fails, the I/O request analyzer inspects the priority queue of the NVCache managing the prefetched blocks. If a read-miss occurs, it reads blocks from the hard disk. At that time, the hard disk drive performs a spin-up operation and prefetches n-blocks according to their priority selected by the I/O request analyzer, and the n-block prefetching manager replaces new prefetched n-blocks with old blocks with a low access frequency.
4 Extended technology for low power consumption and high I/O performance
4.1 n-block prefetching method of IPTV system
The proposed n-block prefetching method is a policy that enhances the performance of an IPTV system by prefetching n blocks to the NVCache at one time. It performs the prefetching of blocks to prevent a degradation of performance only when a read-miss of the NVCache occurs. When more blocks are prefetched, the efficiency of system is greater. However, it is important to determine the number of prefetched blocks, as the prefetching cache in the NVCache has a limited size. In order to reduce the spin-up frequency of the hard disk, the minimum number of prefetched blocks is estimated according to the latency time of spin-up of the hard disk and the number of dynamically prefetched blocks is estimated according to the priority of the requested block, respectively.
Figure 5 shows the status change of the hard disk, the latency time of launching the hard disk, and its power consumption. That is, as command execution starts, the status of the hard disk changes from stand-by to an active state. This is referred to as a spin-up event. It takes 4.2 s of latency time and 4.5 W of power consumption when the hard disk is activated by a command request.
Figure 6 shows the response time of a hard disk and its power consumption when the n-block prefetching method is applied. If the hard disk is in an idle, stand-by or sleep state, the transition to an active state requires some latency time in a traditional system. However, it is possible to reduce the latency time by reading requested blocks not from the hard disk but from the NVCache, as shown in Fig. 6. The proposed system performs an I/O operation by transferring prefetched blocks from the NVCache to the page cache in main memory during the latency time of spin-up of the hard disk. This can also reduce power consumption by keeping the spindle motor in a stand-by state.
First, the minimum number of n-blocks to perform I/O request and reduce the spin-up frequency of the hard disk drive is defined as nB,min [10]. The minimum number of n-blocks can be calculated as follows:
(2)
If all blocks can be read from the NVCache instead of the hard disk when the IPTV requests them, it will shorten the latency time for activating the spindle motor of the hard disk and reduce power consumption as caused by mechanical movement. tL is the latency time for the spin-up of the hard disk, tA refers to the access time of the NVCache, and tT represents the time necessary to transfer one block from the NVCache to the page cache in main memory. One of the factors considered in the proposed method is to prefetch not only requested blocks but also n-blocks spatially close to them by determining the number of prefetched blocks. The summation of tA and tT is the time necessary to access the NVCache and transfer one block from the NVCache to the main memory. The number of blocks to be prefetched can be calculated by dividing it into the time necessary for transferring one block into memory, tL.
Fig. 4 I/O flow of hybrid storage system using n-block prefetching
Fig. 5 Power consumption and response time of a general hard disk drive
Fig. 6 Power consumption and response time of hybrid hard disk drive
Second, the number of dynamically prefetched blocks for the k-th request, nD,k is defined based on the priority of the k-th request using the following equation:
(3)
where SNV is the size of the NVCache, SB is the size of one block in the NVCache, CR is the number of requested blocks after the requested I/O is analyzed, and nD,k is the priority of the k-th request. It is assumed that SB is the same as the sector size in the hard disk. WB can be calculated using the priority of the k-th request. The higher the priority is, the larger the weight of the block is. The block weight range is between 0 and 1.
For an I/O request with high priority, more blocks have to be prefetched. That is, if a request has priority over others, the I/O request analyzer will prefetch more blocks compared to an I/O request with low priority. This type of prefetching is known as dynamic prefetching. Estimating nD,k can reduce the spin-up operation of the hard disk and support soft real-time constraints.
4.2 Decision of block priority and block replacement
Figure 7 shows the structure of the I/O systems for executing n-block prefetching after determining the priority of I/O request and replacing the blocks in the NVCache. 1) The requested I/O blocks are stored in the I/O request queue in DRAM; 2) The priority of I/O request is determined based on the recency and frequency, and they are then placed into the prefetching request priority queue in DRAM; 3) For the blocks in the prefetching request priority queue, spatially and temporally closed blocks in the hard disk are prefetched to the NVCache using Eq. (2) or Eq. (3); 4) Blocks that have been prefetched to the NVCache are managed using the LRU policy so that old blocks with the low access frequency will be swapped out; 5) In order to swap out low-frequency old blocks, the NVCache prefetched n-block queue in DRAM manages the blocks according to the access frequency of the blocks in the NVCache.
4.3 Prefetching blocks based on priority
In order to prefetch blocks effectively, I/O requests must be analyzed in soft real time. After analyzing an I/O request, block prefetching is executed based on the recency and frequency of the I/O request. Prefetching blocks without priority ordering consumes more power and lengthens delay time when searching. Moreover, if a low-priority request is executed before a high-priority request, the performance becomes degraded and a delay time for extra block exchanges is required. Hence, it is necessary to reorder the requests according to their priorities. The priority of a k-th request is calculated using the following equation:
(4)
where c is the number of n-blocks, fk,t is the I/O request frequency of the k-th request during period t, and wt is the weighted value according to access time of the block during period t. The more recently a block is accessed, the higher the weighted value is.
The weighted value is calculated using the following equation:
(5)
where r is a constant that is used to adjust the amount of history information. Equation (5) shows the process of determining the weight when setting the priority of the requests. Additionally, wt is a regularized value between 0 and 1.
Fig. 7 Structure of I/O system for n-block prefetching
Using this regularized value, the priority can be determined in Eq. (4). r is a constant that is used to determine how much history needs to be saved. As r grows larger, the space for saving history also becomes larger and the performance of the learning will increase. However, prefetching should not depend only on the history. It is also necessary to consider the cost of saving a large amount of history information. For the purposes of the present paper, the proper value of r is 100. This value was used in the experimental evaluation.
The Algorithm 1 manages the prefetching request priority queue. If the requested block is already prefetched to page cache or NVCache, the entry in the prefetching request priority queue for the requested block is deleted.
Algorithm 1: Managing priority of request in prefetching a requested priority queue based on recency and frequency
Input: Block number
{
1 Determine the priority of the request in I/O request queue based on recency and frequency using Eq. (4);
2 Order the prefetching request priority queue based on priority;
3 if (the requested block is matched with a prefetched block in the NVCache)
4 {
5 Transmit the VoD contents of the corresponding prefetched block to the IPTV;
6 Increase the access frequency of the corresponding block in the NVCache prefetched n-block queue;
7 }
8 else
9 {
10 Spin-up the hard disk;
11 Transmit the VoD contents of the corresponding block in the hard disk to the IPTV;
12 Using Eqs. (2) and (3), perform n-block prefetching from the hard disk to the NVCache;
13 }
}
4.4 Priority of n-block replacement
The Algorithm 2 is for replacing blocks in the NVCache. The block replacement process will be executed in two cases. The first case is one in which the size of prefetched blocks exceeds 80% of SNV. The second case is one in which the hard disk begins a block transfer after its spin-up operation.
Algorithm 2: Block replacement
{
1 Based on the block access frequency, reorder blocks in the NVCache prefetched n-block queue;
2 if (the size of the prefetched block in the NVCache is over 80% of SNV)
3 {
4 Remove the block with the lowest access frequency;
5 Add a new prefetched block to the NVCache prefetched n-block queue;
6 reorder a new block based on the block access frequency;
7 }
}
5 Experimental evaluation
To evaluate the system performance, in this work, the proposed n-block cascaded prefetching method and the traditional prefetching methods such as RA, AMP and EXCES are compared. The experimental environment is comprised of a HYBUS X-Hyper320TKU board and a DTV which together simulate the IPTV service, as shown in Fig. 8. The X-Hyper320TKU board consists of a PXA320 (806 MHz) processer and a Samsung hybrid hard disk (HM16HJI model) as the storage device. The proposed system was implemented in C language under Linux kernel 2.6.24.
Fig. 8 X-Hyper320TKU Board
The characteristics of the hybrid hard disk used in the experiment are listed in Table 1. Table 1 gives the RPM, speed and power consumption of the hybrid hard disk [11-12].
The power consumption and response time were measured using BLTK (Linux Battery Life Tool Kit) [13]. Table 2 gives the characteristics of the VoD data set used in this experiment. One hundred measurements were made of the power consumption for the NVCache size, spin-up frequency and hit ratio when four VoD data sets were used.
Figure 9 shows the average power consumption of the six methods. The Vanilla kernel does not use any prefetching technique. The VoD frames sizes depend on the data characteristics. The experimental result shows that the power consumption of a dynamic n-block is 36.7% less than that of a Vanilla kernel when Media_1 is used. For the dynamic n-block method, Media _4 consumes 14.28%, 128% and 33.3% more power than Media_1, Media_2 and Media_3 because Media_4 has a larger VoD frame size than Media_1, Media_2 and
Table 1 Characteristics of hybrid hard disk drive
Table 2 VoD Data Set
Fig. 9 Power consumption of six methods
Media_3 and specially, Media_2 has the smallest running time among them.
Additionally, the power consumption of the minimum n-block and dynamic n-block methods were measured with respect to various NVCache prefetching cache sizes. Figure 10 shows that the average power consumption depends on the change of the NVCache prefetching cache size. This result shows that the power consumption of the minimum n-block and dynamic n-block methods decreases and the difference in the
Fig. 10 Power consumption according to various prefetching cache size of NVCache
power consumption of both methods increases as the prefetching cache size grow larger. That is, when 2 048 MB of NVCache is used as a prefetching cache, the difference in the power consumption of both methods becomes 11.77%. This result also shows that the dynamic n-block method consumes 5.52% less power than the minimum n-block method because the dynamic n-block method can reduce the spin-up frequency by dynamically adjusting the number of prefetched blocks based on the I/O pattern.
Figure 11 shows the average spin-up frequency for the following six methods: EXCES, RA, Vanilla Kernel, Minimum n-block, AMP and Dynamic n-block. The spin-up frequency is the source for determining the system performance and power consumption. The number of spin-up events in the hard disk was measured using BLTK, and the prefetching cache size was fixed to 2 GB. The results show that the spin-up frequency of the dynamic n-block method is 49.66% less than that of the Vanilla kernel method, 24.24% less than that of the minimum n-block method, 24.38% less than that of the EXCES method, 35.05% less than that of the AMP method and 45.13% less than that of the RA method. The dynamic n-block method shows superior performance because it prefetches the n-block dynamically to the prefetching cache in the NVCache so that the hard disk is scarcely accessed.
Fig. 11 Spin-up frequency of six methods
Figure 12 shows the average I/O response time for the six aforementioned methods. The I/O response determines the system performance. The response times of the I/O operations occurring in the hard disk were measured using BLTK. The experimental results show that the I/O response time of the dynamic n-block is 38.12% less than that of the Vanilla kernel when Media_1 is used. For the dynamic n-block method, Media_4 consumes 7.37% more power than Media_1 because Media_4 has a larger VoD frame size than Media_1.
Fig. 12 I/O response time of six methods
6 Conclusions
A type of hybrid storage technology was presented based on a cascaded prefetching method that can be equipped within an IPTV set-top box. The proposed method was implemented in modules so that it can be easily installed in an IPTV set-top box not by recompiling the Linux Kernel but by inserting modules into the kernel. Through experiments performed using 3 650 MB AVI files encoded by the H.264 protocol, it is shown that the proposed hybrid storage technology exhibits high I/O performance and low power consumption when used with the IPTV VoD service. According to a performance evaluation, the dynamic n-block method improves the response time by 25.17% and reduces the power consumption by 29.16% compared to a standard AMP method. Compared to the EXCES method with the use of the hybrid storage device, the dynamic n-block method improves the response time by 12.02% and reduces the power consumption by 20.83%. Hence, the main contribution of this work is the development of a hybrid storage platform that can be used practically in an IPTV set-top box.
Acknowledgments
This work was supported in part by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education, Science and Technology (2011-0004114) and in part by the Ministry of Knowledge Economy (MKE) and Korea Institute for Advancement in Technology (KIAT) through the Workforce Development Program in Strategic Technology and in part by the MKE (The Ministry of Knowledge Economy), Korea, under the CITRC (Convergence Information Technology Research Center) support program (NIPA-2012-C6150-1201-0001) supervised by the NIPA (National IT Industry Promotion Agency).
References
[1] PANABAKER R. Hybrid hard disk & readyDrive? technology: Improving performance and power for windows vista mobile PCs [C]// Proceedings of Microsoft WinHEC. Seattle, 2006.
[2] Intel? Turbo Memory with User Pinning. [2008-08-17]. http://www.intel.com/design/flash/nand/turbomemory/index.htm
[3] PARK Kwang-hee, YANG Jun-sik, CHANG Joon-hyuk, KIM Deok-hwan. Anticipatory I/O management for clustered flash translation layer in NAND flash memory [J]. ETRI Journal, 2008, 30(6): 790-798.
[4] USECHE L, GUERRA J, BHADKAMKAR M, ALARON M, RANGASWAMI R. EXCES: External caching in energy saving storage systems [C]// Proceedings of the 13th International Symposium on High-Performance Computer Architecture. Phoenix: IEEE Press, 2008: 89-100.
[5] BISSON T, BRANDT S, LONG D D E. NVCache: Increasing the effectiveness of disk spin-down algorithms with caching [C]// Proceedings of the 14th International Symposium on Modeling, Analysis, and Simulation of Computer and Telecommunication Systems (MASCOTS). Monterey: IEEE Press, 2006: 422-432.
[6] BISSON T, BRANDT S A. Adaptive disk spin-down algorithms in practice [C]// Proceedings of 3rd USENIX Conference on File and Storage Technologies (FAST). San Francisco: USENIX Press, 2004.
[7] BOVET D P, CESATI M. Understanding the Linux Kernel (3/E) [C]// O'REILLY Press, 2005.
[8] GILL B, BATHEN L. AMP: Adaptive multistream prefetching in a shared cache [C]// Proceedings of the 5th USENIX Conference on File and Storage Technologies (FAST). San Jose: USENIX Press, 2007: 185-198.
[9] GO Young-wook, LEE Geun-hyung, PHARK Kwang-hee, KIM Deok-hwan. Design and implementation of power consumption measurement simulator for hard disk on mobile computing system [C]// KIISE, Korea Computer Congress. Seoul, 2008: 459-463.
[10] KIM D H, YANG J S, SONG J S. n-block prefetching method using hybrid storage adaptable to an IPTV set-top box [C]// Proceedings of IC-ICTES. Pattaya: IEEE Press, 2011: 45-48.
[11] SAMSUNG HYBRID HDD HM16HJI characteristics. [EB/OL]. [2006-10-27]. http://www.samsung.com/us/consumer/office/hard- drives/hybrid- hdd-flashon/HM16HJI/index.idx?pagetype=prd_detail
[12] SAMSUNG Electronics. NAND-type Flash Memory. [EB/OL]. [2008-12-23]. http://www.samsung.com/Products/Semiconductor/ Flash/index.htm
[13] BROWN L, KARASYOV K A, LEBEDEV V P, STARIKOVSKIY A Y, STANLEY R P. Linux laptop battery life: Measurement tools, techniques, and results [R]. 2007.
(Edited by YANG Bing)
Received date: 2011-07-12; Accepted date: 2011-10-17
Corresponding author: KIM Deok-hwan; Tel: +82-32-868-3654; E-mail: deokhwan@inha.ac.kr