Data storage method and device for single cluster storage system

By obtaining server and disk type information, generating configuration files and performing space planning, the problem of load balancing and high cost of heterogeneous servers is solved, support for heterogeneous servers and IO load balancing in a single cluster are achieved, and operation costs are reduced. dimension cost.

CN117873374BActive Publication Date: 2024-10-22CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311651916.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-05
Publication Date
2024-10-22
Estimated Expiration
2043-12-05

AI Technical Summary

Technical Problem

It is difficult for existing storage systems to load balance heterogeneous servers while controlling costs, resulting in IO load imbalance and high operation and maintenance costs.

Method used

By obtaining server and disk type information, generating configuration files, using the indexmaster unit for space planning, and loading the indexserver unit based on the space planning information, automatic allocation and load balancing of storage resources are achieved, and system maintenance costs are reduced.

Benefits of technology

It realizes support for multiple heterogeneous servers in a single cluster, ensures IO load balancing, reduces management and operation and maintenance costs, improves data storage and retrieval speed, and meets high-performance storage requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117873374B_ABST
    Figure CN117873374B_ABST
Patent Text Reader

Abstract

The present application provides a data storage method and device for a single cluster storage system, the method comprising: obtaining the type information of the server and the type information of the disk corresponding to the server; generating a configuration file based on the type information of the server and the type information of the disk; based on the configuration file, using the indexmaster unit to perform space planning on the space unit to generate space planning information; based on the space planning information, using the indexserver unit to load the slot; using the business layer to transfer the preset storage data to the indexserver unit to obtain the first storage information; based on the first storage information, using the data storage layer to perform storage operations. The method can complete the support of multiple heterogeneous servers in a single cluster, and ensure that the IO load on each server is relatively balanced, reducing the management and control costs and operation and maintenance costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of big data and information storage, and in particular to a data storage method and device for a single cluster storage system. Background Art

[0002] With the development of domestic chips and domestic servers, more and more projects are beginning to use domestic servers and domestic chips. This is a new and unstoppable trend. At the same time, with the emergence of various photo and short video applications, the demand for storage of large amounts of data is becoming increasingly strong. For this reason, large-scale storage systems have also come into being. The entire system uses a large number of servers to form one or more storage clusters to provide large-capacity storage. Early storage systems required that each server in the cluster have the same configuration, that is, the same CPU, hard disk, etc. This type of server with the same configuration can be called a homogeneous server. However, with the mature application of domestic servers, more and more domestic servers using domestic CPUs have been applied to storage systems, such as Haiguang X86 CPU, Kunpeng ARM86 CPU, etc. This puts forward requirements for the storage system to support heterogeneous servers. However, the current mainstream storage system solutions have relatively strict requirements on server configuration in the same cluster. Basically, they require servers with the same configuration, at least servers with the same CPU and hard disk, and do not support heterogeneous servers. If heterogeneous servers are forcibly treated as the same server and added to the cluster without distinction, various problems such as unbalanced IO load on each server and difficulty in performance tuning will occur.

[0003] In the prior art, if it is necessary to support heterogeneous servers, the commonly used solution is to divide them into multiple clusters, that is, servers with the same configuration form a cluster, that is, the servers in each cluster are configured in the same way, but the original one cluster has become multiple clusters, which will require more nodes and occupy more resources. In addition, the difficulty of management, operation, maintenance and upgrades has increased. Previously, only one cluster needed to be maintained, but after being split into multiple clusters, multiple clusters need to be maintained, resulting in increased costs. The existing technologies are unable to load balance heterogeneous servers while controlling costs. Therefore, how to distribute the load of heterogeneous servers in the storage system has become an urgent problem to be solved.

[0004] Patent CN114915631A discloses a load balancing method for energy efficiency optimization of heterogeneous clusters, including the following steps: S1, server power consumption modeling: measure the power consumption value of the server under different service request arrival rates in advance, establish a linear relationship function, and obtain the energy efficiency value of the server; S2, load balancer configuration: the load balancer counts the power consumption model and energy efficiency value of the servers in the cluster, and as a service entry, establishes an integer programming target model for cluster overall power consumption optimization according to the service request arrival rate; S3, server selection: when a service request arrives, the load balancer selects the energy efficiency value as the priority according to the service demand and redundancy demand Select the least number of powered-on servers and shut down the remaining servers; S4, load distribution: use the solving tool to obtain the optimal load distribution coefficient of each server in polynomial time; according to the set of powered-on servers determined after step S3, simplify the integer programming target model established in S2, substitute the specific values ​​of the power-on state parameters therein, so as to obtain the relaxed linear programming problem, which can be solved in polynomial time using existing tools to obtain the optimal load distribution coefficient of each server; S5, periodic execution: periodically execute steps S3 and S4, and dynamically adjust the powered-on servers and load distribution coefficients according to the changes in server requests. This method only involves load balancing distribution of multiple heterogeneous clusters, and cannot save resources or reduce maintenance costs.

