WO2021179575A1 - 一种数据库一体机的存储方法、装置、设备和介质 - Google Patents

一种数据库一体机的存储方法、装置、设备和介质 Download PDF

Info

Publication number
WO2021179575A1
WO2021179575A1 PCT/CN2020/118346 CN2020118346W WO2021179575A1 WO 2021179575 A1 WO2021179575 A1 WO 2021179575A1 CN 2020118346 W CN2020118346 W CN 2020118346W WO 2021179575 A1 WO2021179575 A1 WO 2021179575A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage
database
capacity
volatile memory
mmap
Prior art date
Application number
PCT/CN2020/118346
Other languages
English (en)
French (fr)
Inventor
段利宁
张一可
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2021179575A1 publication Critical patent/WO2021179575A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24539Query rewriting; Transformation using cached or materialised query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/24569Query processing with adaptation to specific hardware, e.g. adapted for using GPUs or SSDs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Definitions

  • the present invention relates to the field of computer technology, and more specifically, to a storage method, device, equipment and medium of a database integrated machine.
  • the overall composition of Inspur K-DB database integrated machine is mainly divided into three parts: computing node, storage node, and high-speed network.
  • computing nodes also known as database nodes, are mainly used to process application database access requests;
  • storage nodes generally composed of multiple nodes, are mainly used for data access and processing;
  • high-speed networks generally choose infiniband network switches, Used to accelerate data interaction between computing nodes and storage nodes.
  • high-performance database all-in-ones are mainly for enterprise-level key core businesses and are used for customer systems to achieve better performance improvements. Therefore, the basic requirements for designing a database integrated machine are high reliability, high performance, and high scalability.
  • Non-volatile memory also known as persistent memory (PMEM) or memory-level memory (SCM), lies between the memory and storage levels, and can provide more than DRAM (Dynamic Random Access Memory). ) Larger capacity, faster speed than memory.
  • PMEM persistent memory
  • SCM memory-level memory
  • DRAM Dynamic Random Access Memory
  • the common high-performance database all-in-one computers in the industry mainly use all-flash memory devices, that is, all the hard disks of all storage nodes are high-speed flash memory devices.
  • Each storage node is independent of each other.
  • each storage node is set as a failgroup, so that the storage nodes are mirrored to each other to ensure that they are multiple storage nodes. When any one of them fails, it does not affect the overall business access of the all-in-one, so as to realize the high-performance and high-reliability of the all-in-one.
  • the application data access process needs to start from the disk, through the file system, then to the system memory, and then through the network to complete the interaction between nodes.
  • Such a strategy limits the read and write speed of data, and the read and write performance of flash memory devices is far behind the read and write speed of CPU or DRAM.
  • the performance characteristics of flash memory devices and the way of accessing data have become the performance bottleneck of the all-in-one database.
  • the purpose of the embodiments of the present invention is to provide a new storage design scheme for a database all-in-one machine, that is, based on the Inspur K-DB database, a method that uses non-volatile memory to greatly improve the processing performance of the storage node of the Inspur database all-in-one machine, reducing In order to expand horizontally, it saves the cost of computer room space and server procurement costs.
  • one aspect of the present invention provides a storage method for a database integrated machine, which includes: configuring the MMAP access interface of the MMAP access mode of the database storage instance to the non-volatile memory of several storage nodes; The first part of the non-volatile memory is configured to expand the memory capacity of the storage node and cache business data query results, and the second part of the non-volatile memory is configured to store business data higher than the preset access frequency; the access path of the storage node It is configured to go directly from the second part to the first part in the MMAP access mode through the MMAP access interface.
  • the method further includes: configuring a RAID 5 storage scheme for the non-volatile memory.
  • the method further includes: creating a disk group for the storage node, and the disk group stores the service data of the database.
  • the method further includes: adjusting the capacity ratio of the first part and the second part in the non-volatile memory according to the respective demand proportions of the first part and the second part.
  • the method further includes: in response to the proportion of the demand of the first part exceeding the first threshold, adjusting the capacity ratio so that the proportion of the first capacity of the first part increases, and the proportion of the second part is increased.
  • the proportion of the second capacity of the second part decreases; in response to the proportion of the demand of the second part exceeding the second threshold, the capacity ratio is adjusted so that the proportion of the second capacity of the second part increases, and the proportion of the first capacity of the first part decreases.
  • a storage device for a database integrated machine including:
  • Access interface configuration module the access interface configuration module is configured to configure the MMAP access interface of the MMAP access mode of the database storage instance to the non-volatile memory of several storage nodes;
  • the access path of the storage node is configured to directly go from the second part to the first part in the MMAP access mode through the MMAP access interface.
  • the device further includes: a flash node module, the flash node module is configured to create a disk group for the storage node, and the disk group stores the service data of the database.
  • the device further includes: a capacity allocation module configured to adjust the first part of the non-volatile memory according to the respective demand proportions of the first part and the second part And the capacity ratio of the second part.
  • a computer device which includes:
  • At least one processor At least one processor
  • the memory stores a computer program that can run on the processor, and the processor executes the aforementioned storage method of the integrated database machine when the processor executes the program.
  • a computer-readable storage medium stores a computer program.
  • the computer program is characterized in that, when the computer program is executed by a processor, the aforementioned storage method of the integrated database machine is executed. .
  • the all-in-one database machine it is convenient for the all-in-one database machine to use the memory access mode to directly read the data on the non-volatile memory of the local high-speed storage space within the storage node and between the nodes, instead of using the file system and storage stack, which can greatly reduce the all-in-one machine
  • the delay of the storage node accessing data improves the execution efficiency of the storage node.
  • the non-volatile memory is configured in the storage node as a hybrid access mode, which is convenient for applications in different scenarios, without expanding the hardware, at any time and flexibly expand the memory capacity, increase the capacity and performance of the storage node.
  • Fig. 1 shows a schematic block diagram of an embodiment of a storage method of a database integrated machine according to the present invention
  • FIG. 2 shows a schematic structural diagram of a configuration mode of a storage node according to an embodiment of a storage method of a database integrated machine according to the present invention.
  • Fig. 1 shows a schematic diagram of an embodiment of a storage method of a database integrated machine according to the present invention.
  • the method at least includes the following steps:
  • FIG. 2 shows a schematic structural diagram of a configuration mode of a storage node according to an embodiment of the storage method of a database integrated machine of the present invention.
  • the number of memory banks and capacity configuration are reduced in the storage nodes of Inspur's existing database all-in-one machine, and non-volatile memory hardware is added.
  • the configuration mode of memory DDR4 and non-volatile memory (PMEM) is shown in Figure 2.
  • the memory interface of the CPU is reduced to 6, and the hard disks of the original storage nodes are all high-speed flash memory devices (ie DDR4). Now replace half of the DDR4 with non-volatile memory, where DDR4 is configured as the master pass and the non-volatile memory is configured as the sub pass.
  • the interface of the MMAP (Memory Mapped) access mode of the non-volatile memory of the database storage instance is opened.
  • set the application mode of the non-volatile memory configure the non-volatile memory in the system as a mixed mode, that is, a part of the non-volatile memory capacity is used to expand the memory capacity of the storage node and the query result of the cached data (ie The first part), one part is used to store business data that are frequently accessed (ie the second part).
  • the method further includes: configuring a preset storage scheme for the non-volatile memory, such as a RAID5 storage scheme.
  • the high-availability settings for the non-volatile memory are as follows: the non-volatile memory is configured as raid5 under a single storage node system, where , Raid5 is a storage solution that takes into account storage performance, data security and storage cost, and can be understood as a compromise between raid0 and raid1. Specifically, raid5 has a data read and write speed similar to raid0, but has more parity information. Therefore, the disk space utilization of raid5 is higher than that of raid1, but the storage cost is relatively low.
  • Raid5 is a storage solution that takes into account storage performance, data security and storage cost, and can be understood as a compromise between raid0 and raid1.
  • raid5 has a data read and write speed similar to raid0, but has more parity information. Therefore, the disk space utilization of raid5 is higher than that of raid1, but the storage cost is relatively low.
  • the configuration method is as follows:
  • the method further includes: creating a disk group for the storage node, and the disk group stores the service data of the database.
  • the storage node flash media high availability is set: use the storage node's flash disk, use the KAS management function of Inspur Data Software, and use the storage node as the fault group to create the disk group DATA+ for storage
  • the business data of the database allows the failure of a single storage node without affecting the continuous operation of the overall storage of the all-in-one.
  • the method further includes: adjusting the ratio of the capacity of the first part and the second part in the non-volatile memory according to the respective demand proportions of the first part and the second part.
  • the non-volatile memory includes a first part and a second part, and the proportion of the first part and the second part relative to the capacity of the non-volatile memory can be adjusted, that is, the first part
  • the ratio of the capacity to the second part of the capacity can be changed by adjustment.
  • the method further includes:
  • the capacity ratio is adjusted so that the proportion of the first capacity in the first part increases, and the proportion of the second capacity in the second part decreases;
  • the capacity ratio is adjusted so that the proportion of the second capacity of the second part increases, and the proportion of the first capacity of the first part decreases.
  • the capacity of the first part when the demanded capacity of the first part exceeds the current capacity of the first part and the demanded capacity of the second part is less than the current capacity of the second part, the capacity of the first part can be increased and the capacity of the second part reduced. Capacity, the proportion of the first part of the capacity and the proportion of the second part of the capacity are adjusted to a balanced state so that the required capacity of the first part of the capacity and the second part of the capacity are less than their respective current capacities.
  • an embodiment of a storage device of a database integrated machine includes:
  • Access interface configuration module the access interface configuration module is configured to configure the MMAP access interface of the MMAP access mode of the non-volatile memory of several storage nodes by the configuration database storage instance;
  • the access path of the storage node is configured to directly go from the second part to the first part in the MMAP access mode through the MMAP access interface.
  • the device further includes:
  • Flash node module the flash node module is configured to create a disk group for the storage node, and the disk group stores the business data of the database.
  • the device further includes:
  • the capacity allocation module is configured to adjust the capacity ratio of the first part and the second part in the non-volatile memory according to the respective demand proportions of the first part and the second part.
  • another aspect of the embodiments of the present invention also provides a computer device, the computer device includes: at least one processor; and a memory, the memory stores a computer program that can run on the processor, and the processor executes The storage method of the all-in-one database machine mentioned above is executed during the program.
  • a computer-readable storage medium stores a computer program.
  • the computer program is characterized in that, when the computer program is executed by a processor, the aforementioned storage method of the integrated database machine is executed. .
  • the program of the storage method of the database integrated machine can be stored in a computer.
  • the program may include the processes of the above-mentioned method embodiments.
  • the storage medium of the program can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
  • the foregoing computer program embodiment can achieve the same or similar effects as any of the foregoing method embodiments corresponding thereto.
  • the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a processor, and the computer program may be stored in a computer-readable storage medium.
  • the computer program executes the above-mentioned functions defined in the method disclosed in the embodiment of the present invention.
  • the above method steps and system units can also be implemented by a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above steps or unit functions.
  • non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory Memory.
  • Volatile memory can include random access memory (RAM), which can act as external cache memory.
  • RAM can be obtained in many forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchronous link DRAM (SLDRAM) and direct Rambus RAM (DRRAM).
  • DRAM synchronous RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM Synchronous link DRAM
  • DRRAM direct Rambus RAM
  • the storage devices of the disclosed aspects are intended to include, but are not limited to, these and other suitable types of memory.
  • DSP digital signal processors
  • ASIC application-specific integrated circuits
  • FPGA Field Programmable Gate Array
  • a general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine.
  • the processor may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in combination with a DSP, and/or any other such configuration.
  • the steps of the method or algorithm described in combination with the disclosure herein may be directly included in hardware, a software module executed by a processor, or a combination of the two.
  • the software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to the processor such that the processor can read information from or write information to the storage medium.
  • the storage medium may be integrated with the processor.
  • the processor and the storage medium may reside in the ASIC.
  • the ASIC can reside in the user terminal.
  • the processor and the storage medium may reside as discrete components in the user terminal.
  • functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or codes on a computer-readable medium or transmitted through the computer-readable medium.
  • Computer-readable media include computer storage media and communication media, including any media that facilitates the transfer of a computer program from one location to another location.
  • a storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
  • the computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, or may be used to carry or store instructions in the form of Or any other medium that can be accessed by a general-purpose or special-purpose computer or general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium.
  • coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave to send software from a website, server, or other remote source
  • coaxial cable Cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are all included in the definition of media.
  • magnetic disks and optical disks include compact disks (CDs), laser disks, optical disks, digital versatile disks (DVD), floppy disks, and Blu-ray disks. Disks usually reproduce data magnetically, while optical disks use lasers to optically reproduce data. . Combinations of the above content should also be included in the scope of computer-readable media.
  • the program can be stored in a computer-readable storage medium.
  • the storage medium can be a read-only memory, a magnetic disk or an optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种数据库一体机的存储方法,包括:配置数据库存储实例对若干存储节点的非易失性内存的MMAP访问模式的MMAP访问接口;将非易失性内存的第一部分配置为扩展存储节点的内存容量和缓存业务数据的查询结果,将非易失性内存的第二部分配置为存放高于预设访问频率的业务数据;将存储节点的访问路径配置为通过MMAP访问接口以MMAP访问模式直接由第二部分到第一部分。本发明还公开了一种装置、设备和介质。本发明提出的数据库一体机的存储方法、装置、设备和介质可以减少横向扩展,并节省机房空间成本和服务器采购成本。

