Emerging byte-addressable non-volatile memory(NVM), such as phase change memory(PCM) has many advantages in terms of low power consumption, high density and in-place update. Due to its asymmetry characteristic of read and write latency, the cost of the NVM write operation is much more expensive than that of read operation, which accounts for the most of energy consumption of NVM storage and be the major obstacle of NVM development. Thus, reducing the energy consumption of NVM is an important step for promoting the NVM widely used in the market. Moreover, most of energy consumption of NVM are focused on the write operations, so in the design of energy efficiency approaches, one of the most challenging problems is to reduce unnecessary write activities on NVM. Different from flash memory, when updating the data pages, there is no erasure step in the write operation of PCM due to its bit-alterability, so that when an input bit is as the same as the corresponding target bit, such write operation will be skipped, otherwise, there is need a write operation. Therefore, based on such advantage of NVM, we can effectively reduce the energy consumption of NVM with an appropriate technique.In this paper, we present an optimal content-aware NVM memory writing mechanism, CA-NVM, to effectively select a free NVM page for each write request from file system to reduce write activities. The key idea is to find a free page, whose content is similar to that of I/O request page. Thus, updating a whole free page only need few bit flips, as a result, the number of write operations can be reduced, as well as the energy consumption of NVM storage. In order to speed up the procedure of selecting a similar free page, we introduce a sampling mechanism, by which we only pick a few bits from the free page and the request page, then by comparing and analyzing those sample bits, we can find a near optimal free NVM page as target to be written by the data of request page. Based on the huge number of NVM free pages and irregular page location of NVM free pages, we designed a special storage area to store partial sample bits of free page, thus, those sample bits can be indexed quickly.In this paper, we conduct a series of experiments based on realistic traces, and the experimental results show that the proposed technique can reduce write activities up to 36.03%, and reduce energy consumption by 21.3% on average compared with a random based free-page allocation mechanism. |