[0005] Based on this, the present application provides a data storage method and device for a single cluster storage system to improve the existing technology. Summary of the invention

[0006] The purpose of this application is to provide a data storage method and device for a single cluster storage system, which can support multiple heterogeneous servers in a single cluster and ensure that the IO load on each server is relatively balanced, thereby reducing management and control costs and operation and maintenance costs.

[0007] The purpose of this application is achieved by the following technical solutions:

[0008] In a first aspect, the present application provides a data storage method for a single cluster storage system, the storage system comprising a business layer and a data storage layer, the method comprising:

[0009] Get the type information of the server and the type information of the disk corresponding to the server;

[0010] Generate a configuration file based on the type information of the server and the type information of the disk;

[0011] Based on the configuration file, using the indexmaster unit to perform space planning on the space unit to generate space planning information;

[0012] Based on the space planning information, the slot is loaded using the indexserver unit;

[0013] Using the business layer to transmit the preset storage data to the indexserver unit to obtain the first storage information;

[0014] Based on the first storage information, a storage operation is performed using the data storage layer.

[0015] The beneficial effects of the technical solution are: first, obtain the type information of the server and the type information of the disk corresponding to the server; based on the type information of the server and the type information of the disk, generate a configuration file; then use the indexmaster unit to perform space planning on the space unit to generate space planning information; based on the space planning information, use the indexserver unit to load the slot; use the business layer to transfer the preset storage data to the indexserver unit to obtain the first storage information; finally, based on the first storage information, use the data storage layer to perform storage operations. By obtaining the type information of the server and the type information of the disk corresponding to the server, targeted configuration can be performed for different types of servers and disks to improve the management efficiency of the storage system; using the indexmaster unit to perform space planning on the space unit, the space allocation can be flexibly adjusted according to actual needs and resource conditions, and the utilization rate of the storage space can be optimized; based on the space planning information, the indexserver unit is used to load the slot, which can realize the automatic allocation and load balancing of storage resources and reduce the system maintenance cost; by transferring the preset storage data to the indexserver unit through the business layer, the stability of the data during the storage process can be ensured to avoid data loss or damage; based on the first storage information, the data storage layer is used to perform storage operations, which can improve the speed of data storage and retrieval and meet the needs of high-performance storage. This method can achieve intelligent management of storage resources by automatically acquiring, analyzing and processing server and disk information, reducing labor costs and improving system operation efficiency. It can also avoid waste of resources by rationally planning and managing storage resources. It can support multiple heterogeneous servers in a single cluster and ensure that the IO load on each server is relatively balanced, thereby reducing management and control costs and operation and maintenance costs.

[0016] In some optional implementations, performing space planning on the space unit by using the indexmaster unit based on the configuration file to generate space planning information includes:

[0017] Obtaining performance information of the server;

[0018] Based on the performance information of the server, the number of IO threads corresponding to each indexserver unit is set in the configuration file to obtain the allocated number;

[0019] Based on the allocated quantity, using the indexserver unit to transmit attribute information of the server corresponding to the indexserver unit to the indexmaster unit;

[0020] Based on the attribute information of the server and the configuration file, the indexmaster unit is used to perform space planning on the space unit to generate space planning information, where the space planning information is used to indicate the number of IO threads to be started and slot information corresponding to the indexserver unit.

[0021] The beneficial effect of the technical solution is that by using the configuration file and the indexmaster unit to perform space planning on the space unit, efficient utilization of server resources can be achieved. According to the performance information of the server, an appropriate number of IO threads is set for each indexserver unit to ensure that the system runs in the best state. By obtaining the performance information of the server, the load of the server can be understood more accurately, so as to optimize it in a targeted manner. Setting an appropriate number of IO threads helps to improve the throughput and response speed of the server and improve the overall performance. By managing the number of IO threads of the indexserver unit through the configuration file, the server resource allocation can be easily adjusted to meet different business needs. At the same time, the maintainability of the configuration file also makes it more convenient to modify and update system parameters. Based on the space planning information, the indexserver unit can automatically transmit server attribute information to the indexmaster unit to realize automatic space allocation. This helps to reduce management costs and improve the automation of the system. The space planning information is used to indicate the number of IO threads to be started by the indexserver unit and the corresponding slot information, ensuring that the system can provide services stably and reliably during operation. At the same time, this method also helps to avoid system failures caused by resource competition and improve the reliability of the system. The method can be easily extended to large-scale storage systems and can adapt to the increase and decrease and performance changes of heterogeneous servers. This makes the storage system highly flexible and adaptable to meet changing business needs. Space planning optimizes server resource allocation, improves system performance and reliability, simplifies configuration management, and reduces costs.

[0022] In some optional implementations, the attribute information of the server includes architecture information of the server, type information of the server, and quantity information of the server.

