This application claims priority from European Patent Application No. 16305307.7, entitled “METHOD FOR TESTING PERFORMANCE OF A STORAGE DEVICE AND CORRESPONDING DEVICE”, filed on Mar. 21, 2016, the contents of which are hereby incorporated by reference in its entirety.
The present disclosure generally relates to the field of performance testing of storage devices.
Digital video recording (DVR) and Personal Video Recording (PVR) functions are proposed by many audio/video consumer devices. DVR/PVR functions allow a user to record, to playback, and to pause a broadcasted audio/video stream. DVR/PVR functions are proposed on television sets, set top boxes (STB), mobile devices, and personal computers. For reasons of economy and footprint, these devices are commonly not supplied with a storage device required to enable use of the DVR/PVR functions. It is up to the consumer to supply an external storage apparatus and to connect it to a data communication port of the audio/video device. Examples of commonly commercialized storage devices are Universal Serial Bus (USB) Hard Disk Drives (HDD) and memory sticks. Storage devices come in various prices and different quality. Personal computers (PCs) generally have sufficient internal hard disk space for providing a DVR/PVR function. However, the performance of DVR/PVR read-write operations can be degraded by other tasks that are simultaneously executed by the PC and that also make use of the internal storage device, and which are not under control of the audio/video application.
If the performance of a storage device used for DVR/PVR functionality is insufficient, the DVR/PVR function will be adversely affected, resulting in visible and audible artefacts such as macroblocks and audio/video glitches. Consumers may mistakenly conclude that the audio/video device is defective, resulting in a considerable workload for helpdesk and after-sales services.
There is thus a need for performance testing of storage devices.
The present disclosure aims at alleviating at least some of the deficiencies discussed in the background section.
To this end, the present principles comprise a method for evaluating performance of a storage device connected to a host device. The method is implemented by the host device. The method comprises executing read-write tests on the storage device and obtaining a performance profile of the storage device through measuring a read-write transfer bit rate of the storage device according to a result of the read-write tests, the performance profile indicating that the storage device has sufficient performance capabilities to be used as a device for storing and retrieving video data with a video resolution corresponding to the performance profile.
According to a further embodiment of the method for evaluating performance of a storage device connected to a host device, the read-write tests are binary read-write operations on a memory segment in the storage device.
According to a further embodiment of the method for evaluating performance of a storage device connected to a host device, contents of the memory segment are saved in the host device before executing the read-write tests and the saved contents are restored to the storage device after having executed the read-write tests.
According to a further embodiment of the method for evaluating performance of a storage device connected to a host device, the obtaining of the performance profile further comprises obtaining a maximum number of supported simultaneous read-write operations.
According to a further embodiment of the method for evaluating performance of a storage device connected to a host device, the video resolution is one of a standard definition video resolution, a high definition video resolution, or an ultra-high definition video resolution.
According to a further embodiment of the method for evaluating performance of a storage device connected to a host device, the performance profile further indicates a personal video recording type class, obtained from the maximum number of supported simultaneous read-write operations, the personal video recording type class being one of:
a recording or time shift class;
a recording and time shift class.
According to a further embodiment of the method for evaluating performance of a storage device connected to a host device, the performance profile is saved in the host device.
According to a further embodiment of the method for evaluating performance of a storage device connected to a host device, the performance profile is saved in a network storage area.
The present principles also relate to a host device for evaluating performance of a storage device connected to the host device. The host device comprises a processor and a memory configured to execute read-write tests on the storage device and to obtain a performance profile of the storage device through measuring a read-write transfer bit rate of the storage device according to a result of the binary read-write tests, the performance profile indicating that the storage device has sufficient performance capabilities to be used as a device for storing and retrieving video data with a video resolution corresponding to the performance profile.
According to a further embodiment of the host device the processor and the memory are further configured to execute the read-write tests as binary read-write operations on a memory segment in the storage device.
According to a further embodiment of the host device the processor and the memory are further configured to save contents of the memory segment in the host device before executing the read-write tests and to restore the saved contents to the storage device after having executed the read-write tests.
According to a further embodiment of the host device the processor and the memory are further configured to obtain a maximum number of supported simultaneous read-write operations in order to obtain the performance profile.
According to a further embodiment of the host device the processor and the memory are further configured to save the performance profile in the host device.
According to a further embodiment of the host device the processor and the memory are further configured to save the performance profile in a network storage area.
The present principles also relate to a non-transitory computer readable medium storing instructions for performing the method for evaluating performance of a storage device connected to a host device according to the previous mentioned embodiments of the method.
More advantages of the present disclosure will appear through the description of particular, non-restricting embodiments. In order to describe the manner in which the advantages of the present disclosure can be obtained, particular descriptions of the present principles are rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. The drawings depict exemplary embodiments of the disclosure and are therefore not to be considered as limiting its scope. The embodiments described can be combined to form particular advantageous embodiments. In the following figures, items with same reference numbers as items already described in a previous figure will not be described again to avoid unnecessary obscuring the disclosure. The exemplary embodiments will be described with reference to the following figures:
As briefly discussed in the background section, the audio/video receiver 11 comprises a data communication port (not shown) for connecting the storage device 12. While the audio/video receiver 11 comprises DVR/PVR functions, it requires the presence of storage device 12 to propose the DVR/PVR functions to the consumer. A storage device is generally not supplied with the audio/video receiver 11 but is to be supplied by the consumer. Consumers have a wide choice of storage device types, models and make. For example, the consumer may provide a USB memory stick. USB memory sticks comply with various standards (e.g., USB 1.0, 2.0 or 3.0) and come in various qualities. It has been found that while USB memory sticks electrically do comply with a given standard, the maximum data transfer rate is sometimes way lower than could have been expected according to the standard it is supposed to comply with. Unlike for USB memory sticks, a speed class rating is defined for storage devices of the SD card type. However, even if it is indicated in a user manual that for good performance of DVR/PVR operations an SD card is to be used with a speed class rating equal or higher than a given value, it cannot be guaranteed that consumers respect this.
It is therefore useful to evaluate the performance of a storage device before starting to use it for DVR/PVR functions in order to avoid malfunctioning of the DVR/PVR functions.
During operation of STB 11, a user selects an audio/video channel to tune to using remote control 10. A corresponding instruction is sent to CPU 116, which retrieves a channel list from NVM 110, extracts associated tuning parameters from the channel list, and instructs tuner 115 to tune to a frequency indicated by the extracted tuning parameters. The tuner 115 then receives an audio/video stream broadcasted on the given frequency and transfers the received audio/video stream to audio/video decoder 118. The audio/video decoder 118 transfers decoded audio/video to graphics/audio controller 112, which outputs audio/video to rendering device 13. When the user presses a pause button on remote control 10 to pause the broadcast channel received, STB 11 stores the audio/video stream received from tuner 115 on storage device 12. When the user then resumes playing, STB 11 transfers the stored audio/video stream to audio/video decoder 118 and decoded audio/video is rendered on rendering device 13. During this time, STB 11 continues to store the audio/video broadcast stream received from tuner 115 on storage device 12. In this configuration, storage device 12 is used as a buffer memory for a time shift operation. It can thus be seen that the time shift requires simultaneous read and write operation on storage device 12. The read-write performance of storage device 12 should be sufficient to support the resulting high data communication rate and frequent alternation of read-write operations if the time shift feature is to function correctly.
When the storage device is connected, the device driver attributes a physical name to the storage device, e.g., /dev/sda, or/dev/sda1 and /dev/sda2 if the device has two partitions. Binary read (and write) operations can be done directly from (to) these partitions that are mounted on the host device. For example, the binary segment may span over several files when memory segment start address x corresponds to somewhere in one file and the memory segment end address corresponds to somewhere in another file stored on the storage device.
Then a read-write operations performance test of the storage device 32 or 33 is executed by the host device on the memory segment in the storage device 32 or 33 that corresponds to binary segment 30. For this purpose, binary read-write tests are executed. ‘Binary’ in this context means, that the read-write operations are executed on a low abstraction level; for example, at driver level. When the read-write performance testing is completed, the copy of the memory segment on the storage device used for the performance test is retrieved (backed up) from storage space available to the host device (other than the storage device) and is restored to the storage device by a binary write operation to the memory segment on the storage device at its original place. This way, the memory contents of the storage device are restored to its original state, i.e., the state it had before execution of the binary read-write tests. The binary read-write performance is tested through a set of binary read-write operations and evaluating time required to complete these operations. The set may comprise one, two, ten, hundred or thousand or more read-write operations.
According to a different embodiment, the binary read-write tests comprise the determining of a read-write bit rate. For example, a minimum, a maximum or a mean bit rate is determined. For example, to determine a mean bit rate, a delay is defined in which repetitive read-write tests are done. When the delay expires, the number of completed read-write test iterations is totalized. The amount of data read-written and the number of completed iterations then allow to determine the mean read-write bit rate. For example, to determine a maximum read-write bit rate, a delay is defined in which repetitive read-write tests are done. When the delay expires the maximum read-write bit rate is then obtained by dividing the amount of data read-written in each iteration of the completed read-write tests by the time needed to complete the iteration, comparing the results for all completed iterations and selecting the highest read-write bit rate. For example, to determine a minimum read-write bit rate, the results for all completed iterations are compared and the lowest bit rate is selected. Determining the minimum and maximum bit rate in addition to the determining the mean bit rate is advantageous for determining a precise profile of the storage device. For example, while a storage device has a mean bit rate that is sufficient for providing DVR/PVR functions, the minimum bit rate is lower than a minimum threshold bit rate, in which case the minimum bit rate rather than the mean bit rate is a good indicator for determining the performance profile of the storage device. Performance profiles are handled further on. For example, while mean and minimum read-write bit rates are sufficient for supporting DVR/PVR functions, the variance between minimum and maximum read-write bit rates may exceed a tolerance, in which case the storage device may be considered as too unreliable for providing DVR/PVR functions.
According to a different embodiment that can advantageously combined with the previous embodiments, the binary read-write tests comprises determining of a maximum number of simultaneous read-write operations.
As mentioned above, a performance profile is established according to the result of the binary read-write tests. The performance profile indicates for which use the storage device is suited for. For example, a performance profile indicates that the storage device is suited (has sufficient performance capabilities) for storing and playback of Standard Definition (SD), High Definition (HD) or Ultra-High Definition (UHD) type content through a classification in a maximum supported video resolution class, or in other words, the performance profile indicates that the storage device has sufficient performance capabilities to be used as a device for storing and retrieving video data with a video resolution corresponding to the performance profile. The performance profile may also indicate that the storage device is suited for storage and playback of content having one or more video profiles of a specific encoding standard such as baseline profile, main profile, high profile such as defined for MPEG2 or H.264 encoded video. The performance profile may also indicate that the storage device is suited for storage and playback, for example, of one or more video resolutions associated to one or more standards. For example, a performance profile may indicate that a storage device is suited for storage and playback of SD encoded video; for SD and HD encoded video; for MPEG2 SD encoded video; for H.264 HD encoded video; for MPEG2 SD and H.264 HD encoded video; for MPEG2 HD high profile and H.264 UHD main profile encoded video.
The performance profile may also indicate through a classification in a multiple recording class that the storage device is suitable for simultaneous recording of multiple audio/video streams. The simultaneous recording of multiple audio/video streams may for example allow to record streams from several TV channels simultaneously, or for example to record one TV channel while time shifting another TV channel. For example, the performance profile indicates through a classification in a time shift class that the storage device is suitable for simultaneous recording of an audio/video stream and playback of the recorded audio/video stream for time shift purposes, while a classification in a single recording class indicates that the storage device is suited for non-simultaneous single recording and single playback not including time shift. For example, the performance profile indicates through a classification a UHD class that the storage device is suitable for UHD recording and playback, while it is suited for HD time shift and thus for SD time shift, but excluding UHD time shift. For example, the performance profile may indicate that the storage device is suited for UHD time shift, and thus for HD and SD time shift. According to a particular embodiment, the classification can be operated according to previous mentioned thresholds of mean, minimum and/or maximum bit rate. The table hereunder gives a simple and straight forward example of performance profiles based on mean read-write bit rate thresholds. It does for example not take in to account the previous discussed measuring of minimum and maximum read-write bit rates nor does it for example take into account a differentiation of support for according to maximum supported video resolution class.
<10 Mbit/s
Bit rates of audio/video streams may vary according to encoding type, scene, and encoding quality. For example, the highest bit rate of a variable bit rate MPEG-2 encoded SD stream of a football match may approach a highest bit rate of a variable bit rate HEVC encoded HD stream of the same. According to a different embodiment, the thresholds are determined according to the bit rates of the streams that the host audio/video receiver device is to receive, for example according to the highest bit rate that can be expected for streams in the subscripted channels.
Among advantages of the binary operation of the read-write testing according to the present principles are that the binary read-write tests are independent of the file system type, partitioning or formatting used on the storage device, which enables evaluating a performance profile of unformatted storage devices or storage devices comprising a file system that is not supported by the host, or of storage devices comprising encrypted files. Thus, advantageously, the performance profiling according to the present principles allow to determine if, in terms of read-write operation rate, a storage device is suitable for being used with the host device to implement DVR/PVR features. For example, a host device that only supports the Linux file system “ext”, can execute a performance profiling evaluation on a storage device formatted according to a HFS file system of Apple Inc. Then, if the result of the performance test is satisfying, the host may inform a user that the performance test was successful, that the storage device may be used as a storage device for providing DVR/PVR functions, and may ask the user if he/she agrees with reformatting the storage device with a file system compatible with that used by the host. The reformatting is for example only proposed if the outcome of the performance evaluation is that the storage device is suited for DVR/PVR use with the host device.
According to a different embodiment, the performance profile is stored on the host device. According to a different embodiment, the performance profile is related to an identification of the storage device or to a type of storage device, e.g., comprising the model and make of the storage device. According to a different embodiment this relation is stored on the host device. Then, when the storage device is removed and replaced by another of a same type or of a same model and make, it can be determined from the stored performance profiles that a stored performance profile already exists for the device and that it is not necessary to perform the performance test again. Multiple performance profiles can be stored, for example in a table of a database. According to a different embodiment, the performance profile is stored on the storage device. According to a different embodiment, the performance profile is stored in a storage space in a network to which the host device is connected. Then, if a storage device is connected to a host device, the host device interrogates the network to find out if a performance profile exists for the model and make of storage device. If so, it is not necessary to retest the storage device and the results of the performance test stored in the network can be retrieved by the host device. Advantageously, host devices thus share a common knowledge base using a network storage space for storing performance profiles of storage devices, so that a performance profile, once established by any of a plurality of host devices, can be retrieved by any of the plurality of host devices later on, thereby avoiding that for a same model and make of storage device multiple performance evaluations are done.
According to a different embodiment, a protection is provided against unplugging of the storage device when the binary read-write testing is ongoing, as this can cause a data corruption on the storage device as has been discussed above. To this end, when the storage device is unplugged during binary read-write testing, the host device detects the unplugging and generates an audible and/or visible message to incite the user to re-plug the storage device to avoid data corruption on the storage device. According to a different embodiment, when the storage device is re-plugged, it is verified that the segment used for the read-write tests is in the same state as it was before the unplugging. If it is in the same state, the read-write tests can continue; if not, the storage device has been used in between or a different storage device has been plugged instead. The read-write tests are aborted and the data saved (backed up) via the host device are not restored to the segment of the storage device to avoid overwriting of data on the storage device.
As will be appreciated by one skilled in the art, some elements in the drawings may not be used or be necessary in all embodiments. Some operations may be executed in parallel. Different embodiments other than those illustrated and/or described are possible. For example, while in
As will be appreciated by one skilled in the art, aspects of the present principles can be embodied as a system, method or computer program instructions for storing on a computer readable medium. Accordingly, aspects of the present principles can take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code and so forth), or an embodiment combining hardware and software aspects that can all generally be defined to herein as a “circuit”, “module” or “system”. Furthermore, aspects of the present principles can take the form of a computer readable storage medium. Any combination of one or more computer readable storage medium(s) can be utilized.
Thus, for example, it will be appreciated by those skilled in the art that the diagrams presented herein represent conceptual views of illustrative system components and/or circuitry embodying the principles of the present disclosure. Similarly, it will be appreciated that any flow charts, flow diagrams, state transition diagrams, pseudo code, and the like represent various processes which may be substantially represented in computer readable storage media and so executed by a computer or processor, whether or not such computer or processor is explicitly shown.
A computer readable storage medium can take the form of a computer readable program product embodied in one or more computer readable medium(s) and having computer readable program code embodied thereon that is executable by a computer. A computer readable storage medium as used herein is considered a non-transitory storage medium given the inherent capability to store the information therein as well as the inherent capability to provide retrieval of the information there from. A computer readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. It is to be appreciated that the following, while providing more specific examples of computer readable storage mediums to which the present principles can be applied, is merely an illustrative and not exhaustive listing, as is readily appreciated by one of ordinary skill in the art: a hard disk, a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Number | Date | Country | Kind |
---|---|---|---|
16305307.7 | Mar 2016 | EP | regional |