Inferring Trimming Activity of Solid-State Drives Based on Energy Consumption
Total Page:16
File Type:pdf, Size:1020Kb
Inferring Trimming Activity of Solid-State Drives Based on Energy Consumption James Shey, Ryan Rakvic, Hau Ngo, Owens Walker, Thomas Tedesso, Justin A. Blanco, Kevin Fairbanks Electrical and Computer Engineering Department United States Naval Academy Annapolis, MD, US. fshey, rakvic, ngo, owalker, tedesso, blanco, [email protected] Abstract—Solid-state drives (SSDs) have become pervasive in power consumption behavior could signal that a device is modern computing and are replacing hard disk drives in many malfunctioning. Accordingly, it is important to develop various applications. However, the mechanism by which SSDs store and techniques to examine SSDs and ensure a particular device is modify data is intrinsically different from hard disk drives. For example, a memory location on a SSD must be erased behaving as expected. There has been work on the energy prior to being written. The main contribution of this paper efficiency of SSDs [4–6], but an extensive literature review is a set of measurement and analysis techniques for inferring indicates that this is the first effort to correlate a specific class the behavior of a SSD by observing its power consumption. of SSD functionality, such as TRIM, with power consumption. This paper measures and analyzes the energy consumption of This paper is organized as follows. A brief review of the the TRIM command for three separate SSDs. Energy and time models are derived for all three SSDs and it is shown that these architecture and operation of SSDs is provided in Section II models are approximately linear as a function of the size of the while Section III discusses related work. The experimental file being trimmed. Additionally, empirically obtained signatures design is presented in Section IV and the results are discussed are presented to identify when a TRIM command is issued to in Section V. Finally, Section VI draws conclusions and the SSD based on the observed waveform. Our findings support proposes future work. the hypothesis that energy and time models, as well as power signatures, differ among drive manufacturers. II. SSD ARCHITECTURE AND OPERATION Index Terms—SSD; power consumption; modeling; SSDs have faster access speeds because they do not have the I. INTRODUCTION moving mechanisms that are present their HDD counterparts. Solid State Drives (SSDs) come from a niche market, but Without the moving heads and rotating platters, every block on recently entered the mainstream storage-media market and are the same physical chip can be accessed with the same latency. available on a wide variety of consumer computers, including While SSDs can be built on either NOR or NAND flash laptops. As an alternative to conventional hard disk drives memory technology, most modern SSDs utilize the NAND (HDDs), SSDs have several benefits including lower read- architectures. Floating transistors in NAND-flash memory are write latency and lower energy consumption [1]. SSDs have arranged in rectangular grids known as memory blocks. Each become pervasive in modern computing, aided by the fact transistor in a column is connected in series such that the they are manufactured with equivalent interfaces and form drain terminal of one is connected to the source terminal of factors as magnetic HDDs, allowing an smooth transition. the next transistor in the column. A typical memory block has However, the mechanism by which SSDs store and modify 32 to 256 columns and 4096 to 65536 rows. Each row in a data is intrinsically different from HDDs. Many factors, which block is called a page. Within a memory block, word lines are are hardware and software related, affect the operation of SSDs connected to the gates of each row. The source terminal of the [2]. first transistor in each column, known as the source select, is The main contribution of this paper is a measurement and connected to the source line. Due to the setup of NAND flash analysis technique for inferring a specific SSD command, memory, it must be erased in blocks. TRIM, by observing the power consumption of the measured To ensure that the access time remains fast throughout the device. The impact of this work touches the fields of computer lifetime of the SSD, many manufacturers employ a technique security and privacy as an SSD’s power consumption can to reclaim pages with obsolete data known as garbage col- be profiled and aberrant behavior flagged similar to the side lection. The SSD controller keeps track of whether the data channel detection described in [3]. From a digital forensics within the pages of each block are valid or obsolete. When the and/or confidentiality concern standpoint, it may be impor- SSD is idle, the controller performs the garbage collection task tant to know with some certainty how the behavior of a which relocates pages with valid data in a partially filled block particular SSD will affect the ability to retrieve information. to another (presumably better utilized) block, and then erases Additionally, from a reliability viewpoint, a change in the the original partially filled block. How aggressively and how often the SSDs perform garbage collection is manufacturer dependent [1, 7, 8]. To ensure longevity of the drive manufacturers employ wear leveling. Each transistor can be written to a finite number of times. Wear leveling works with garbage collecting to write data to blocks that have the lowest number of writes. TRIM is a command that allows the operating system to send the SSD a message indicating that a file (which translates to all pages that belong to that file) can be marked as obsolete so that all the pages belonging to a deleted file data can be erased [8]. III. RELATED WORK As SSDs continue to gain popularity, studying their perfor- mance characteristics has become an area of major interest Figure 1. System Setup including (a) Daughterboard and (b) Data Recorder [1, 7, 9]. In [7], the performance of SSDs using the TRIM feature is analyzed and it is shown that the TRIM feature can have a noticeable degradation on performance for SSDs. Table I SOLID-STATE DRIVES TESTED In [6, 8, 10, 11], it has been demonstrated that the fea- tures that SSD manufactures present in their datasheets are sometimes misleading. As an example, leading manufactures sometimes claim to perform TRIM, but a detailed black-box approach [8] found otherwise. This black-box analysis utilizes a software suite (including the algorithm outlined in [11]) to verify the bits on the drive in order to make inferences about SSD behavior [8]. In our work, we make use of the black- box approach [8] in our experimental setup and the algorithm in [11] to test whether a drive has actually been erased after A. Computer Setup having been given the command to erase it. There are numerous articles that have studied the power The testbed system is an Intel Core i5-2400 System with usage of different digital devices [12, 13] and, in particular, 16 GB DDR3 PC3-10600 running Windows 7 Service Pack hard drives [4–6, 14–16]. There has also been work on the 1. The system contains two drives, the first is an HDD that efficiency of SSDs by determining the relationship between contains the Operating System and all software required for workload and energy [3, 4] and one effort [6], through the use the experiments, and the second is the SSD to be tested. This of power analysis, demonstrated that a specific SSD performed setup ensures that the read, write, and delete commands for writes in coarser granularity than a single page. Other related the target SSD are controlled through the testbed programs (as work [14, 15] has focused primarily on modeling, whereas the opposed to the OS). The test SSDs are listed in Table I. research presented here is experimental. B. SSD Monitoring IV. EXPERIMENT DESIGN To monitor the test SSD, a daughterboard consisting of two This section describes the experimental setup used to mon- low-resistance precision resistors was inserted into the drive’s itor the power consumption of an SSD and map it to com- 4 pin Disk Drive Power Connector lines, as shown in Fig. mands provided to the SSD. The entire measurement system 1(a). A common measurement approach, this layout is similar is automated through the workload program to synchronize to the setup used in [14]. The daughterboard provides test the measurements of the executed commands with the data points to monitor the voltage across the resistor and across recorder via the computer’s serial port. The overall setup is the SSD. Both voltages are measured using 14 bits/sample at shown in Fig. 1. TRIM commands were evaluated for file 2 MS/s with 10:1 passive probes by a GEN3i High-Speed sizes of 1GB, 5 GB, 10 GB, 15 GB, 20 GB, and 25 GB Data Recorder with a GN412 High-Speed 100 MS/s Data as well as total disk usage of 25%, 50%, 75%, and 100%. Acquisition Card, shown in Fig. 1(b). This setup allowed The common, fixed file size measurements allow SSDs to be adequate sampling to capture all changes in the SSD current compared directly. Ten trial runs were conducted for each data and voltage while maintaining an error of less than 1mV. The point. The remainder of this section discusses the setup of data recorder also monitors the serial port of the computer, the computer, monitoring of the SSD, and operation of the enabling the recording of when commands are executed for workload program. different operations on the computer. for each drive which is shown in Fig. 6 and Fig. 7. Signature in this context is a unique pattern of energy consumption and not a mathematical model.