[0023] The beneficial effect of this technical solution is that by acquiring and integrating the architecture information, type information and quantity information of the server, the server resources can be managed comprehensively. This helps to ensure that the system administrator can accurately understand the actual situation of the server cluster and provide a basis for subsequent resource allocation and optimization. Knowing the type and quantity information of the server can better perform load balancing and resource scheduling to avoid wasting server resources. According to the architecture information of the server, appropriate tasks can be assigned to different types of servers to improve resource utilization. Through comprehensive server information, targeted optimization can be performed based on the performance characteristics of the server. For example, a CPU with strong performance can start more IO threads, that is, allocate more slots; a CPU with poor performance can start fewer IO threads, that is, allocate fewer slots, so as to ensure that the IO load of each server is relatively balanced.

[0024] In some optional implementations, the method further comprises:

[0025] Based on the type information of the server and the type information of the disk, the servers and the disks corresponding to the servers are classified to obtain a plurality of storage resource pools, each of the storage resource pools including M servers of the same type and disks corresponding to the M servers;

[0026] A file system is created on each of the storage resource pools and the configuration file is saved in the file system.

[0027] The beneficial effects of the technical solution are as follows: first, based on the type information of the server and the type information of the disk, the server and the disk corresponding to the server are classified to obtain multiple storage resource pools, each storage resource pool includes M servers of the same type and the disks corresponding to the M servers; second, a file system is created on each storage resource pool and the configuration file is saved in the storage resource pool. By classifying according to the type information of the server and the type information of the disk, it can be ensured that the servers and disks of the same type are allocated to the same storage resource pool, and the servers and disks of the same type are grouped into multiple storage resource pools, which helps to optimize data read and write operations. Classifying servers and disks by type can make the structure of the storage resource pool clearer. This will help administrators better manage and maintain the system and improve work efficiency. By creating multiple storage resource pools, servers and disks can be easily added or deleted in the system. This makes the system highly flexible and scalable; saving the configuration file in each storage resource pool helps to improve data security. At the same time, the mutual independence between multiple storage resource pools improves the fault tolerance of the system. Even if a storage resource pool fails, other storage resource pools can still continue to provide storage services.

[0028] In some optional embodiments, the method further comprises:

[0029] Based on the startup quantity, the IO thread to be started is started by using the indexserver unit.

[0030] The beneficial effect of this technical solution is that by starting IO threads that match the number of CPU cores, CPU resources can be fully utilized to achieve efficient data reading, writing and processing. In the case of concurrent execution of multiple threads, the IO operation speed is improved, thereby improving the operating efficiency of the entire system. By using the indexserver unit to start the IO thread, the reasonable allocation and scheduling of IO operations can be achieved. Multiple IO threads are executed in parallel, which reduces the latency of IO operations and improves the response speed and performance of the system. Reasonable configuration of the number of IO threads according to server hardware resources (such as CPU, memory, etc.) can avoid waste of resources and achieve a balance between high performance and high resource utilization. By starting an appropriate number of IO threads, the task load can be distributed to multiple threads, achieving balanced utilization of server resources, reducing the pressure on a single thread, and improving the stability and reliability of the entire system.

[0031] In a second aspect, the present application provides a data storage device of a single cluster storage system, the device comprising a processor, and the processor is configured to implement the following steps:

[0032] An information acquisition module, used to acquire the type information of the server and the type information of the disk corresponding to the server;

[0033] A file generating module, used for generating a configuration file based on the type information of the server and the type information of the disk;

[0034] A space planning module, configured to perform space planning on space units using indexmaster units based on the configuration file to generate space planning information;

[0035] A slot loading module, used to load the slot using the indexserver unit based on the space planning information;

[0036] An information transmission module, used for transmitting preset storage data to the indexserver unit by using a business layer to obtain first storage information;

[0037] A data storage module is used to perform a storage operation using the data storage layer based on the first storage information.

[0038] In some optional implementations, the processor is configured to perform space planning on the space unit using the indexmaster unit to generate space planning information in the following manner when executing the computer program:

[0039] Obtaining performance information of the server;

[0040] Based on the performance information of the server, the number of IO threads corresponding to each indexserver unit is set in the configuration file to obtain the allocated number;

[0041] Based on the allocated quantity, using the indexserver unit to transmit attribute information of the server corresponding to the indexserver unit to the indexmaster unit;

[0042] Based on the attribute information of the server and the configuration file, the indexmaster unit is used to perform space planning on the space unit to generate space planning information, where the space planning information is used to indicate the number of IO threads to be started and slot information corresponding to the indexserver unit.

[0043] In some optional implementations, the pipe network topology structure further includes non-isolated lines, and the attribute information of the server includes architecture information of the server, type information of the server, and quantity information of the server.

[0044] In some optional implementations, the processor is further configured to implement the following steps:

[0045] Based on the type information of the server and the type information of the disk, the servers and the disks corresponding to the servers are classified to obtain a plurality of storage resource pools, each of the storage resource pools including M servers of the same type and disks corresponding to the M servers;

[0046] A file system is created on each of the storage resource pools and the configuration file is saved in the file system.

[0047] In some optional implementations, the processor is further configured to implement the following steps:

[0048] Based on the startup quantity, the IO thread to be started is started by using the indexserver unit.

[0049] In a third aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.

[0050] In a fourth aspect, the present application provides a storage system, wherein the electronic device comprises:

[0051] The above electronic equipment;

[0052] The storage system also includes an index layer;

[0053] The index layer includes an indexmaster unit, an indexserver unit and a space unit;

[0054] The space unit includes at least one slot.

[0055] In a fifth aspect, the present application provides a chip storing a computer program, wherein the computer program implements the steps of any of the above methods when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The present application is further described below in conjunction with the accompanying drawings and implementation methods.

[0057] Figure 1 A schematic diagram showing a flow chart of a data storage method of a single cluster storage system provided in an embodiment of the present application is shown;

[0058] Figure 2 A schematic diagram of a process for generating space planning information provided by an embodiment of the present application is shown;

[0059] Figure 3 A schematic diagram of the structure of a space unit provided in an embodiment of the present application is shown;

[0060] Figure 4 A schematic diagram of a server and slot allocation provided in an embodiment of the present application is shown;

[0061] Figure 5 A structural block diagram of a data storage device of a single cluster storage system provided by an embodiment of the present application is shown;

[0062] Figure 6 A structural framework diagram of an electronic device provided in an embodiment of the present application is shown;

[0063] Figure 7 A schematic diagram of the structure of a storage system provided by an embodiment of the present application is shown;

[0064] Figure 8 A schematic diagram of the structure of a program product provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0065] Below, the embodiments of the present application are further described in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the embodiments or technical features described below can be arbitrarily combined to form a new implementation method.

[0066] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a and b and c, where a, b and c can be single or multiple. It is worth noting that "at least one" can also be interpreted as "one or more items".

[0067] It should also be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any implementation or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other implementations or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0068] Method Embodiment

[0069] See also Figure 1 , Figure 1 A schematic flow chart of a data storage method of a single cluster storage system provided in an embodiment of the present application is shown.

[0070] An embodiment of the present application provides a data storage method of a single cluster storage system, wherein the storage system includes a business layer and a data storage layer, and the method includes:

[0071] S101, obtaining type information of a server and type information of a disk corresponding to the server;

[0072] S102, generating a configuration file based on the type information of the server and the type information of the disk;

[0073] S103, based on the configuration file, using the indexmaster unit to perform space planning on the space unit to generate space planning information;

[0074] S104, based on the space planning information, using the indexserver unit to load the slot;

[0075] S105, using the business layer to transmit the preset storage data to the indexserver unit to obtain first storage information;

[0076] S106: Perform a storage operation using the data storage layer based on the first storage information.

[0077] Therefore, first, obtain the type information of the server and the type information of the disk corresponding to the server; generate a configuration file based on the type information of the server and the type information of the disk; then use the indexmaster unit to perform space planning on the space unit to generate space planning information; based on the space planning information, use the indexserver unit to load the slot; use the business layer to transfer the preset storage data to the indexserver unit to obtain the first storage information; finally, based on the first storage information, use the data storage layer to perform storage operations.

[0078] By obtaining the type information of the server and the type information of the disk corresponding to the server, targeted configuration can be performed for different types of servers and disks to improve the management efficiency of the storage system; by using the indexmaster unit to plan the space unit, the space allocation can be flexibly adjusted according to actual needs and resource conditions to optimize the utilization of storage space; based on the space planning information, the slot is loaded using the indexserver unit to realize automatic allocation and load balancing of storage resources and reduce system maintenance costs; by transmitting the preset storage data to the indexserver unit through the business layer, the stability of the data during the storage process can be ensured to avoid data loss or damage; based on the first storage information, the data storage layer is used to perform storage operations to improve the speed of data storage and retrieval to meet the needs of high-performance storage. This method can realize intelligent management of storage resources by automatically acquiring, analyzing and processing the information of servers and disks, reduce labor costs, and improve system operation efficiency. By reasonably planning and managing storage resources, it can avoid waste of resources, support for multiple heterogeneous servers in a single cluster, and ensure that the IO load on each server is relatively balanced, reducing management and control costs and operation and maintenance costs.

[0079] The embodiment of the present application does not limit the type of server, which may be, for example, Hygon X86, Kunpeng ARM86, Intel x86, etc.

[0080] The embodiment of the present application does not limit the type of disk, which may be, for example, an SSD, an HDD, etc.

[0081] The embodiment of the present application does not limit the number of indexmaster units, which can be, for example, 1, 2, 3, 5, 10, 20, 35, 40, etc.