Description

一种数据库一体机的存储方法、装置、设备和介质
本申请要求于2020年3月8日提交中国国家知识产权局,申请号为202010154750.X,发明名称为“一种数据库一体机的存储方法、装置、设备和介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机技术领域,更具体地,特别是指一种数据库一体机的存储方法、装置、设备和介质。
背景技术
浪潮K-DB数据库一体机总体组成上,主要分为3部分:计算节点、存储节点、高速网络。其中,计算节点,又称为数据库节点,主要用于处理应用的数据库访问请求;存储节点,一般是由多台节点组成,主要用于数据存取和处理;高速网络,一般选择infiniband网络交换机,用于加速计算节点和存储节点的数据交互。
一般高性能的数据库一体机,主要面向企业级关键核心业务,用于客户系统实现更好的性能提升。因此,设计数据库一体机的基本要求即是,高可靠、高性能、高扩展性。
非易失性内存(NVM),也称为持久化内存(PMEM)或内存级存储器(SCM),介于内存和存储层级之间,能够提供比DRAM(Dynamic Random Access Memory,动态随机存取存储器)更大的容量,比存储器更快的速度。 有了持久化内存,应用有了一个新的层级来进行数据的放置,可以像访问传统的内存一样访问持久化内存,无需在内存和存储器之间来回切换数据块,这填补了现有层级性能/容量差距。
目前,业内普遍的高性能数据库一体机,主要是采用全闪存设备,即所有存储节点的硬盘全部为高速闪存设备。每个存储节点彼此独立,通过数据库自带的存储管理功能-故障组(failgroup)设置,将每个存储节点各设置为一个failgroup,使存储节点的互相镜像(mirror),保证当多个存储节点中的任意一个故障时,不影响一体机整体的业务访问,从而实现一体机的高性能、高可靠性。
基于目前的数据库一体机现有的存储设计方案,应用数据访问过程需要先从磁盘,经过文件系统,再到系统内存,然后再经过网络等完成节点之间的交互。这样的策略限制了数据的读写速度,而且闪存设备的读写性能相比CPU或DRAM读写速度差距很大,闪存设备自身的性能特点以及存取数据的方式成为数据库一体机的性能瓶颈。同时,通过一体机的横向扩展,一般只能实现一体机在数据的空间规模上扩展,对业务性能的提升并不明显,而且进行整体横向扩展需要增加新的服务器采购成本和扩大机房空间,性价比不高。
发明内容
有鉴于此,本发明实施例的目的在于提供一种新型数据库一体机存储设计方案,即基于浪潮K-DB数据库,利用非易失性内存大幅提升浪潮数据库一体机存储节点处理性能的方法,减少了横向扩展,节省了机房空间成本和服务器采购成本。
基于上述目的,本发明一方面提供了一种数据库一体机的存储方法,该方法包括:配置数据库存储实例对若干存储节点的非易失性内存的MMAP访问模式的MMAP访问接口;将非易失性内存的第一部分配置为扩展存储节点的内存容量和缓存业务数据的查询结果,将非易失性内存的第二部分配置为存放高于预设访问频率的业务数据;将存储节点的访问路径配置为通过MMAP访问接口以MMAP访问模式直接由第二部分到第一部分。
在本发明的数据库一体机的存储方法的一些实施方式中,方法还包括:为非易失性内存配置RAID5存储方案。
在本发明的数据库一体机的存储方法的一些实施方式中,方法还包括:为存储节点创建磁盘组,磁盘组存放数据库的业务数据。
在本发明的数据库一体机的存储方法的一些实施方式中,方法还包括:根据第一部分和第二部分各自的需求占比调节非易失性内存中第一部分和第二部分的容量比值。
在本发明的数据库一体机的存储方法的一些实施方式中,方法还包括:响应于第一部分的需求占比超过第一阈值,调整容量比值使得第一部分的第一容量占比增加,第二部分的第二容量占比减少;响应于第二部分的需求占比超过第二阈值,调整容量比值使得第二部分的第二容量占比增加,第一部分的第一容量占比减少。
本发明实施例的另一方面,还提供了一种数据库一体机的存储装置,该装置包括:
访问接口配置模块,访问接口配置模块配置为配置数据库存储实例对 若干存储节点的非易失性内存的MMAP访问模式的MMAP访问接口;
将非易失性内存的第一部分配置为扩展存储节点的内存容量和缓存业务数据的查询结果,将非易失性内存的第二部分配置为存放高于预设访问频率的业务数据;
将存储节点的访问路径配置为通过MMAP访问接口以MMAP访问模式直接由第二部分到第一部分。
在本发明的数据库一体机的存储装置的一些实施方式中,装置还包括:闪存节点模块,闪存节点模块配置为为存储节点创建磁盘组,磁盘组存放数据库的业务数据。
在本发明的数据库一体机的存储装置的一些实施方式中,装置还包括:容量分配模块,容量分配模块配置为根据第一部分和第二部分各自的需求占比调节非易失性内存中第一部分和第二部分的容量比值。
本发明实施例的另一方面,还提供了一种计算机设备,该计算机设备包括:
至少一个处理器;以及
存储器,存储器存储有可在处理器上运行的计算机程序,处理器执行程序时执行前述的数据库一体机的存储方法。
本发明实施例的再一方面,还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,其特征在于,计算机程序被处理器执行时执行前述的数据库一体机的存储方法。
本发明至少具有以下有益技术效果:
便于数据库一体机在存储节点内部和跨节点之间,都可以使用内存访问模式直接读取本地高速存储空间非易失性内存上的数据,而不是通过文件系统和存储堆栈,可以大大减少一体机存储节点存取数据的延迟,提高存储节点的执行效率。
在存储节点将非易失性内存配置为混合访问模式,便于针对不同场景的应用,在不扩展硬件的前提下,随时、灵活地扩展内存容量、增大存储节点的容量和性能。
通过数据库实例的缓存设置,降低了设备访问的延迟,平衡了整体资源的利用率,提高了存储节点的整体处理性能。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。
图1示出了根据本发明的数据库一体机的存储方法的实施例的示意性框图;
图2示出了根据本发明的数据库一体机的存储方法的实施例的存储节点的配置模式的结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实 施例,并参照附图,对本发明实施例进一步详细说明。
需要说明的是,本发明实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称非相同的实体或者非相同的参量,可见“第一”和“第二”仅为了表述的方便,不应理解为对本发明实施例的限定,后续实施例对此不再一一说明。
基于上述目的,本发明实施例的第一个方面,提出了一种数据库一体机的存储方法的实施例。图1示出的是根据本发明的数据库一体机的存储方法的实施例的示意图。如图1所示的实施例中,该方法至少包括如下步骤:
S100、配置数据库存储实例对若干存储节点的非易失性内存的MMAP访问模式的MMAP访问接口;
S200、将非易失性内存的第一部分配置为扩展存储节点的内存容量和缓存业务数据的查询结果,将非易失性内存的第二部分配置为存放高于预设访问频率的业务数据;
S300、将存储节点的访问路径配置为通过MMAP访问接口以MMAP访问模式直接由第二部分到第一部分。
在本发明的一些实施例中,图2示出的是根据本发明的数据库一体机的存储方法的实施例的存储节点的配置模式的结构示意图。如图2所示,在浪潮现有数据库一体机的存储节点中减少内存条数和容量配置,增加非易失性内存硬件。其中,内存DDR4和非易失性内存(PMEM)的配置模式如图2所示,将CPU的内存接口缩减到6个,并且,原本的存储节点的硬盘全部为高速闪存设备(即DDR4),现在将其中一半的DDR4更换为非 易失性内存,其中DDR4配置为主通,非易失性内存配置为副通。
在此基础上,在存储节点的数据库实例部分,开放数据库存储实例对非易失性内存的MMAP(Memory Mapped,内存映射)访问模式的接口。
之后,对非易失性内存进行应用模式设置:在系统下将非易失性内存配置为混合模式,即非易性内存一部分容量用于扩展存储节点的内存容量和缓存数据的查询结果(即第一部分),一部分用于存放那些高频繁访问的业务数据(即第二部分)。
最后,对存储节点设备访问路径进行设置:配置非易失性内存为hot数据区,配置闪存设备为warm数据区,将hot数据的访问路径由从传统的“flash disk-文件系统-内存”模式,升级为“disk-内存”的内存MMAP访问模式。其中,配置方式的代码如下:
alter system set db_flash_cache_file='/dev/pm/pm_ds1.dbf'scope=spfile;
alter system set db_flash_cache_file='/dev/pm/pm_dsN.dbf'scope=spfile。
根据本发明的数据库一体机的存储方法的一些实施方式,方法还包括:为非易失性内存配置预设存储方案,如RAID5存储方案。
在本发明的一些实施例中,在非易失性内存配置预设存储方案中,对非易失性内存高可用设置如下:在单个存储节点系统下将非易失性内存配置为raid5,其中,raid5是一种存储性能、数据安全和存储成本兼顾的存储解决方案,可以理解为是raid0和raid1的折中方案。具体为,raid5具有和raid0相近似的数据读写速度,但多了奇偶校验信息,因此,raid5的磁盘空间利用率比raid1高,但存储成本相对较低。通过这种预设存储方案,允许 当单条非易性内存硬件故障时,不影响单个存储节点的正常运行。
其中,配置方式如下:
mdadm-C/dev/pm_store1-l5–n6/dev/pmem[0-6]-x2/dev/pmem0/dev/pmem3;
mdadm-C/dev/pm_storeN-l5–n6/dev/pmem[0-6]-x2/dev/pmem0/dev/pmem3。
根据本发明的数据库一体机的存储方法的一些实施方式,方法还包括:为存储节点创建磁盘组,磁盘组存放数据库的业务数据。
在本发明的一些实施例中,对存储节点闪存介质高可用进行设置:将存储节点的闪存盘,使用浪潮数据软件的KAS管理功能,以存储节点为故障组,创建磁盘组DATA+,用于存放数据库的业务数据,允许单个存储节点故障时,不影响一体机存储整体的连续运行。
根据本发明的数据库一体机的存储方法的一些实施方式,方法还包括:根据第一部分和第二部分各自的需求占比调节非易失性内存中第一部分和第二部分的容量比值。
在本发明的一些实施例中,非易失性内存中包括第一部分和第二部分,而且,第一部分和第二部分相对于非易失性内存容量的占比是可以调节的,即第一部分容量和第二部分容量的比值是可以通过调节而改变的。
根据本发明的数据库一体机的存储方法的一些实施方式,方法还包括:
响应于第一部分的需求占比超过第一阈值,调整容量比值使得第一部分的第一容量占比增加,第二部分的第二容量占比减少;
响应于第二部分的需求占比超过第二阈值,调整容量比值使得第二部分的第二容量占比增加,第一部分的第一容量占比减少。
在本发明的一些实施例中,当第一部分的需求的容量超过第一部分当前的容量而第二部分的需求容量小于第二部分的当前容量,可以将第一部分的容量增加并减少第二部分的容量,将第一部分的容量占比和第二部分的容量占比调整到平衡的状态使得第一部分的容量和第二部分的容量的需求容量都小于各自的当前容量。
本发明实施例的另一方面,提出了一种数据库一体机的存储装置的实施例。该装置包括:
访问接口配置模块,访问接口配置模块配置为配置数据库存储实例对若干存储节点的非易失性内存的MMAP访问模式的MMAP访问接口;
将非易失性内存的第一部分配置为扩展存储节点的内存容量和缓存业务数据的查询结果,将非易失性内存的第二部分配置为存放高于预设访问频率的业务数据;
将存储节点的访问路径配置为通过MMAP访问接口以MMAP访问模式直接由第二部分到第一部分。
根据本发明的数据库一体机的存储装置的一些实施方式,装置还包括:
闪存节点模块,闪存节点模块配置为为存储节点创建磁盘组,磁盘组存放数据库的业务数据。
根据本发明的数据库一体机的存储装置的一些实施方式,装置还包括:
容量分配模块,容量分配模块配置为根据第一部分和第二部分各自的 需求占比调节非易失性内存中第一部分和第二部分的容量比值。
基于上述目的,本发明实施例的另一方面,还提出了一种计算机设备,该计算机设备包括:至少一个处理器;以及存储器,存储器存储有可在处理器上运行的计算机程序,处理器执行程序时执行前述的数据库一体机的存储方法。
本发明实施例的再一方面,还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,其特征在于,计算机程序被处理器执行时执行前述的数据库一体机的存储方法。
同样地,本领域技术人员应当理解,以上针对根据本发明的数据库一体机的存储方法阐述的所有实施方式、特征和优势同样地适用于根据本发明的装置、计算机设备和介质。为了本公开的简洁起见,在此不再重复阐述。
需要特别指出的是,上述数据库一体机的存储方法、装置、设备和介质的各个实施例中的各个步骤均可以相互交叉、替换、增加、删减,因此,这些合理的排列组合变换之于数据库一体机的存储方法、装置、设备和介质也应当属于本发明的保护范围,并且不应将本发明的保护范围局限在实施例之上。
最后需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关硬件来完成,数据库一体机的存储方法的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,程序的存储介质可为磁碟、光盘、只读存储记忆体(ROM)或随机存储记忆体(RAM) 等。上述计算机程序的实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。
此外,根据本发明实施例公开的方法还可以被实现为由处理器执行的计算机程序,该计算机程序可以存储在计算机可读存储介质中。在该计算机程序被处理器执行时,执行本发明实施例公开的方法中限定的上述功能。
此外,上述方法步骤以及系统单元也可以利用控制器以及用于存储使得控制器实现上述步骤或单元功能的计算机程序的计算机可读存储介质实现。
此外,应该明白的是,本文的计算机可读存储介质(例如,存储器)可以是易失性存储器或非易失性存储器,或者可以包括易失性存储器和非易失性存储器两者。作为例子而非限制性的,非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦写可编程ROM(EEPROM)或快闪存储器。易失性存储器可以包括随机存取存储器(RAM),该RAM可以充当外部高速缓存存储器。作为例子而非限制性的,RAM可以以多种形式获得,比如同步RAM(DRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据速率SDRAM(DDR SDRAM)、增强SDRAM(ESDRAM)、同步链路DRAM(SLDRAM)、以及直接Rambus RAM(DRRAM)。所公开的方面的存储设备意在包括但不限于这些和其它合适类型的存储器。
本领域技术人员还将明白的是,结合这里的公开所描述的各种示例性逻辑块、模块、电路和算法步骤可以被实现为电子硬件、计算机软件或两者的组合。为了清楚地说明硬件和软件的这种可互换性,已经就各种示意 性组件、方块、模块、电路和步骤的功能对其进行了一般性的描述。这种功能是被实现为软件还是被实现为硬件取决于具体应用以及施加给整个系统的设计约束。本领域技术人员可以针对每种具体应用以各种方式来实现的功能,但是这种实现决定不应被解释为导致脱离本发明实施例公开的范围。
结合这里的公开所描述的各种示例性逻辑块、模块和电路可以利用被设计成用于执行这里功能的下列部件来实现或执行:通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或其它可编程逻辑器件、分立门或晶体管逻辑、分立的硬件组件或者这些部件的任何组合。通用处理器可以是微处理器,但是可替换地,处理器可以是任何传统处理器、控制器、微控制器或状态机。处理器也可以被实现为计算设备的组合,例如,DSP和微处理器的组合、多个微处理器、一个或多个微处理器结合DSP和/或任何其它这种配置。
结合这里的公开所描述的方法或算法的步骤可以直接包含在硬件中、由处理器执行的软件模块中或这两者的组合中。软件模块可以驻留在RAM存储器、快闪存储器、ROM存储器、EPROM存储器、EEPROM存储器、寄存器、硬盘、可移动盘、CD-ROM、或本领域已知的任何其它形式的存储介质中。示例性的存储介质被耦合到处理器,使得处理器能够从该存储介质中读取信息或向该存储介质写入信息。在一个替换方案中,存储介质可以与处理器集成在一起。处理器和存储介质可以驻留在ASIC中。ASIC可以驻留在用户终端中。在一个替换方案中,处理器和存储介质可以作为分立组件驻留在用户终端中。
在一个或多个示例性设计中,功能可以在硬件、软件、固件或其任意组合中实现。如果在软件中实现,则可以将功能作为一个或多个指令或代码存储在计算机可读介质上或通过计算机可读介质来传送。计算机可读介质包括计算机存储介质和通信介质,该通信介质包括有助于将计算机程序从一个位置传送到另一个位置的任何介质。存储介质可以是能够被通用或专用计算机访问的任何可用介质。作为例子而非限制性的,该计算机可读介质可以包括RAM、ROM、EEPROM、CD-ROM或其它光盘存储设备、磁盘存储设备或其它磁性存储设备,或者是可以用于携带或存储形式为指令或数据结构的所需程序代码并且能够被通用或专用计算机或者通用或专用处理器访问的任何其它介质。此外,任何连接都可以适当地称为计算机可读介质。例如,如果使用同轴线缆、光纤线缆、双绞线、数字用户线路(DSL)或诸如红外线、无线电和微波的无线技术来从网站、服务器或其它远程源发送软件,则上述同轴线缆、光纤线缆、双绞线、DSL或诸如红外线、无线电和微波的无线技术均包括在介质的定义。如这里所使用的,磁盘和光盘包括压缩盘(CD)、激光盘、光盘、数字多功能盘(DVD)、软盘、蓝光盘,其中磁盘通常磁性地再现数据,而光盘利用激光光学地再现数据。上述内容的组合也应当包括在计算机可读介质的范围内。
以上是本发明公开的示例性实施例,但是应当注意,在不背离权利要求限定的本发明实施例公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本发明实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。
上述本发明实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本发明实施例公开的范围(包括权利要求)被限于这些例子;在本发明实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本发明实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本发明实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本发明实施例的保护范围之内。

Claims (10)

  1. 一种数据库一体机的存储方法,其特征在于,所述方法包括:
    配置数据库存储实例对若干存储节点的非易失性内存的MMAP访问模式的MMAP访问接口;
    将所述非易失性内存的第一部分配置为扩展所述存储节点的内存容量和缓存业务数据的查询结果,将所述非易失性内存的第二部分配置为存放高于预设访问频率的所述业务数据;
    将所述存储节点的访问路径配置为通过所述MMAP访问接口以所述MMAP访问模式直接由所述第二部分到所述第一部分。
  2. 根据权利要求1所述的数据库一体机的存储方法,其特征在于,所述方法还包括:
    为所述非易失性内存配置RAID5存储方案。
  3. 根据权利要求1所述的数据库一体机的存储方法,其特征在于,所述方法还包括:
    为所述存储节点创建磁盘组,所述磁盘组存放所述数据库的所述业务数据。
  4. 根据权利要求1所述的数据库一体机的存储方法,其特征在于,所述方法还包括:
    根据所述第一部分和所述第二部分各自的需求占比调节所述非易失性内存中所述第一部分和所述第二部分的容量比值。
  5. 根据权利要求4所述的数据库一体机的存储方法,其特征在于,所述方法还包括:
    响应于所述第一部分的需求占比超过第一阈值,调整所述容量比值使得第一部分的第一容量占比增加,第二部分的第二容量占比减少;
    响应于所述第二部分的需求占比超过第二阈值,调整所述容量比值使得第二部分的第二容量占比增加,第一部分的第一容量占比减少。
  6. 一种数据库一体机的存储装置,其特征在于,所述装置包括:
    访问接口配置模块,所述访问接口配置模块配置为配置数据库存储实例对若干存储节点的非易失性内存的MMAP访问模式的MMAP访问接口;
    将所述非易失性内存的第一部分配置为扩展所述存储节点的内存容量和缓存业务数据的查询结果,将所述非易失性内存的第二部分配置为存放高于预设访问频率的所述业务数据;
    将所述存储节点的访问路径配置为通过所述MMAP访问接口以所述MMAP访问模式直接由所述第二部分到所述第一部分。
  7. 根据权利要求6所述的数据库一体机的存储装置,其特征在于,所述装置还包括:
    闪存节点模块,所述闪存节点模块配置为为所述存储节点创建磁盘组,所述磁盘组存放所述数据库的所述业务数据。
  8. 根据权利要求6所述的数据库一体机的存储方法,其特征在于,所述装置还包括:
    容量分配模块,所述容量分配模块配置为根据所述第一部分和所述第二部分各自的需求占比调节所述非易失性内存中所述第一部分和所述第二部分的容量比值。
  9. 一种计算机设备,其特征在于,包括:
    至少一个处理器;以及
    存储器,所述存储器存储有可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时执行如权利要求1-5任意一项所述的方法。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时执行权利要求1-5任意一项所述的方法。
PCT/CN2020/118346 2020-03-08 2020-09-28 一种数据库一体机的存储方法、装置、设备和介质 WO2021179575A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010154750.X 2020-03-08
CN202010154750.XA CN111367919B (zh) 2020-03-08 2020-03-08 一种数据库一体机的存储方法、装置、设备和介质

Publications (1)

Publication Number Publication Date
WO2021179575A1 true WO2021179575A1 (zh) 2021-09-16

Family

ID=71208588

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/118346 WO2021179575A1 (zh) 2020-03-08 2020-09-28 一种数据库一体机的存储方法、装置、设备和介质

Country Status (2)

Country Link
CN (1) CN111367919B (zh)
WO (1) WO2021179575A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115502A (zh) * 2021-10-25 2022-03-01 苏州浪潮智能科技有限公司 一种提高电源可用性的方法、系统、设备和存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367919B (zh) * 2020-03-08 2023-01-10 苏州浪潮智能科技有限公司 一种数据库一体机的存储方法、装置、设备和介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160371162A1 (en) * 2015-06-22 2016-12-22 Sap Se Memory allocation and recovery strategies for byte-addressable non-volatile ram (nvram)
CN107046563A (zh) * 2017-01-19 2017-08-15 无锡华云数据技术服务有限公司 一种分布式高效云盘的实现方法、系统及云平台
CN107862064A (zh) * 2017-11-16 2018-03-30 北京航空航天大学 一个基于nvm的高性能、可扩展的轻量级文件系统
CN111367919A (zh) * 2020-03-08 2020-07-03 苏州浪潮智能科技有限公司 一种数据库一体机的存储方法、装置、设备和介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110457261B (zh) * 2019-08-06 2023-11-10 深圳市腾讯计算机系统有限公司 数据访问方法、装置及服务器
CN110502586A (zh) * 2019-09-06 2019-11-26 苏州浪潮智能科技有限公司 一种数据库软硬件一体机
CN110781164B (zh) * 2019-09-29 2022-07-05 苏州浪潮智能科技有限公司 一种数据库一体机的设计方法、设备及介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160371162A1 (en) * 2015-06-22 2016-12-22 Sap Se Memory allocation and recovery strategies for byte-addressable non-volatile ram (nvram)
CN107046563A (zh) * 2017-01-19 2017-08-15 无锡华云数据技术服务有限公司 一种分布式高效云盘的实现方法、系统及云平台
CN107862064A (zh) * 2017-11-16 2018-03-30 北京航空航天大学 一个基于nvm的高性能、可扩展的轻量级文件系统
CN111367919A (zh) * 2020-03-08 2020-07-03 苏州浪潮智能科技有限公司 一种数据库一体机的存储方法、装置、设备和介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115502A (zh) * 2021-10-25 2022-03-01 苏州浪潮智能科技有限公司 一种提高电源可用性的方法、系统、设备和存储介质
CN114115502B (zh) * 2021-10-25 2023-07-14 苏州浪潮智能科技有限公司 一种提高电源可用性的方法、系统、设备和存储介质

Also Published As

Publication number Publication date
CN111367919A (zh) 2020-07-03
CN111367919B (zh) 2023-01-10

Similar Documents

Publication Publication Date Title
US9891835B2 (en) Live configurable storage
US20210117441A1 (en) Data replication system
US8347050B2 (en) Append-based shared persistent storage
US7627699B1 (en) System and method for managing I/O access policies in a storage environment employing asymmetric distributed block virtualization
WO2021179575A1 (zh) 一种数据库一体机的存储方法、装置、设备和介质
US10282293B2 (en) Method, switch, and multiprocessor system using computations and local memory operations
CN103218175A (zh) 多租户的云存储平台访问控制系统
US10244069B1 (en) Accelerated data storage synchronization for node fault protection in distributed storage system
US9696917B1 (en) Method and apparatus for efficiently updating disk geometry with multipathing software
CN101299757A (zh) 一种数据共享方法及通讯系统以及相关设备
WO2023035646A1 (zh) 一种扩展内存的方法、装置及相关设备
US20230163789A1 (en) Stripe management method, storage system, stripe management apparatus, and storage medium
CN111352589B (zh) 一种分布式存储的方法、装置、设备及可读介质
US20240126847A1 (en) Authentication method and apparatus, and storage system
US20230367493A1 (en) Capacity adjustment method and related apparatus
US11288112B1 (en) Enforcing data loss thresholds for performing updates to mirrored data sets
CN110781164B (zh) 一种数据库一体机的设计方法、设备及介质
CN110417579B (zh) 一种使用千兆网卡管理万兆网络的方法、设备及可读介质
US7979656B2 (en) Minimizing configuration changes in a fabric-based data protection solution
WO2021208560A1 (zh) 一种文件系统架构的性能调整方法和装置
US20220414001A1 (en) Memory inclusivity management in computing systems
CN107357532A (zh) 一种新型集群存储新型缓存预读实现方法
WO2017036245A1 (zh) 一种存储阵列操作方法和装置
US10860334B2 (en) System and method for centralized boot storage in an access switch shared by multiple servers
US10592124B2 (en) Predictable client latency via background file system operations

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20924663

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20924663

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20924663

Country of ref document: EP

Kind code of ref document: A1