基于UKSM的高效內存合并技術的研究和實現
發(fā)布時間:2018-03-22 17:27
本文選題:操作系統 切入點:內存文件系統 出處:《南京大學》2017年碩士論文 論文類型:學位論文
【摘要】:內存去冗余化一直是計算機高性能領域研究的一個熱點,在服務器上特別是云計算中,各類的服務或者虛擬機對內存的需求很高,在傳統的虛擬機技術中,每個虛擬機(VM)都需要有一塊獨立的內存,不能的虛擬機內存之間存在著相同頁面;而在輕量級的容器技術中,不同容器之間,容器與主機之間會存在著不少的文件和內存數據是重復的;在內存計算中,對內存的需求尤其大。其他包括個人計算機和終端設備如手機也存在著內存緊張的問題。因此不僅有必要,也有需求提高內存利用率。因而,探究更好的去除內存冗余度的方法將有很大的應用前景。內存去冗余就是消除內存中的相似或是相同的內存區(qū)域,把存儲多份冗余的內存變?yōu)橹淮鎯σ环莸囊环N方法。系統中可能會存在大量的冗余內存,當前主要有內存壓縮和內存去冗余兩種方法,并且都已經成功應用在Linux內核中。內存去冗余的代表作是UKSM,內存壓縮的代表作是Zswap。然而,現在Linux內核中的這兩種機制是由不同的團隊設計并且實現的,它們去除內存冗余的速度和方式不相同,因而不能相互替代,在內存緊張時,同步Zswap會先壓縮內存,會導致UKSM無法掃描到被壓縮的頁面。這時需要一種協同工作機制能夠協調這兩種方法運行。文件系統的文件緩存存在于內存中,當前沒有方法能夠消除文件系統中文件緩存的冗余數據。主要原因是文件緩存存在于內存中,涉及與I/O交互的塊設備,設計一種方法統一消除所有文件系統中文件緩存的冗余是個很困難的任務。但是如果可以消除內存中文件緩存的冗余數據,就可以有效提高系統內存利用率。本文對上述兩個問題進行研究,針對第一個問題提出了內存壓縮和內存去冗協同工作機制,協調兩種方法的運行,具體設計了一種同步機制,在進行內存壓縮前首先進行內存去冗余掃描,確保所有相同的頁面都被合并。同時考慮了不對整個系統的性能造成過大影響。針對第二個問題,結合UKSM設計了種包含文件數據切片,頁面合并,頁面拆分的文件系統去冗余方法。本文的主要成果如下:1.同機制,考慮了內存壓縮和內存去冗余這兩種方法的特性,也考慮了協同機制對系統性能的影響,并且在Linux內核中實現了這種機制。2.設計對比實驗測試了協同運行機制,豐富的實驗結果證明了這個機制的有效性,并且在高CPU負荷和高內存需求時都表現良好。在給系統帶來快速合并內存頁面的性能優(yōu)勢時,對CPU占用的增加并不明顯。3.針對特定的內存文件系統,本文設計了文件緩存的去冗余機制。結合UKSM的掃描設計,根據虛擬文件系統的設計(VFS),對文件(inode)切片,分割成適合采樣、掃描的小塊。設計了中斷安全的頁面比較合并機制和頁面拆分的寫時拷貝技術。在Linux內核中實現。4.根據內存文件系統文件緩存去冗余機制,設計對比實驗,在實驗中對文件緩存頁面的去冗余速度高達2.28MB/s。
[Abstract]:To memory redundancy is a hot research area of high performance computer, especially on the server in the cloud, all kinds of services or virtual machine memory demand is very high, in the traditional virtual machine technology, each virtual machine (VM) are required to have a separate memory, there are the same the page between the virtual machine memory cannot; and in the lightweight container technology in different containers, between the container and the host will have a lot of documents and data memory is repeated; in memory computing, the memory requirement is particularly large. Others include personal computer and terminal devices such as mobile phone also has the memory stress the problem is not only necessary. Therefore, there is also a demand to improve memory utilization. Therefore, the removal method of memory redundancy into better will have great application prospect. To eliminate redundant memory is in memory or similar The same area of memory, to store multiple copies of the redundant memory becomes a method of a stores only. There may be a large number of redundant memory systems, currently there are two methods to redundant memory compression and memory, and have been successfully applied in the Linux kernel. On behalf of the redundant memory to UKSM that representative memory compression is Zswap., however, now the two mechanisms in the Linux kernel is implemented and designed by a team of different speed and the way they remove redundant memory are not the same, so it can not replace each other in memory, tense, synchronous Zswap will be compressed memory, will cause UKSM to be unable to scan compression of the page. Then we need a collaborative work mechanism to coordinate operation of the two methods. The file system cache file exists in memory, currently there is no way to eliminate redundant files in a file system cache The main reason is the data. The file cache exists in memory, to interact with the I/O block device, design a unified method to eliminate redundant files of all the file system cache is a very difficult task. But if you can eliminate the redundant data in the file cache memory, can effectively improve the system memory utilization in this paper. Research on these two problems, put forward to solve the first problem of memory compression and memory redundancy to collaborative work mechanism, coordination of two methods of operation, the specific design of a synchronization mechanism in memory compression before the first memory to redundant scanning, ensure all the same pages are merged. Considering the performance the whole system does not cause too much influence. Aiming at the second problems, combined with the UKSM file containing the data slice, the design of the page to merge the file system page split redundancy method. The main results are as follows: 1. the same mechanism, considering the characteristics of these two kinds of methods to redundant memory compression and memory, also consider the influence of cooperative mechanism on the performance of the system, and in the Linux kernel implements the mechanism design of.2. experiment mechanism test, abundant experimental results prove the validity of this the mechanism, and CPU in high load and high memory requirements are in good performance. Bring the performance advantages of fast merge memory page, the increase of CPU is not obvious for.3. memory occupy a particular file system, this paper designed to redundancy mechanism of the file cache. Combined with UKSM scan design, based on Virtual design the file system (VFS), the file (inode) were divided into small pieces for sampling, scanning is designed. Compared with the Security page interrupt mechanism and page split copy on write technology. In the Linux kernel,.4. is implemented according to the memory redundancy mechanism of memory file system file, and a contrast experiment is designed. In experiment, the redundancy speed of file cache page is as high as 2.28MB/s..
【學位授予單位】:南京大學
【學位級別】:碩士
【學位授予年份】:2017
【分類號】:TP333.1
【相似文獻】
相關碩士學位論文 前1條
1 姜承祥;基于UKSM的高效內存合并技術的研究和實現[D];南京大學;2017年
,本文編號:1649647
本文鏈接:http://sikaile.net/kejilunwen/jisuanjikexuelunwen/1649647.html