[0082] The embodiment of the present application does not limit the number of indexserver units, which can be, for example, 1, 2, 3, 5, 10, 20, 35, 40, etc.

[0083] The embodiment of the present application does not limit the number of space units, which can be, for example, 1, 2, 3, 5, 10, 20, 35, 40, etc.

[0084] The embodiments of the present application do not limit the number of slots, which may be, for example, 1, 2, 3, 5, 10, 20, 35, 40, 159, 500, 1000, 5822, 12288, etc.

[0085] See also Figure 2 , Figure 2 A schematic diagram of a process for generating space planning information provided by an embodiment of the present application is shown.

[0086] In some optional implementations, the step of performing space planning on the space unit by using the indexmaster unit based on the configuration file to generate space planning information (ie, step S103) includes:

[0087] Step S201: Acquire performance information of the server;

[0088] Step S202: Based on the performance information of the server, the number of IO threads corresponding to each indexserver unit is set in the configuration file to obtain the allocated number;

[0089] Step S203: Based on the allocated quantity, the indexserver unit is used to transmit attribute information of the server corresponding to the indexserver unit to the indexmaster unit;

[0090] Step S204: Based on the attribute information of the server and the configuration file, the indexmaster unit is used to perform space planning on the space unit to generate space planning information, where the space planning information is used to indicate the number of IO threads to be started and the slot information corresponding to the indexserver unit.

[0091] Therefore, by using the configuration file and the indexmaster unit to plan the space unit, efficient use of server resources can be achieved. According to the performance information of the server, set the appropriate number of IO threads for each indexserver unit to ensure that the system runs in the best state. By obtaining the performance information of the server, you can more accurately understand the load of the server and optimize it in a targeted manner. Setting the appropriate number of IO threads helps improve the throughput and response speed of the server and improve the overall performance.

[0092] By managing the number of IO threads of the indexserver unit through the configuration file, you can easily adjust the server resource allocation to meet different business needs. At the same time, the maintainability of the configuration file also makes it easier to modify and update system parameters. Based on the space planning information, the indexserver unit can automatically transmit server attribute information to the indexmaster unit to achieve automatic space allocation. This helps to reduce management costs and improve the automation of the system. The space planning information is used to indicate the number of IO threads to be started by the indexserver unit and the corresponding slot information to ensure that the system can provide services stably and reliably during operation.

[0093] At the same time, this method also helps to avoid system failures caused by resource competition and improves system reliability. This method can be easily extended to large-scale storage systems and can adapt to the increase and decrease of heterogeneous servers and performance changes. This makes the storage system highly flexible and adaptable to meet changing business needs. Through space planning, server resource allocation is optimized, system performance and reliability are improved, configuration management is simplified, and costs are reduced.

[0094] In some optional embodiments, the performance data of the server can be collected by running performance detection tools. These tools can provide various performance indicators of the server, such as CPU utilization, memory utilization, disk read and write speed, and network bandwidth.

[0095] The embodiment of the present application does not limit the allocation quantity (the number of IO threads), which can be, for example, 1, 2, 3, 10, 50, 88, 200, 500, 1800, 5000, etc.

[0096] In the embodiments of the present application, an IO thread refers to a thread in a computer program that is specifically responsible for processing input and output operations. The main task of an IO thread is to perform I / O operations such as file reading and writing, network data transmission, and return the results to the main program after the operation is completed. An IO thread usually works in conjunction with other threads to improve the operating efficiency and response speed of the program.

[0097] In some optional implementations, the attribute information of the server includes architecture information of the server, type information of the server, and quantity information of the server.

[0098] Therefore, by acquiring and integrating the architecture information, type information and quantity information of the server, the server resources can be managed comprehensively. This helps ensure that the system administrator can accurately understand the actual situation of the server cluster and provide a basis for subsequent resource allocation and optimization. Knowing the type and quantity information of the server can better perform load balancing and resource scheduling and avoid wasting server resources.

[0099] According to the server architecture information, appropriate tasks can be assigned to different types of servers to improve resource utilization. With comprehensive server information, targeted optimization can be performed based on the performance characteristics of the server. For example, a CPU with strong performance can start more IO threads, that is, more slots can be allocated; a CPU with poor performance can start fewer IO threads, that is, fewer slots can be allocated. This ensures that the IO load of each server is relatively balanced.

[0100] In some optional embodiments, the method further comprises:

[0101] Based on the type information of the server and the type information of the disk, the servers and the disks corresponding to the servers are classified to obtain a plurality of storage resource pools, each of the storage resource pools including M servers of the same type and disks corresponding to the M servers;

[0102] A file system is created on each of the storage resource pools and the configuration file is saved in the file system.

[0103] Therefore, firstly, based on the type information of the servers and the type information of the disks, the servers and the disks corresponding to the servers are classified to obtain multiple storage resource pools, each storage resource pool including M servers of the same type and the disks corresponding to the M servers;

