TW201705001A - Computer system and control method for random access memory - Google Patents
Computer system and control method for random access memory Download PDFInfo
- Publication number
- TW201705001A TW201705001A TW104124862A TW104124862A TW201705001A TW 201705001 A TW201705001 A TW 201705001A TW 104124862 A TW104124862 A TW 104124862A TW 104124862 A TW104124862 A TW 104124862A TW 201705001 A TW201705001 A TW 201705001A
- Authority
- TW
- Taiwan
- Prior art keywords
- memory
- random access
- access memory
- space
- computer system
- Prior art date
Links
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Description
本發明係有關於電腦系統,特別是有關於一種隨機存取記憶體控制方法及其電腦系統。 The present invention relates to computer systems, and more particularly to a random access memory control method and computer system therefor.
在現今電腦系統所運行的作業系統上使用隨機存取記憶體磁碟(RAM disk)之技術已愈來愈普及。因為隨機存取記憶體有相當短的快速存取時間(約為10ns),使用者可不用再因為硬碟的磁頭讀寫時間(約為10ms)及固態硬碟的分頁存取時間(約為100μs)而感到存取資料緩慢。然而,隨機存取記憶體磁碟係屬於揮發性儲存裝置,其資料備份往往成為使用者最大的困擾點。若使用者所開啟的隨機存取記憶體磁碟之容量愈大,在開機或關機時往往會造成大量時間的儲存或讀取時間,進而拖垮開關機時的效能。然而隨著儲存裝置介面的演進,現今已可使用PCIe Gen.3x4(4GB/s)的頻寬。因此,在連續存取時間上,固態硬碟已經不再是系統的負擔,但針對隨機存取而言,還是受限於SSD的分頁存取時間。 The use of random access memory (RAM disk) technology in operating systems currently running on computer systems has become increasingly popular. Since the random access memory has a relatively short fast access time (about 10 ns), the user can eliminate the hard disk read/write time (about 10 ms) and the solid state hard disk paging access time (about 100μs) and feel that the access data is slow. However, the random access memory disk system is a volatile storage device, and its data backup often becomes the biggest trouble for users. If the capacity of the random access memory disk opened by the user is larger, it often causes a large amount of storage or reading time when the computer is turned on or off, thereby degrading the performance when the power is turned on and off. However, with the evolution of the storage device interface, the bandwidth of PCIe Gen. 3x4 (4 GB/s) is now available. Therefore, in the continuous access time, the solid state hard disk is no longer a burden on the system, but for random access, it is still limited by the paging access time of the SSD.
本發明係提供一種電腦系統,包括:一中央處理器;一系統記憶體;一儲存裝置,包括:一隨機存取記憶體;一非揮發性記憶體;以及一記憶體控制器,用以控制該非揮發性記憶體之存取,其中,該記憶體控制器更於該隨機存取記憶體上啟用一隨機存取記憶體磁碟,並將該非揮發性記憶體中所儲存之資料複製至該隨機存取記憶體磁碟以進行快速資料存取。 The invention provides a computer system comprising: a central processing unit; a system memory; a storage device comprising: a random access memory; a non-volatile memory; and a memory controller for controlling Accessing the non-volatile memory, wherein the memory controller further enables a random access memory disk on the random access memory and copies the data stored in the non-volatile memory to the Random access memory disk for fast data access.
本發明更提供一種隨機存取記憶體控制方法,用於一電腦系統,該電腦系統包括:一中央處理器;一系統記憶體;以及一儲存裝置,包括一非揮發性記憶體、一隨機存取記憶體、及一記憶體控制器,用以控制該非揮發性記憶體及該隨機存取記憶體之存取,該方法包括:利用該記憶體控制器於該隨機存取記憶體上啟用一隨機存取記憶體磁碟;以及利用該記憶體控制器將該非揮發性記憶體中所儲存之資料複製至該隨機存取記憶體磁碟以進行快速資料存取。 The present invention further provides a random access memory control method for a computer system, the computer system comprising: a central processing unit; a system memory; and a storage device including a non-volatile memory and a random memory Taking a memory and a memory controller for controlling access of the non-volatile memory and the random access memory, the method comprising: enabling the memory controller to enable the random access memory Random access memory disk; and using the memory controller to copy the data stored in the non-volatile memory to the random access memory disk for fast data access.
100‧‧‧電腦系統 100‧‧‧ computer system
110‧‧‧中央處理器 110‧‧‧Central Processing Unit
120‧‧‧系統記憶體 120‧‧‧System Memory
130‧‧‧平台控制集線器 130‧‧‧ Platform Control Hub
140‧‧‧儲存裝置 140‧‧‧Storage device
141‧‧‧記憶體控制器 141‧‧‧ memory controller
142‧‧‧非揮發性記憶體 142‧‧‧ Non-volatile memory
143‧‧‧隨機存取記憶體 143‧‧‧ Random access memory
144‧‧‧隨機存取記憶體磁碟 144‧‧‧ Random Access Memory Disk
210‧‧‧第一記憶體空間 210‧‧‧First memory space
220‧‧‧第二記憶體空間 220‧‧‧Second memory space
230‧‧‧第三記憶體空間 230‧‧‧ third memory space
S310-S320‧‧‧步驟 S310-S320‧‧‧Steps
第1圖係顯示依據本發明一實施例中之電腦系統之方塊圖。 1 is a block diagram showing a computer system in accordance with an embodiment of the present invention.
第2A~2B圖係顯示依據本發明一實施例中之記憶體空間分配的示意圖。 2A-2B are diagrams showing the memory space allocation in accordance with an embodiment of the present invention.
第3圖係顯示依據本發明一實施例中之隨機存取記憶體磁碟控制方法的流程圖。 Figure 3 is a flow chart showing a method of controlling a random access memory disk in accordance with an embodiment of the present invention.
為使本發明之上述目的、特徵和優點能更明顯易懂,下文特舉一較佳實施例,並配合所附圖式,作詳細說明如下。 The above described objects, features and advantages of the present invention will become more apparent from the description of the appended claims.
第1圖係顯示依據本發明一實施例中之電腦系統之方塊圖。在一實施例中,電腦系統100包括一中央處理器110、一系統記憶體120、一平台控制集線器(Platform Controller Hub,PCH)130、及一儲存裝置140。儲存裝置140係包括一記憶體控制器141、一非揮發性記憶體142、以及一隨機存取記憶體143,其中記憶體控制器141係支援快捷非揮發性記憶體(Non-volatile Memory Express,NVMe)標準,且非揮發性記憶體142例如是NAND快閃記憶體,隨機存取記憶體143係為動態隨機存取記憶體(例如LPDDR3 DRAM)。另外,中央處理器110及平台控制集線器130之間係透過直接媒體介面(digital media interface,DMI)進行溝通,且平台控制集線器130及儲存裝置140之間係以PCIe匯流排做為溝通橋樑。 1 is a block diagram showing a computer system in accordance with an embodiment of the present invention. In one embodiment, the computer system 100 includes a central processing unit 110, a system memory 120, a platform controller hub (PCH) 130, and a storage device 140. The storage device 140 includes a memory controller 141, a non-volatile memory 142, and a random access memory 143. The memory controller 141 supports a non-volatile memory (Non-volatile Memory Express). The NVMe) standard, and the non-volatile memory 142 is, for example, a NAND flash memory, and the random access memory 143 is a dynamic random access memory (for example, LPDDR3 DRAM). In addition, the central processor 110 and the platform control hub 130 communicate through a direct media interface (DMI), and the PCIe bus is used as a communication bridge between the platform control hub 130 and the storage device 140.
在一實施例中,中央處理器110包括一記憶體控制器(未繪示),用以控制系統記憶體120之資料存取,其中系統記憶體120例如是動態隨機存取記憶體,透過DDR 4匯流排與中央處理器110連接,但本發明並不限於此。 In one embodiment, the central processing unit 110 includes a memory controller (not shown) for controlling data access of the system memory 120, wherein the system memory 120 is, for example, a dynamic random access memory, through DDR. The bus bar is connected to the central processing unit 110, but the present invention is not limited thereto.
需了解的是,記憶體控制器141在寫入資料至非揮發性記憶體142時均是透過一快閃轉譯層(Flash Translation Layer),該快閃轉譯層係負責提供檔案系統和在非揮發性記憶體142中之實體資料層之間的對應,使得作業系統仍然可看到與一般傳統硬碟一樣的檔案系統。 It should be understood that the memory controller 141 writes data to the non-volatile memory 142 through a Flash Translation Layer, which is responsible for providing the file system and non-volatile. The correspondence between the physical data layers in the sexual memory 142 allows the operating system to still see the same file system as a conventional conventional hard disk.
第2A~2B圖係顯示依據本發明一實施例中之記憶體空間分配的示意圖。需注意的是,傳統的隨機存取記憶體磁碟係利用系統記憶體,由系統軟體模擬一個儲存裝置控制器以進行控制。本發明中之隨機存取記憶體磁碟係利用儲存裝置140中之隨機存取記憶體143,意即由記憶體控制器141控制於隨機存取記憶體143的隨機存取記憶體磁碟144。因此,在隨機存取記憶體143的隨機存取記憶體磁碟144之I/O均需要透過NVMe之指令去執行。 2A-2B are diagrams showing the memory space allocation in accordance with an embodiment of the present invention. It should be noted that the conventional random access memory disk system utilizes system memory, and the system software simulates a storage device controller for control. The random access memory disk in the present invention utilizes the random access memory 143 in the storage device 140, that is, the random access memory disk 144 controlled by the memory controller 141 in the random access memory 143. . Therefore, the I/O of the random access memory disk 144 of the random access memory 143 needs to be executed by the instruction of the NVMe.
舉例而言,記憶體控制器141係利用NVMe標準所提供的販售者特定特徵(vendor specific feature),利用一設定特徵(set feature)指令以啟用隨機存取記憶體143上的隨機存取記憶體磁碟144。更進一步而言,如第2A圖所示,當隨機存取記憶體磁碟尚未啟用時,整個非揮發性記憶體142之記憶體空間係稱為第一記憶體空間210。一般來說,非揮發性記憶體142之容量係遠大於隨機存取記憶體143之容量。當隨機存取記憶體143上的隨機存取記憶體磁碟144啟用後,記憶體控制器141則在隨機存取記憶體143中劃分出一第二記憶體空間220供隨機存取記憶體磁碟144使用。此外,記憶體控制器141更在第一記憶體空間210中劃份出一第三記憶體空間230,專門供隨機存取記憶體磁碟144進行備份之用,如第2B圖所示。 For example, the memory controller 141 utilizes a vendor specific feature provided by the NVMe standard to enable random access memory on the random access memory 143 using a set feature instruction. Volume disk 144. Furthermore, as shown in FIG. 2A, when the random access memory disk is not yet enabled, the memory space of the entire non-volatile memory 142 is referred to as the first memory space 210. In general, the capacity of the non-volatile memory 142 is much larger than the capacity of the random access memory 143. When the random access memory disk 144 on the random access memory 143 is enabled, the memory controller 141 divides a second memory space 220 into the random access memory 143 for random access memory magnetic The disc 144 is used. In addition, the memory controller 141 further divides a third memory space 230 in the first memory space 210 for the random access memory disk 144 for backup, as shown in FIG. 2B.
更進一步而言,在非揮發性記憶體142中的第三記憶體空間230係由記憶體控制器141之韌體進行管理,並與隨機存取記憶體磁碟144之第二記憶體空間220中的資料進行同步處理。本發明可透過NVMe標準所支援的設定特徵之指令即可在隨機存取記憶體143上啟用隨機存取記憶體磁碟144,並可視為在記憶體控 制器141下的第二個磁碟機,其並不需要電腦系統本身的額外資源去模擬儲存裝置的控制器。此外,記憶體控制器141之韌體可自動進行第二記憶體空間220及第三記憶體空間230之間之資訊的同步處理。使用者僅需將要放置在傳統隨機存取記憶體磁碟的資料路徑指向記憶體控制器141下的第二個磁碟機(即隨機存取記憶體磁碟144),即可獲得隨機存取記憶體磁碟之快速存取效能。舉例來說,如作業系統經常使用的資料庫檔案,這些檔案往往都是4K位元的倍數,且其資料不連續。若利用非揮發性記憶體142進行存取仍無法避免較長的分頁存取時間,若將此類檔案放入隨機存取記憶體磁碟144中,則可享受到其快速存取的效能。 Furthermore, the third memory space 230 in the non-volatile memory 142 is managed by the firmware of the memory controller 141 and the second memory space 220 of the random access memory disk 144. The data in the data is synchronized. The present invention can enable the random access memory disk 144 on the random access memory 143 through the instructions of the set features supported by the NVMe standard, and can be regarded as being in the memory control. The second drive under the controller 141 does not require additional resources of the computer system itself to simulate the controller of the storage device. In addition, the firmware of the memory controller 141 can automatically perform synchronization processing of information between the second memory space 220 and the third memory space 230. The user only needs to point the data path to be placed on the conventional random access memory disk to the second disk drive under the memory controller 141 (ie, the random access memory disk 144) to obtain random access. Fast access performance of memory disks. For example, if the operating system often uses database files, these files are often multiples of 4K bits, and their data is not continuous. If the non-volatile memory 142 is used for access, the long page access time cannot be avoided. If such a file is placed in the random access memory disk 144, the fast access performance can be enjoyed.
此外,隨機存取記憶體143中之隨機存取記憶體磁碟144(第二記憶體空間220)與非揮發性記憶體142中之第三記憶體空間230之同步方式可進一步改善非揮發性記憶體142之壽命。舉例來說,作業系統有一個Temp資料夾,在作業系統進行操作時會經常將記錄檔(log file)儲存於此資料夾中。因此,在非揮發性記憶體142中與此資料夾相關的邏輯區塊位址(logical block address,LBA)會有相當頻繁的重複寫入。本發明係可利用隨機存取記憶體磁碟144來取代。再者,若同步方式係採用定時同步,則大部分的資料寫入都是在隨機存取記憶體磁碟144,僅有同步時的最後一次寫入會同時寫入到非揮發性記憶體142。因此,本發明在儲存裝置140中利用其隨機存取記憶體143建立隨機存取記憶體磁碟144以儲存系統檔案可提升非揮發性記憶體142之使用壽命,並且經由韌體進行資料同步,亦不必耗費系統資源。 In addition, the manner in which the random access memory disk 144 (the second memory space 220) in the random access memory 143 is synchronized with the third memory space 230 in the non-volatile memory 142 can further improve the non-volatile property. The life of the memory 142. For example, the operating system has a Temp folder that is often stored in the folder when the operating system is operating. Therefore, the logical block address (LBA) associated with this folder in the non-volatile memory 142 will have a relatively frequent repetitive write. The present invention can be replaced with a random access memory disk 144. Moreover, if the synchronization mode uses timing synchronization, most of the data is written to the random access memory disk 144, and only the last write of the synchronization is simultaneously written to the non-volatile memory 142. . Therefore, the present invention uses the random access memory 143 in the storage device 140 to establish the random access memory disk 144 to store the system file to improve the service life of the non-volatile memory 142, and to perform data synchronization via the firmware. There is no need to consume system resources.
又,本發明若搭配特定軟體,可進一步達成軟體加 速。舉例來說,可由軟體指定特定資料(例如邏輯區塊位址及容量)儲存至隨機存取記憶體143中之隨機存取記憶體磁碟144。因此,在第三記憶體空間230中可以不必存入完整的資料。因此原本在第一記憶體空間210中即有資料,因此不需要再儲存至第三記憶體空間230。記憶體控制器141係利用標記的方式將邏輯區塊位址及容量存入第三記憶體空間230。當儲存裝置140啟動用,記憶體控制器141仍然能依據在第三記憶體空間230所儲存的標記資訊去尋找第一記憶體空間210的資料並將其複製到第二記憶體空間220以進行加速。 Moreover, if the present invention is combined with a specific software, the software plus can be further achieved. speed. For example, specific data (eg, logical block address and capacity) may be stored by the software to the random access memory disk 144 in the random access memory 143. Therefore, it is not necessary to store complete data in the third memory space 230. Therefore, there is originally data in the first memory space 210, so there is no need to store it in the third memory space 230. The memory controller 141 stores the logical block address and capacity in the third memory space 230 by means of a mark. When the storage device 140 is activated, the memory controller 141 can still search for the data of the first memory space 210 and copy it to the second memory space 220 according to the tag information stored in the third memory space 230. accelerate.
第3圖係顯示依據本發明一實施例中隨機存取記憶體磁碟控制方法。在步驟S310,利用記憶體控制器141於隨機存取記憶體143上啟用一隨機存取記憶體磁碟144。在步驟S320,利用記憶體控制器141將非揮發性記憶體142中所儲存之資料複製至隨機存取記憶體磁碟144以進行快速資料存取。 Figure 3 is a diagram showing a random access memory disk control method in accordance with an embodiment of the present invention. In step S310, a random access memory disk 144 is enabled on the random access memory 143 by the memory controller 141. In step S320, the data stored in the non-volatile memory 142 is copied to the random access memory disk 144 by the memory controller 141 for fast data access.
綜上所述,本發明係提供一種電腦系統及用於儲存裝置之隨機存取記憶體磁碟控制方法,其可利用電腦系統中之儲存裝置內建的隨機存取記憶體以建立隨機存取記憶體磁碟,並可將作業系統執行所需的系統檔案或是其他類型之檔案儲存於該隨機存取記憶體磁碟中,以得到快速的存取效能,並可增加儲存裝置中之非揮發性記憶體的使用壽命。 In summary, the present invention provides a computer system and a random access memory disk control method for a storage device, which can utilize random access memory built in a storage device in a computer system to establish random access. Memory disk, and can store the system files or other types of files required by the operating system in the random access memory disk for fast access performance and increase the non-storage in the storage device. The lifetime of volatile memory.
本發明雖以較佳實施例揭露如上,然其並非用以限定本發明的範圍,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可做些許的更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 The present invention has been disclosed in the above preferred embodiments, and is not intended to limit the scope of the present invention. Any one of ordinary skill in the art can make a few changes without departing from the spirit and scope of the invention. The scope of protection of the present invention is therefore defined by the scope of the appended claims.
100‧‧‧電腦系統 100‧‧‧ computer system
110‧‧‧中央處理器 110‧‧‧Central Processing Unit
120‧‧‧系統記憶體 120‧‧‧System Memory
130‧‧‧平台控制集線器 130‧‧‧ Platform Control Hub
140‧‧‧儲存裝置 140‧‧‧Storage device
141‧‧‧記憶體控制器 141‧‧‧ memory controller
142‧‧‧非揮發性記憶體 142‧‧‧ Non-volatile memory
143‧‧‧隨機存取記憶體 143‧‧‧ Random access memory
144‧‧‧隨機存取記憶體磁碟 144‧‧‧ Random Access Memory Disk
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW104124862A TW201705001A (en) | 2015-07-31 | 2015-07-31 | Computer system and control method for random access memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW104124862A TW201705001A (en) | 2015-07-31 | 2015-07-31 | Computer system and control method for random access memory |
Publications (1)
Publication Number | Publication Date |
---|---|
TW201705001A true TW201705001A (en) | 2017-02-01 |
Family
ID=58609036
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW104124862A TW201705001A (en) | 2015-07-31 | 2015-07-31 | Computer system and control method for random access memory |
Country Status (1)
Country | Link |
---|---|
TW (1) | TW201705001A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110377222A (en) * | 2018-04-13 | 2019-10-25 | 宏碁股份有限公司 | Stocking system |
-
2015
- 2015-07-31 TW TW104124862A patent/TW201705001A/en unknown
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110377222A (en) * | 2018-04-13 | 2019-10-25 | 宏碁股份有限公司 | Stocking system |
CN110377222B (en) * | 2018-04-13 | 2022-11-11 | 宏碁股份有限公司 | storage system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107632939B (en) | Mapping table for storage devices | |
KR101086857B1 (en) | Control Method of Semiconductor Storage System Performing Data Merge | |
US10120795B2 (en) | Wear-leveling nandflash memory reading/writing method | |
US20140095555A1 (en) | File management device and method for storage system | |
US10565103B2 (en) | Method for creating multi-namespace and method for accessing data therein | |
US10055143B2 (en) | Solid state drive and data programming method thereof | |
JP2009276853A (en) | Flash memory device | |
KR102585883B1 (en) | Operating method of memory system and memory system | |
TWI579689B (en) | Data backup system | |
US20220229722A1 (en) | Method and apparatus to improve performance of a redundant array of independent disks that includes zoned namespaces drives | |
US20230359550A1 (en) | File system integration into data mining model | |
US20160342542A1 (en) | Delay destage of data based on sync command | |
JP2011520176A (en) | Memory drive operable like an optical disk drive and method of virtualizing a memory drive to an optical disk drive | |
JP2009043054A5 (en) | ||
US10747439B2 (en) | Method and apparatus for power-fail safe compression and dynamic capacity for a storage device | |
US11347420B2 (en) | Attribute mapping in multiprotocol devices | |
JP2020191055A (en) | Recovery processing method and device from instantaneous interruption, and computer readable storage medium | |
US10338836B2 (en) | Page aligning method and lookup table generating method of data storage device | |
US20140219041A1 (en) | Storage device and data processing method thereof | |
US9904622B2 (en) | Control method for non-volatile memory and associated computer system | |
CN111026325A (en) | Flash memory controller, control method of flash memory controller and related electronic device | |
US10073851B2 (en) | Fast new file creation cache | |
US20210208808A1 (en) | Host Supported Partitions in Storage Device | |
US10430287B2 (en) | Computer | |
TW201705001A (en) | Computer system and control method for random access memory |