[0104] Secondly, create a file system on each storage resource pool and save the configuration file in the storage resource pool. By classifying according to the server type information and disk type information, you can ensure that the same type of servers and disks are assigned to the same storage resource pool. Grouping the same type of servers and disks into multiple storage resource pools helps optimize data read and write operations.

[0105] Classifying servers and disks by type can make the structure of the storage resource pool clearer. This will help administrators better manage and maintain the system and improve work efficiency. By creating multiple storage resource pools, you can easily add or delete servers and disks in the system. This makes the system highly flexible and scalable; saving configuration files in each storage resource pool helps improve data security. At the same time, the mutual independence between multiple storage resource pools improves the fault tolerance of the system. Even if a storage resource pool fails, other storage resource pools can still continue to provide storage services.

[0106] In the embodiment of the present application, M is a positive integer.

[0107] In some optional implementations, the size of the storage resource pool may be dynamically adjusted according to the performance of the server and the capacity of the disk; data may also be migrated between different storage resource pools.

[0108] In some optional embodiments, the method further comprises:

[0109] Based on the startup quantity, the IO thread to be started is started by using the indexserver unit.

[0110] Therefore, by starting IO threads that match the number of CPU cores, CPU resources can be fully utilized to achieve efficient data reading, writing and processing. In the case of concurrent execution of multiple threads, the IO operation speed is improved, thereby improving the operating efficiency of the entire system. Using the indexserver unit to start the IO thread, the reasonable allocation and scheduling of IO operations can be achieved. Multiple IO threads execute in parallel, reducing the latency of IO operations and improving the response speed and performance of the system. Reasonable configuration of the number of IO threads according to server hardware resources (such as CPU, memory, etc.) can avoid resource waste and achieve a balance between high performance and high resource utilization. By starting an appropriate number of IO threads, the task load can be distributed to multiple threads, achieving balanced utilization of server resources, reducing the pressure on a single thread, and improving the stability and reliability of the entire system.

[0111] In a specific embodiment, the core of the storage system is divided into three layers: business layer, index layer (client) and data storage layer. The index layer is composed of indexmaster unit, indexserver unit and space unit, and the data storage layer is where the data is actually stored. When the IO thread reaches the business layer, the business layer sends the IO thread to the specific data storage layer according to the index information provided by the index layer.

[0112] See also Figure 3 , Figure 3A schematic structural diagram of a space unit provided in an embodiment of the present application is shown.

[0113] In a specific embodiment, each space unit corresponds to a group of servers of the same type. Multiple space units can support multiple heterogeneous servers. Among them, a space unit has a maximum of 4096 slots (one slot corresponds to one RocksDB instance). Each indexserver unit corresponds to a server. Depending on the attribute information on the server, each indexserver unit can start 1-32 IO threads, and each IO thread corresponds to a slot.

[0114] See also Figure 4 , Figure 4 A schematic diagram of a server and slot allocation provided in an embodiment of the present application is shown.

[0115] In a specific embodiment, the following will use three types of CPU architectures (for example, their CPUs are of type x, y, and z) as examples (assuming that the same hard disk and the same number of CPUs are used, so the difference in hard disk processing performance and the difference in the number of CPUs are not considered for the time being).

[0116] Assume that the processing power of CPU type x is twice that of CPU type y, and the processing power of CPU type y is twice that of CPU type z. Then, according to steps 1 and 2 of the above method, a corresponding configuration file can be generated, which mainly records the three server types and the number of IO threads that the indexserver using the server should start.

[0117] If you set the indexserver of type z CPU to start 4 IO threads, then according to the performance of the CPU processing power, it is natural that the indexserver using type y CPU should start 8 IO threads, and the indexserver using type x CPU should start 16 IO threads.

[0118] Then, three storage resource pools are created based on these three types, and a file system is established on each storage pool. After the indexserver is started, it reports its server information to the indexmaster, and the indexmaster allocates slots to it. The indexserver starts the corresponding number of IO threads according to the number of IO threads specified by the indexmaster, and loads the corresponding slots.

[0119] Therefore, the slot range of the space unit of the server with type x CPU is 1-4096. There are currently 3 servers, and the indexserver on each server starts 16 IO threads. The indexserver on server 1 is responsible for slots 1-16, the indexserver on server 2 is responsible for slots 17-32, and the indexserver on server 3 is responsible for slots 33-48.

[0120] The slot range of the space unit of the server with type y CPU is 4097-8192. There are currently 3 servers. The indexserver on each server starts 8 IO threads. The indexserver on server 4 is responsible for slots 4097-4104, the indexserver on server 5 is responsible for slots 4105-4112, and the indexserver on server 6 is responsible for slots 4113-4120.

[0121] The space unit slot range of the server with z type CPU is 8193-12288. There are currently 3 servers. The indexserver on each server starts 4 IO threads. The indexserver on server 7 is responsible for slots 8193-8196, the indexserver on server 8 is responsible for slots 8197-8200, and the indexserver on server 9 is responsible for slots 8201-8204.

[0122] Device Embodiment

[0123] See also Figure 5 , Figure 5 A structural block diagram of a data storage device of a single cluster storage system provided by an embodiment of the present application is shown.

[0124] The embodiment of the present application also provides a data storage device of a single cluster storage system, and its specific implementation method is consistent with the implementation method and the technical effect achieved in the above method embodiment, and some contents are not repeated here.

[0125] The present application provides a data storage device of a single cluster storage system, the device comprising a processor, and the processor is configured to implement the following steps:

[0126] The information acquisition module 101 is used to acquire the type information of the server and the type information of the disk corresponding to the server;

[0127] A file generating module 102, configured to generate a configuration file based on the type information of the server and the type information of the disk;

[0128] A space planning module 103, configured to perform space planning on the space unit using the indexmaster unit based on the configuration file to generate space planning information;

[0129] A slot loading module 104, used to load the slot using the indexserver unit based on the space planning information;

[0130] An information transmission module 105, configured to transmit preset storage data to the indexserver unit by using a business layer to obtain first storage information;

[0131] The data storage module 106 is configured to perform a storage operation using the data storage layer based on the first storage information.

[0132] In some optional implementations, the processor is configured to perform space planning on the space unit using the indexmaster unit to generate space planning information in the following manner when executing the computer program:

[0133] Obtaining performance information of the server;

[0134] Based on the performance information of the server, the number of IO threads corresponding to each indexserver unit is set in the configuration file to obtain the allocated number;

[0135] Based on the allocated quantity, using the indexserver unit to transmit attribute information of the server corresponding to the indexserver unit to the indexmaster unit;

[0136] Based on the attribute information of the server and the configuration file, the indexmaster unit is used to perform space planning on the space unit to generate space planning information, where the space planning information is used to indicate the number of IO threads to be started and slot information corresponding to the indexserver unit.

[0137] In some optional implementations, the pipe network topology structure further includes non-isolated lines, and the attribute information of the server includes architecture information of the server, type information of the server, and quantity information of the server.

[0138] In some optional implementations, the processor is further configured to implement the following steps:

[0139] Based on the type information of the server and the type information of the disk, the servers and the disks corresponding to the servers are classified to obtain a plurality of storage resource pools, each of the storage resource pools including M servers of the same type and disks corresponding to the M servers;

[0140] A file system is created on each of the storage resource pools and the configuration file is saved in the file system.

[0141] In some optional implementations, the processor is further configured to implement the following steps:

[0142] Based on the startup quantity, the IO thread to be started is started by using the indexserver unit.

[0143] Device Embodiment

[0144] An embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program. The specific implementation method is consistent with the implementation method and the technical effect achieved in the above method embodiment, and some contents will not be repeated here.

[0145] See also Figure 6 , Figure 6 A structural framework diagram of an electronic device provided in an embodiment of the present application is shown.

[0146] The electronic device includes at least one memory 210, at least one processor 220, and a bus 230 connecting different platform systems.

[0147] The memory 210 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 211 and / or a cache memory 212 , and may further include a read-only memory (ROM) 213 .

[0148] The memory 210 also stores a computer program, which can be executed by the processor 220, so that the processor 220 implements the steps of any of the above methods.

[0149] The memory 210 may also include a utility 214 having at least one program module 215, such program module 215 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0150] Accordingly, the processor 220 may execute the above-mentioned computer program and may execute the utility 214 .

[0151] The processor 220 may be implemented using one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.

[0152] Bus 230 may be a local bus representing one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or any of a variety of bus architectures.

[0153] The electronic device may also communicate with one or more external devices 240 such as keyboards, pointing devices, Bluetooth devices, etc., and may also communicate with one or more devices that can interact with the electronic device, and / or communicate with any device (such as a router, a modem, etc.) that enables the electronic device to communicate with one or more other computing devices. Such communication may be performed through the input and output interface 250. In addition, the electronic device may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 260. The network adapter 260 may communicate with other modules of the electronic device through the bus 230. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.

[0154] System Example

[0155] See also Figure 7 , Figure 7 A schematic diagram of the structure of a storage system provided in an embodiment of the present application is shown.

[0156] The present application also provides a storage system, the system comprising:

[0157] The above electronic equipment.

[0158] The storage system also includes an index layer;

[0159] The index layer includes an indexmaster unit, an indexserver unit and a space unit;

[0160] The space unit includes at least one slot.

[0161] Medium Embodiment

[0162] An embodiment of the present application also provides a chip, which stores a computer program. When the computer program is executed by a processor, the steps of any of the above methods are implemented. The specific implementation method is consistent with the implementation method and the technical effect achieved in the above method embodiment, and some contents will not be repeated here.

[0163] See also Figure 8 , Figure 8 A schematic diagram of the structure of a program product provided in an embodiment of the present application is shown.

[0164] The program product is used to implement any of the above methods. The program product can use a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited to this. In the embodiment of the present application, the readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it. The program product can use any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0165] The chip may include a data signal propagated in the baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable storage medium may also be any readable medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above. The program code for performing the operation of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and also conventional procedural programming languages ​​such as C language, Python language, or similar programming languages. The program code may be executed entirely on a user computing device, partially on a user device, as an independent software package, partially on a user computing device, partially on a remote computing device, or entirely on a remote computing device or server. Where a remote computing device is involved, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0166] This application is explained from the perspectives of purpose of use, effectiveness, progress and novelty, and has met the functional enhancement and usage requirements emphasized by the Patent Law. The above description and drawings of this application are only the preferred embodiments of this application, and are not intended to limit this application. Therefore, all structures, devices, features, etc. that are similar or identical to this application, that is, all equivalent replacements or modifications made in accordance with the scope of the patent application of this application, should fall within the scope of protection of the patent application of this application.

Claims

1. A data storage method for a single cluster storage system, It is characterized in that The storage system includes a business layer and a data storage layer, and the method includes: S101, obtaining type information of a server and type information of a disk corresponding to the server; S102, generating a configuration file based on the type information of the server and the type information of the disk; S103, based on the configuration file, using the indexmaster unit to perform space planning on the space unit to generate space planning information; Based on the configuration file, the indexmaster unit is used to perform space planning on the space unit to generate space planning information, including: Obtaining performance information of the server; Based on the performance information of the server, the number of IO threads corresponding to each indexserver unit is set in the configuration file to obtain the allocated number; Based on the allocated quantity, using the indexserver unit to transmit attribute information of the server corresponding to the indexserver unit to the indexmaster unit; Based on the attribute information of the server and the configuration file, the indexmaster unit is used to perform space planning on the space unit to generate space planning information, where the space planning information is used to indicate the number of IO threads to be started and slot information corresponding to the indexserver unit; Each space unit corresponds to a group of servers of the same type, each indexserver unit corresponds to a server, each indexserver unit starts 1 to 32 IO threads, and each IO thread corresponds to a slot; S104, based on the space planning information, using the indexserver unit to load the slot; S105, using the business layer to transmit the preset storage data to the indexserver unit to obtain first storage information; S106: Perform a storage operation using the data storage layer based on the first storage information.

2. The data storage method of a single cluster storage system according to claim 1, It is characterized in that The attribute information of the server includes architecture information of the server, type information of the server and quantity information of the server.

3. The data storage method of a single cluster storage system according to claim 1, It is characterized in that The method further comprises: Based on the type information of the server and the type information of the disk, the servers and the disks corresponding to the servers are classified to obtain a plurality of storage resource pools, each of the storage resource pools including M servers of the same type and disks corresponding to the M servers; A file system is created on each of the storage resource pools and the configuration file is saved in the file system.

4. The data storage method of a single cluster storage system according to claim 3, It is characterized in that The method further comprises: Based on the startup quantity, the IO thread to be started is started by using the indexserver unit.

5. A data storage device of a single cluster storage system, It is characterized in that The device comprises: An information acquisition module, used to acquire the type information of the server and the type information of the disk corresponding to the server; A file generating module, used for generating a configuration file based on the type information of the server and the type information of the disk; A space planning module, configured to perform space planning on space units using indexmaster units based on the configuration file to generate space planning information; Based on the configuration file, the indexmaster unit is used to perform space planning on the space unit to generate space planning information, including: Obtaining performance information of the server; Based on the performance information of the server, the number of IO threads corresponding to each indexserver unit is set in the configuration file to obtain the allocated number; Based on the allocated quantity, using the indexserver unit to transmit attribute information of the server corresponding to the indexserver unit to the indexmaster unit; Based on the attribute information of the server and the configuration file, the indexmaster unit is used to perform space planning on the space unit to generate space planning information, where the space planning information is used to indicate the number of IO threads to be started and slot information corresponding to the indexserver unit; Each space unit corresponds to a group of servers of the same type, each indexserver unit corresponds to a server, each indexserver unit starts 1 to 32 IO threads, and each IO thread corresponds to a slot; A slot loading module, used to load the slot using the indexserver unit based on the space planning information; An information transmission module, used for transmitting preset storage data to the indexserver unit by using a business layer to obtain first storage information; The data storage module is used to perform storage operations using the data storage layer based on the first storage information.

6. An electronic device, It is characterized in that The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 4 when executing the computer program.

7. A storage system, It is characterized in that The storage system comprises: The electronic device as claimed in claim 6.

8. The storage system according to claim 7, It is characterized in that The storage system also includes an index layer; The index layer includes an indexmaster unit, an indexserver unit and a space unit; The space unit includes at least one slot.

9. A chip, It is characterized in that The chip stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.