[go: up one dir, main page]

CN108846136A - A kind of optimization method of distributed type assemblies, device, system and readable storage medium storing program for executing - Google Patents

A kind of optimization method of distributed type assemblies, device, system and readable storage medium storing program for executing Download PDF

Info

Publication number
CN108846136A
CN108846136A CN201810744133.8A CN201810744133A CN108846136A CN 108846136 A CN108846136 A CN 108846136A CN 201810744133 A CN201810744133 A CN 201810744133A CN 108846136 A CN108846136 A CN 108846136A
Authority
CN
China
Prior art keywords
metadata
file system
optimization
distributed type
cluster
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201810744133.8A
Other languages
Chinese (zh)
Inventor
程瑶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810744133.8A priority Critical patent/CN108846136A/en
Publication of CN108846136A publication Critical patent/CN108846136A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of optimization methods of distributed type assemblies, by creating N number of target directory, N number of metadata pond and at least N number of data pool, metadata pond and data pool correspondence are bound, with for each metadata pond distribute Metadata Service cluster, form it is N number of using each target directory as mount point and with the one-to-one file system in metadata pond.And since N is the positive integer greater than 1, so, when receiving processing request, unified service can be externally provided by multiple file system, processing request can be effectively relieved waits in line situation, so that each processing request can be responded as early as possible, promotes the access efficiency of user.In addition, the invention also discloses optimization device, system and the computer readable storage medium of a kind of distributed type assemblies, effect is as above.

Description

一种分布式集群的优化方法、装置、系统及可读存储介质An optimization method, device, system and readable storage medium of a distributed cluster

技术领域technical field

本发明涉及计算机技术领域,特别涉及一种分布式集群的优化方法、装置、系统及可读存储介质。The present invention relates to the field of computer technology, in particular to a distributed cluster optimization method, device, system and readable storage medium.

背景技术Background technique

目前,虽然可以通过为分布式集群设置元数据服务集群来优化集群性能,但是,从服务端的角度来说,仍然是只有一个文件系统对外服务。例如,当需要对用户进行权限管理时,常常采用samba结合等方式,映射部分目录,在该目录上对用户设置权限,使用户可见或不可见该目录,对该目录具有只读或读写等权限。虽然,从客户端的角度而言,每个用户只能看到自己有权限的内容,但是,从服务端的角度来说,是同一个文件系统对外提供统一的服务。一旦出现多客户端大并发的情况,由于服务端只有一个文件系统对外服务,所以会导致大量的处理请求需要排队等候,无法及时得到响应,使得用户的访问效率低下,影响用户体验。At present, although cluster performance can be optimized by setting up metadata service clusters for distributed clusters, from the perspective of the server, there is still only one file system for external services. For example, when it is necessary to manage user rights, samba combination is often used to map part of the directory, set permissions on the user on the directory, make the directory visible or invisible to the user, and have read-only or read-write access to the directory, etc. authority. Although, from the perspective of the client, each user can only see the content that he has permission to, but from the perspective of the server, the same file system provides unified services to the outside world. Once there is a large concurrency of multiple clients, since the server only has one file system for external services, a large number of processing requests will need to wait in line, and cannot be responded in time, which makes the user's access efficiency low and affects the user experience.

因此,如果缓解处理请求的排队等候情况,以提升用户的访问效率是本领域技术人员目前需要解决的技术问题。Therefore, it is a technical problem that those skilled in the art need to solve at present if the queuing and waiting situation of processing requests is alleviated to improve the user's access efficiency.

发明内容Contents of the invention

本发明的目的是提供一种分布式集群的优化方法、装置、系统及可读存储介质,能够缓解处理请求的排队等候情况,以提升用户的访问效率。The purpose of the present invention is to provide an optimization method, device, system and readable storage medium of a distributed cluster, which can alleviate the queuing and waiting situation of processing requests, so as to improve the access efficiency of users.

为了解决上述技术问题,本发明提供的一种分布式集群的优化方法,包括:In order to solve the above technical problems, the present invention provides a distributed cluster optimization method, including:

创建N个目标目录、N个元数据池和至少N个数据池;Create N target directories, N metadata pools and at least N data pools;

将所述元数据池和所述数据池对应进行绑定,并为各所述元数据池分配元数据服务集群以形成N个文件系统;Correspondingly binding the metadata pool and the data pool, and assigning a metadata service cluster to each of the metadata pools to form N file systems;

以各所述目标目录作为挂载点挂载N个所述文件系统;Mounting the N file systems with each of the target directories as mount points;

其中,N为大于1的正整数;一个所述文件系统对应于一个所述元数据池。Wherein, N is a positive integer greater than 1; one said file system corresponds to one said metadata pool.

优选地,所述创建N个目标目录、N个元数据池和至少N个数据池具体为:Preferably, the creation of N target directories, N metadata pools and at least N data pools is specifically:

在Linux本地系统下创建N个所述目标目录、N个所述元数据池和至少N个所述数据池;Create N target directories, N metadata pools and at least N data pools under the Linux local system;

其中,所述Linux本地系统未挂载集群文件系统。Wherein, the Linux local system does not mount the cluster file system.

优选地,Linux本地系统已挂载集群文件系统,所述创建N个目标目录、N个元数据池和至少N个数据池具体为:Preferably, the Linux local system has mounted the cluster file system, and the creation of N target directories, N metadata pools and at least N data pools is specifically:

在Linux本地系统下创建N个所述目标目录;Create N said target directories under the Linux local system;

卸载所述集群文件系统,并新建N个所述元数据池和至少N个所述数据池。Uninstall the cluster file system, and create N metadata pools and at least N data pools.

优选地,Linux本地系统已挂载集群文件系统,在所述创建N个目标目录、N个元数据池和至少N个数据池之前,还包括:Preferably, the Linux local system has mounted the cluster file system, and before creating N target directories, N metadata pools and at least N data pools, it also includes:

卸载所述集群文件系统。Unmount the cluster file system.

优选地,在所述创建N个目标目录、N个元数据池和至少N个数据池之前,还包括:Preferably, before creating N target directories, N metadata pools and at least N data pools, it further includes:

获取客户端的并发程度,并依据所述并发程度确定N的值;Obtain the concurrency degree of the client, and determine the value of N according to the concurrency degree;

其中,所述并发程度的高低与N的值的大小呈正相关。Wherein, the degree of concurrency is positively correlated with the value of N.

为了解决上述技术问题,本发明提供的一种分布式集群的优化装置,包括:In order to solve the above technical problems, the present invention provides a distributed cluster optimization device, including:

创建模块,用于创建N个目标目录、N个元数据池和至少N个数据池;Create a module for creating N target directories, N metadata pools and at least N data pools;

绑定分配模块,用于将所述元数据池和所述数据池对应进行分别绑定,并为各所述元数据池分配元数据服务集群以形成N个文件系统;A binding allocation module, configured to bind the metadata pools and the data pools respectively, and allocate metadata service clusters to each of the metadata pools to form N file systems;

挂载模块,用于以各所述目标目录作为挂载点挂载N个所述文件系统;a mount module, configured to mount N file systems using each of the target directories as a mount point;

其中,N为大于1的正整数;一个所述文件系统对应于一个所述元数据池。Wherein, N is a positive integer greater than 1; one said file system corresponds to one said metadata pool.

优选地,所述创建模块具体用于:Preferably, the creation module is specifically used for:

在Linux本地系统下创建N个所述目标目录、N个所述元数据池和至少N个所述数据池;Create N target directories, N metadata pools and at least N data pools under the Linux local system;

其中,所述Linux本地系统未挂载集群文件系统。Wherein, the Linux local system does not mount the cluster file system.

优选地,还包括:Preferably, it also includes:

卸载模块,用于在触发所述创建模块之前,卸载Linux本地系统已挂载的集群文件系统。The unloading module is used for unloading the mounted cluster file system of the Linux local system before triggering the creation module.

为了解决上述技术问题,本发明提供的一种分布式集群的优化系统,包括:In order to solve the above technical problems, the present invention provides a distributed cluster optimization system, including:

存储器,用于存储优化程序;memory for storing the optimization program;

处理器,用于在执行所述优化程序时实现如上文所述的任一种分布式集群的优化方法的步骤。A processor, configured to implement the steps of any one of the optimization methods for distributed clusters as described above when executing the optimization program.

为了解决上述技术问题,本发明提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有优化程序,所述优化程序被处理器执行时实现如上文所述的任一种分布式集群的优化方法的步骤。In order to solve the above technical problems, the present invention provides a computer-readable storage medium, on which an optimization program is stored, and when the optimization program is executed by a processor, any one of the above-mentioned distribution The steps of the optimization method for clusters.

本发明提供的分布式集群的优化方法,通过创建N个目标目录、N个元数据池和至少N个数据池,将元数据池和数据池对应进行绑定,和为各元数据池分配元数据服务集群,形成了N个以各目标目录作为挂载点且与元数据池一一对应的文件系统。且由于N为大于1的正整数,所以,当接收到处理请求时,可以通过多个文件系统对外提供统一的服务,能够有效缓解处理请求的排队等候情况,使得各处理请求能够尽快得到响应,提升用户的访问效率。此外,本发明还提供了一种分布式集群的优化装置、系统和计算机可读存储介质,效果如上。The optimization method of the distributed cluster provided by the present invention creates N target directories, N metadata pools and at least N data pools, binds the metadata pools and data pools correspondingly, and allocates metadata for each metadata pool. The data service cluster forms N file systems with each target directory as the mount point and one-to-one correspondence with the metadata pool. And because N is a positive integer greater than 1, when a processing request is received, a unified service can be provided externally through multiple file systems, which can effectively alleviate the queuing situation of processing requests, so that each processing request can be responded as soon as possible. Improve user access efficiency. In addition, the present invention also provides a distributed cluster optimization device, system and computer-readable storage medium, with the above effects.

附图说明Description of drawings

为了更清楚地说明本发明实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他附图。In order to illustrate the embodiments of the present invention more clearly, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. As far as people are concerned, other drawings can also be obtained based on these drawings on the premise of not paying creative work.

图1为本发明实施例提供的一种分布式集群的优化方法的流程图;Fig. 1 is a flowchart of a method for optimizing a distributed cluster provided by an embodiment of the present invention;

图2为本发明实施例提供的一种集群对外存储系统的结构示意图;FIG. 2 is a schematic structural diagram of a cluster external storage system provided by an embodiment of the present invention;

图3为本发明实施例提供的一种分布式集群的优化装置的组成示意图;Fig. 3 is a schematic composition diagram of a distributed cluster optimization device provided by an embodiment of the present invention;

图4为本发明实施例提供的一种分布式集群的优化系统的结构示意图。FIG. 4 is a schematic structural diagram of a distributed cluster optimization system provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有付出创造性劳动的前提下,所获得的所有其他实施例,都属于本发明保护范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

本发明的目的是提供一种分布式集群的优化方法、装置、系统及可读存储介质,能够缓解处理请求的排队等候情况,以提升用户的访问效率。The purpose of the present invention is to provide an optimization method, device, system and readable storage medium of a distributed cluster, which can alleviate the queuing and waiting situation of processing requests, so as to improve the access efficiency of users.

为了使本领域的技术人员更好的理解本发明技术方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

图1为本发明实施例提供的一种分布式集群的优化方法的流程图。如图1所示,本实施例提供的分布式集群的优化方法,包括:FIG. 1 is a flowchart of a distributed cluster optimization method provided by an embodiment of the present invention. As shown in Figure 1, the optimization method of the distributed cluster provided by this embodiment includes:

S10:创建N个目标目录、N个元数据池和至少N个数据池。S10: Create N target directories, N metadata pools and at least N data pools.

其中,N为大于1的正整数,N的具体值可以预先直接设定,如直接设定为定值2、3、4和5等大于1的正整数,也可以预先只设置根据具体条件进行计算的计算程序,如,可以设置根据客户端的并发程度计算N的具体值的计算程序,本发明对N的具体值的设定方法不作限定。Among them, N is a positive integer greater than 1, and the specific value of N can be directly set in advance, such as directly setting a positive integer greater than 1 such as fixed values 2, 3, 4 and 5, or it can only be set in advance according to specific conditions. The calculation program for calculation, for example, can be set to calculate the specific value of N according to the concurrency degree of the client. The present invention does not limit the setting method of the specific value of N.

目标目录、元数据池和数据池可以直接在之前未挂载过集群文件系统的Linux本地系统下创建,也可以在挂载过集群文件系统的Linux本地系统下创建(但是,当在挂载过集群文件系统的Linux本地系统下创建元数据池和数据池时,应保证原集群文件系统已经被卸载),即只要Linux本地系统当前没有挂载集群文件系统就不会影响本实施例的实施。The target directory, metadata pool, and data pool can be created directly under the Linux local system that has not mounted the cluster file system before, or can be created under the Linux local system that has mounted the cluster file system (however, when the cluster file system has been mounted When creating metadata pools and data pools under the Linux local system of the cluster file system, it should be ensured that the original cluster file system has been uninstalled), that is, as long as the cluster file system is not currently mounted on the Linux local system, the implementation of this embodiment will not be affected.

另外,在当前未挂载集群文件系统的Linux本地系统下,目标目录、元数据池和数据池的创建顺序无先后之分。在当前已挂载集群文件系统的Linux本地系统下,应分下述两种情况:In addition, in the Linux local system where the cluster file system is not currently mounted, the creation order of the target directory, metadata pool, and data pool is not in any order. Under the Linux local system where the cluster file system is currently mounted, the following two situations should be distinguished:

一、先在Linux本地系统下创建目标目录,然后再卸载集群文件系统,在集群文件系统卸载完成后,再创建元数据池和数据池。1. Create the target directory under the Linux local system first, and then uninstall the cluster file system. After the cluster file system is uninstalled, create a metadata pool and a data pool.

二、先卸载集群文件系统,在集群文件系统卸载完成后,再创建目标目录、元数据池和数据池。同样地,此时,目标目录、元数据池和数据池的创建顺序无先后之分。2. Uninstall the cluster file system first, and then create the target directory, metadata pool, and data pool after the cluster file system is uninstalled. Likewise, at this point, the creation order of the target directory, metadata pool, and data pool is in no particular order.

S11:将元数据池和数据池对应进行绑定,并为各元数据池分配元数据服务集群以形成N个文件系统。S11: Bind metadata pools and data pools correspondingly, and assign metadata service clusters to each metadata pool to form N file systems.

其中,一个文件系统对应于一个元数据池,也就是说,文件系统与元数据池是一一对应关系。另外,元数据池与数据池可以是一对一的关系、也可以是一对多的关系,在具体实施中,元数据池与数据池的具体对应关系可以根据实际应用场景而定,本发明对此不作限定。Wherein, a file system corresponds to a metadata pool, that is, there is a one-to-one correspondence between the file system and the metadata pool. In addition, the metadata pool and the data pool may have a one-to-one relationship or a one-to-many relationship. In specific implementation, the specific corresponding relationship between the metadata pool and the data pool may be determined according to the actual application scenario. The present invention There is no limit to this.

元数据服务集群包括激活元数据服务和备份元数据服务,且激活元数据服务和备份元数据服务的个数与具体应用场景所匹配。为元数据池分配元数据服务集群,其实就是为元数据池分配激活元数据服务和备份元数据服务。文件系统用于当接收到处理请求时,对外提供服务,包括一个与数据池对应绑定的元数据池,其在响应处理请求时所产生的数据自动生成在目标目录下。The metadata service cluster includes the activation metadata service and the backup metadata service, and the number of the activation metadata service and the backup metadata service matches the specific application scenario. Allocating a metadata service cluster to a metadata pool is actually allocating an activation metadata service and a backup metadata service to a metadata pool. The file system is used to provide external services when a processing request is received, including a metadata pool correspondingly bound to the data pool, and the data generated when responding to the processing request is automatically generated in the target directory.

S12:以各目标目录作为挂载点挂载N个文件系统。S12: Mount N file systems using each target directory as a mount point.

文件系统以各目标目录作为挂载点进行挂载,就是将各目标目录作为文件系统的入口目录,类似于windows中的用来访问不同分区的C:、D:、E:等盘符。The file system is mounted with each target directory as the mount point, that is, each target directory is used as the entry directory of the file system, similar to the C:, D:, E: and other drive letters used to access different partitions in Windows.

可见,本实施例提供的分布式集群的优化方法,通过创建N个目标目录、N个元数据池和至少N个数据池,将元数据池和数据池对应进行绑定,和为各元数据池分配元数据服务集群,形成了N个以各目标目录作为挂载点且与元数据池一一对应的文件系统。且由于N为大于1的正整数,所以,当接收到处理请求时,可以通过多个文件系统对外提供统一的服务,能够有效缓解处理请求的排队等候情况,使得各处理请求能够尽快得到响应,提升用户的访问效率。It can be seen that the optimization method for distributed clusters provided in this embodiment creates N target directories, N metadata pools, and at least N data pools, binds metadata pools and data pools correspondingly, and creates The pool allocates a metadata service cluster, forming N file systems with each target directory as a mount point and one-to-one correspondence with the metadata pool. And because N is a positive integer greater than 1, when a processing request is received, a unified service can be provided externally through multiple file systems, which can effectively alleviate the queuing situation of processing requests, so that each processing request can be responded as soon as possible. Improve user access efficiency.

为了使本领域的技术人员更好地理解本发明提供的技术方案,下面结合附图,以形成两个文件系统为例对本发明进行详细介绍。In order to enable those skilled in the art to better understand the technical solution provided by the present invention, the present invention will be described in detail below by taking the formation of two file systems as an example in conjunction with the accompanying drawings.

图2为本发明实施例提供的一种集群对外存储系统的结构示意图。如图2所示,在本实施例中,创建了两个目标目录、两个元数据池和两个数据池。其中,每个目标目录均对应于一个元数据池和一个数据池,且每个元数据池分配有两个激活元数据服务和两个备份元数据服务,最终集群对外存储系统2中形成了两个文件系统,分别为文件系统A 20和文件系统B 21。具体地,文件系统A 20包括一个第一元数据池201和一个第一数据池202,第一元数据池201分配有两个第一激活元数据服务2011和两个第一备份元数据服务2012;文件系统B 21包括一个第二元数据池211和一个第二数据池212,第一元数据池211分配有两个第二激活元数据服务2111和两个第二备份元数据服务2112。FIG. 2 is a schematic structural diagram of a cluster external storage system provided by an embodiment of the present invention. As shown in FIG. 2, in this embodiment, two target directories, two metadata pools and two data pools are created. Among them, each target directory corresponds to a metadata pool and a data pool, and each metadata pool is assigned two activation metadata services and two backup metadata services, and finally the cluster external storage system 2 forms two file systems, respectively file system A 20 and file system B 21. Specifically, the file system A 20 includes a first metadata pool 201 and a first data pool 202, and the first metadata pool 201 is allocated with two first activation metadata services 2011 and two first backup metadata services 2012 The file system B 21 includes a second metadata pool 211 and a second data pool 212, and the first metadata pool 211 is allocated with two second active metadata services 2111 and two second backup metadata services 2112.

在具体实施中,构成分布式集群的节点可能为未挂载集群文件系统的Linux,在这种情况下,为了简化本优化方法,基于上述实施例,作为一种优选的实施方式,步骤S10具体为:In a specific implementation, the nodes constituting the distributed cluster may be Linux that does not mount the cluster file system. In this case, in order to simplify this optimization method, based on the above-mentioned embodiment, as a preferred implementation mode, step S10 specifically for:

在Linux本地系统下创建N个目标目录、N个元数据池和至少N个数据池;Create N target directories, N metadata pools and at least N data pools under the Linux local system;

其中,Linux本地系统未挂载集群文件系统。Among them, the Linux local system does not mount the cluster file system.

在本实施提供的分布式集群的优化方法中,直接在Linux本地系统下创建N个目标目录、N个元数据池和至少N个数据池,相比于,在已挂载过集群文件系统的Linux本地系统下创建N个目标目录、N个元数据池和至少N个数据池而言,无需再次卸载原集群文件系统以保证当创建元数据池和数据池时Linux本地系统当前没有挂载集群文件系统,形成多个文件系统的过程更为简单,能够起到简化分布式集群的优化方法的作用。In the optimization method for distributed clusters provided by this implementation, N target directories, N metadata pools, and at least N data pools are created directly under the Linux local system, compared to the cluster file system that has been mounted For creating N target directories, N metadata pools, and at least N data pools under the Linux local system, there is no need to unmount the original cluster file system again to ensure that the Linux local system is not currently mounted on the cluster when creating metadata pools and data pools The file system, the process of forming multiple file systems is simpler, and can play a role in simplifying the optimization method of the distributed cluster.

相对的,在具体实施中,也存在构成分布式集群的节点为已挂载集群文件系统的Linux,在这种情况下,基于上述实施例,作为一种优选的实施方式,步骤S10具体为:On the contrary, in specific implementation, there are also Linux whose nodes constituting the distributed cluster are mounted cluster file systems. In this case, based on the above-mentioned embodiment, as a preferred implementation mode, step S10 is specifically:

在Linux本地系统下创建N个目标目录;Create N target directories under the Linux local system;

卸载集群文件系统,并新建N个元数据池和至少N个数据池。Unmount the cluster file system, and create N metadata pools and at least N data pools.

在本实施例提供的分布式集群的优化方法中,即使Linux本地系统已经挂载了集群文件系统,也可以先直接在集群文件系统下创建N个目标目录,然后再卸载集群文件系统,并新建N个元数据池和至少N个数据池,完成对分布式集群的优化。In the distributed cluster optimization method provided in this embodiment, even if the cluster file system has been mounted on the Linux local system, N target directories can be created directly under the cluster file system, and then the cluster file system is uninstalled, and a new N metadata pools and at least N data pools complete the optimization of distributed clusters.

对于Linux本地系统已挂载集群文件系统的情况,基于上述实施例,作为另一种优选的实施方式,在步骤S10之前,还包括:For the situation that the Linux local system has mounted the cluster file system, based on the above-mentioned embodiment, as another preferred implementation manner, before step S10, it also includes:

卸载集群文件系统。Unmount the cluster file system.

在本实施例提供的分布式集群的优化方法中,即使Linux本地系统已经挂载了集群文件系统,也可以先直接卸载集群文件系统,在确保Linux本地系统不再挂载有集群文件系统的情况下,再执行步骤S10,完成对分布式集群的优化。In the optimization method of the distributed cluster provided in this embodiment, even if the cluster file system has been mounted on the Linux local system, the cluster file system can be unmounted directly first, in the case of ensuring that the Linux local system is no longer mounted with the cluster file system Next, step S10 is executed again to complete the optimization of the distributed cluster.

为了使各文件系统的处理能力相近,基于上述实施例,作为一种优选的实施方式,为各元数据池分配元数据服务集群具体为:In order to make the processing capabilities of each file system similar, based on the above embodiment, as a preferred implementation manner, the allocation of metadata service clusters for each metadata pool is specifically as follows:

将元数据服务集群中的激活元数据服务和备份元数据服务平均分配至各元数据池。Evenly distribute the active metadata service and backup metadata service in the metadata service cluster to each metadata pool.

在本实施例提供的分布式集群的优化方法中,将元数据服务集群中的激活元数据服务和备份元数据服务平均分配至各元数据池,可以使各文件系统的处理能力相近。当然,在实际应用中,还可以根据实际的应用场景,采用其它的分配方式将元数据服务集群中的激活元数据服务和备份元数据服务分配至各元数据池,如按照1:3的比例将元数据服务集群中的激活元数据服务和备份元数据服务分配至各元数据池,本发明对此不作限定。In the distributed cluster optimization method provided in this embodiment, the activation metadata service and backup metadata service in the metadata service cluster are evenly distributed to each metadata pool, so that the processing capabilities of each file system can be similar. Of course, in practical applications, other allocation methods can be used to allocate the activation metadata service and backup metadata service in the metadata service cluster to each metadata pool according to the actual application scenario, for example, according to the ratio of 1:3 The activated metadata service and the backup metadata service in the metadata service cluster are allocated to each metadata pool, which is not limited in the present invention.

为了是本优化方法能够更加满足用户的个性化需求,基于上述实施例,作为一种优选的实施方式,在步骤S10之前,还包括:In order for this optimization method to better meet the individual needs of users, based on the above-mentioned embodiments, as a preferred implementation manner, before step S10, it also includes:

获取客户端的并发程度,并依据并发程度确定N的值。Obtain the concurrency level of the client, and determine the value of N according to the concurrency level.

在本实施例提供的分布式集群的优化方法中,可以获取客户端的并发程度,并依据并发程度确定N的值,使得客户端的并发程度高低与N的值大小呈正相关。即,对于客户端并发程度平均较高的情况,可以确定一个较大的N值,以形成更多地文件系统,同时对外提供服务;而对于客户端并发程度平均较低的情况,则确定一个较小的N值,形成较少的文件系统便可以满足用户需求。可见,本实施例提供的分布式集群的优化方法,能够更好的满足用户的个性化需求。In the distributed cluster optimization method provided in this embodiment, the concurrency degree of the client can be obtained, and the value of N can be determined according to the concurrency degree, so that the concurrency degree of the client is positively correlated with the value of N. That is, for the case where the client concurrency is relatively high on average, a larger N value can be determined to form more file systems and provide external services at the same time; and for the case where the client concurrency is low on average, a larger N value can be determined. With a smaller value of N, fewer file systems can be formed to meet user needs. It can be seen that the optimization method for distributed clusters provided by this embodiment can better meet the personalized needs of users.

上文对于本发明提供的一种分布式集群的优化方法的实施例进行了详细的描述,本发明还提供了一种与分布式集群的优化方法对应的分布式集群的优化装置,由于装置部分的实施例与方法部分的实施例相互照应,因此装置部分的实施例请参见方法部分的实施例的描述,这里暂不赘述。The above describes in detail the embodiment of a distributed cluster optimization method provided by the present invention, and the present invention also provides a distributed cluster optimization device corresponding to the distributed cluster optimization method, because the device part The embodiment of the method and the embodiment of the method part refer to each other, so for the embodiment of the device part, please refer to the description of the embodiment of the method part, and details will not be repeated here.

图3为本发明实施例提供的一种分布式集群的优化装置的组成示意图。如图3所示,本实施例提供的分布式集群的优化装置,包括:FIG. 3 is a schematic composition diagram of a distributed cluster optimization device provided by an embodiment of the present invention. As shown in Figure 3, the optimization device for distributed clusters provided by this embodiment includes:

创建模块30,用于创建N个目标目录、N个元数据池和至少N个数据池;Create a module 30, for creating N target directories, N metadata pools and at least N data pools;

绑定分配模块31,用于将元数据池和数据池对应进行绑定,并为各元数据池分配元数据服务集群以形成N个文件系统;A binding allocation module 31, configured to bind the metadata pool and the data pool correspondingly, and allocate metadata service clusters for each metadata pool to form N file systems;

挂载模块32,用于以各目标目录作为挂载点挂载N个文件系统;Mounting module 32, used for mounting N file systems with each target directory as a mount point;

其中,N为大于1的正整数;一个文件系统对应于一个元数据池。Wherein, N is a positive integer greater than 1; one file system corresponds to one metadata pool.

本实施例提供的分布式集群的优化装置,通过创建模块、绑定分配模块和挂载模块协同合作,最终通过创建N个目标目录、N个元数据池和至少N个数据池,将元数据池和数据池对应进行绑定,和为各元数据池分配元数据服务集群,形成了N个以各目标目录作为挂载点且与元数据池一一对应的文件系统。且由于N为大于1的正整数,所以,当接收到处理请求时,可以通过多个文件系统对外提供统一的服务,能够有效缓解处理请求的排队等候情况,使得各处理请求能够尽快得到响应,提升用户的访问效率。The distributed cluster optimization device provided in this embodiment works collaboratively with the creation module, the binding allocation module, and the mount module, and finally creates N target directories, N metadata pools, and at least N data pools to store metadata Pools and data pools are bound correspondingly, and metadata service clusters are assigned to each metadata pool, forming N file systems with each target directory as a mount point and one-to-one correspondence with metadata pools. And because N is a positive integer greater than 1, when a processing request is received, a unified service can be provided externally through multiple file systems, which can effectively alleviate the queuing situation of processing requests, so that each processing request can be responded as soon as possible. Improve user access efficiency.

基于上述实施例,作为一种优选的实施方式,创建模块30具体用于:Based on the above embodiments, as a preferred implementation manner, the creation module 30 is specifically used for:

在Linux本地系统下创建N个目标目录、N个元数据池和至少N个数据池;Create N target directories, N metadata pools and at least N data pools under the Linux local system;

其中,Linux本地系统未挂载集群文件系统。Among them, the Linux local system does not mount the cluster file system.

基于上述实施例,作为一种优选的实施方式,还包括:Based on the above embodiments, as a preferred implementation manner, it also includes:

卸载模块,用于在触发创建模块30之前,卸载Linux本地系统已挂载的集群文件。The unloading module is used for unloading the mounted cluster file of the Linux local system before triggering the creation module 30 .

上文对于本发明提供的一种分布式集群的优化方法的实施例进行了详细的描述,本发明还提供了一种与分布式集群的优化方法对应的分布式集群的优化系统,由于系统部分的实施例与方法部分的实施例相互照应,因此系统部分的实施例请参见方法部分的实施例的描述,这里暂不赘述。The above has described in detail the embodiment of a distributed cluster optimization method provided by the present invention. The present invention also provides a distributed cluster optimization system corresponding to the distributed cluster optimization method. Since the system part The embodiment of the method and the embodiment of the method part refer to each other, so for the embodiment of the system part, please refer to the description of the embodiment of the method part, and details will not be repeated here.

图4为本发明实施例提供的一种分布式集群的优化系统的结构示意图。如图4所示,本实施例提供的分布式集群的优化系统,包括:FIG. 4 is a schematic structural diagram of a distributed cluster optimization system provided by an embodiment of the present invention. As shown in Figure 4, the optimization system for distributed clusters provided by this embodiment includes:

存储器40,用于存储优化程序;Memory 40, used to store the optimization program;

处理器41,用于在执行优化程序时实现如上文的任一实施例所提供的分布式集群的优化方法的步骤。The processor 41 is configured to implement the steps of the method for optimizing a distributed cluster as provided in any one of the above embodiments when executing the optimization program.

本实施例提供的分布式集群的优化系统,由于可以通过处理器调用存储器存储的优化程序,实现如上述任一实施例提供的分布式集群的优化方法的步骤,所以本优化系统具有同上述分布式集群的优化方法同样的实际效果。The distributed cluster optimization system provided by this embodiment can realize the steps of the distributed cluster optimization method provided by any of the above-mentioned embodiments by calling the optimization program stored in the memory through the processor, so this optimization system has the same distribution as above. The same practical effect as the optimization method of the type cluster.

本发明还提供了一种计算机可读存储介质,计算机可读存储介质上存储有优化程序,优化程序被处理器执行时实现如上文的任一实施例所提供的分布式集群的优化方法的步骤。The present invention also provides a computer-readable storage medium. An optimization program is stored on the computer-readable storage medium. When the optimization program is executed by a processor, the steps of the optimization method for a distributed cluster as provided in any of the above embodiments are implemented. .

本实施例提供的计算机可读存储介质存储有优化程序,由于优化程序被处理器执行时可以实现如上述任一实施例提供的分布式集群的优化方法的步骤,所以本计算机可读存储介质具有同上述分布式集群的优化方法同样的实际效果。The computer-readable storage medium provided in this embodiment stores an optimization program. Since the optimization program is executed by a processor, the steps of the method for optimizing a distributed cluster as provided in any of the above-mentioned embodiments can be implemented, so the computer-readable storage medium has The same practical effect as the optimization method of the above-mentioned distributed cluster.

以上对本发明所提供的分布式集群的优化方法、装置、系统及可读存储介质进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明都是与其它实施例的不同之处,各个实施例之间相同相似部分互相参见即可。The optimization method, device, system and readable storage medium of the distributed cluster provided by the present invention have been introduced in detail above. Each embodiment in the description is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.

应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, some improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

还需要说明的是,在本说明书中,诸如第一和第二之类的关系术语仅仅用来将一个实体或者操作与另一个实体或者操作区分开来,而不一定要求或者暗示这些实体或者操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何变体意在涵盖非排他性的包含,从而使得包括一系列的要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其它要素,或者还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this specification, relative terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations Any such actual relationship or order exists between. Furthermore, the terms "comprises", "comprises" or any variations thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also includes elements not expressly listed. other elements of, or also elements inherent in, such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

Claims (10)

1. a kind of optimization method of distributed type assemblies, which is characterized in that including:
Create N number of target directory, N number of metadata pond and at least N number of data pool;
The metadata pond and data pool correspondence are bound, and distribute Metadata Service collection for each metadata pond Group is to form N number of file system;
Using each target directory as the N number of file system of mount point carry;
Wherein, N is the positive integer greater than 1;One file system corresponds to a metadata pond.
2. the optimization method of distributed type assemblies according to claim 1, which is characterized in that the N number of target directory of the creation, N number of metadata pond and at least N number of data pool are specially:
N number of target directory, N number of metadata pond and at least N number of data pool are created under Linux local system;
Wherein, the non-carry cluster file system of the Linux local system.
3. the optimization method of distributed type assemblies according to claim 1, which is characterized in that Linux local system carry Cluster file system, N number of target directory, N number of metadata pond and at least N number of data pool of creating are specially:
N number of target directory is created under the Linux local system;
The cluster file system is unloaded, and creates N number of metadata pond and at least N number of data pool.
4. the optimization method of distributed type assemblies according to claim 1, which is characterized in that Linux local system carry Cluster file system further includes before the N number of target directory of the creation, N number of metadata pond and at least N number of data pool:
Unload the cluster file system.
5. the optimization method of distributed type assemblies according to claim 4, which is characterized in that in the N number of target mesh of creation Before record, N number of metadata pond and at least N number of data pool, further include:
The degree of concurrence of client is obtained, and determines the value of N according to the degree of concurrence;
Wherein, the size of the value of the height and N of the degree of concurrence is positively correlated.
6. a kind of optimization device of distributed type assemblies, which is characterized in that including:
Creation module, for creating N number of target directory, N number of metadata pond and at least N number of data pool;
Distribution module is bound, for binding the metadata pond and data pool correspondence, and is each metadata Metadata Service cluster is distributed to form N number of file system in pond;
Carry module, for using each target directory as the N number of file system of mount point carry;
Wherein, N is the positive integer greater than 1;One file system corresponds to a metadata pond.
7. the optimization device of distributed type assemblies according to claim 6, which is characterized in that the creation module is specifically used In:
N number of target directory, N number of metadata pond and at least N number of data pool are created under Linux local system;
Wherein, the non-carry cluster file system of the Linux local system.
8. the optimization device of distributed type assemblies according to claim 6, which is characterized in that further include:
Unload module, for before triggering the creation module, the group document system of unloading Linux local system carry System.
9. a kind of optimization system of distributed type assemblies, which is characterized in that including:
Memory is used for storage optimization program;
Processor, for realizing distributed type assemblies as described in any one in claim 1-5 when executing the optimization program The step of optimization method.
10. a kind of computer readable storage medium, which is characterized in that be stored with optimization journey on the computer readable storage medium Sequence, the optimization program realize the optimization side of distributed type assemblies as described in any one in claim 1-5 when being executed by processor The step of method.
CN201810744133.8A 2018-07-09 2018-07-09 A kind of optimization method of distributed type assemblies, device, system and readable storage medium storing program for executing Pending CN108846136A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810744133.8A CN108846136A (en) 2018-07-09 2018-07-09 A kind of optimization method of distributed type assemblies, device, system and readable storage medium storing program for executing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810744133.8A CN108846136A (en) 2018-07-09 2018-07-09 A kind of optimization method of distributed type assemblies, device, system and readable storage medium storing program for executing

Publications (1)

Publication Number Publication Date
CN108846136A true CN108846136A (en) 2018-11-20

Family

ID=64195810

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810744133.8A Pending CN108846136A (en) 2018-07-09 2018-07-09 A kind of optimization method of distributed type assemblies, device, system and readable storage medium storing program for executing

Country Status (1)

Country Link
CN (1) CN108846136A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710275A (en) * 2018-12-19 2019-05-03 中科曙光国际信息产业有限公司 A kind of the software uninstalling system and method for distributed type assemblies

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101520805A (en) * 2009-03-25 2009-09-02 中兴通讯股份有限公司 Distributed file system and file processing method thereof
CN102411639A (en) * 2011-12-31 2012-04-11 曙光信息产业股份有限公司 Multi-copy storage management method and system for metadata
CN103593226A (en) * 2013-11-04 2014-02-19 国云科技股份有限公司 Method for improving IO performance of disc of virtual machine
CN104520845A (en) * 2012-09-06 2015-04-15 惠普发展公司,有限责任合伙企业 Scalable file system
CN105608150A (en) * 2015-12-17 2016-05-25 浪潮电子信息产业股份有限公司 Business data processing method and system
CN106649608A (en) * 2016-11-29 2017-05-10 郑州云海信息技术有限公司 Small file performance improving method and directory creater of distributed file system and system
CN107239569A (en) * 2017-06-27 2017-10-10 郑州云海信息技术有限公司 A kind of distributed file system subtree storage method and device
CN107528924A (en) * 2017-10-09 2017-12-29 郑州云海信息技术有限公司 A kind of distributed type assemblies Metadata Service dispositions method and system
CN108984299A (en) * 2018-06-29 2018-12-11 郑州云海信息技术有限公司 A kind of optimization method of distributed type assemblies, device, system and readable storage medium storing program for executing

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101520805A (en) * 2009-03-25 2009-09-02 中兴通讯股份有限公司 Distributed file system and file processing method thereof
CN102411639A (en) * 2011-12-31 2012-04-11 曙光信息产业股份有限公司 Multi-copy storage management method and system for metadata
CN104520845A (en) * 2012-09-06 2015-04-15 惠普发展公司,有限责任合伙企业 Scalable file system
CN103593226A (en) * 2013-11-04 2014-02-19 国云科技股份有限公司 Method for improving IO performance of disc of virtual machine
CN105608150A (en) * 2015-12-17 2016-05-25 浪潮电子信息产业股份有限公司 Business data processing method and system
CN106649608A (en) * 2016-11-29 2017-05-10 郑州云海信息技术有限公司 Small file performance improving method and directory creater of distributed file system and system
CN107239569A (en) * 2017-06-27 2017-10-10 郑州云海信息技术有限公司 A kind of distributed file system subtree storage method and device
CN107528924A (en) * 2017-10-09 2017-12-29 郑州云海信息技术有限公司 A kind of distributed type assemblies Metadata Service dispositions method and system
CN108984299A (en) * 2018-06-29 2018-12-11 郑州云海信息技术有限公司 A kind of optimization method of distributed type assemblies, device, system and readable storage medium storing program for executing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710275A (en) * 2018-12-19 2019-05-03 中科曙光国际信息产业有限公司 A kind of the software uninstalling system and method for distributed type assemblies
CN109710275B (en) * 2018-12-19 2022-01-28 中科曙光国际信息产业有限公司 Software unloading system and method for distributed cluster

Similar Documents

Publication Publication Date Title
US12541431B2 (en) Parallel change file tracking in a distributed file server virtual machine (FSVM) architecture
JP5932043B2 (en) Volatile memory representation of non-volatile storage set
US10102210B2 (en) Systems and methods for multi-threaded shadow migration
CN103399778B (en) A kind of virtual machine online bulk migration method and apparatus
US9501473B1 (en) Workflow process with temporary storage resource reservation
CN103761053B (en) A kind of data processing method and device
US8751547B2 (en) Multiple file system and/or multi-host single instance store techniques
CN106899676A (en) A kind of multi-client writes catalogue quota allotment approach
CN107026876B (en) A kind of file data access system and method
WO2016187974A1 (en) Storage space management method and apparatus
CN107025223B (en) A multi-tenant-oriented buffer management method and server
CN107423301B (en) A data processing method, related equipment and storage system
US10776173B1 (en) Local placement of resource instances in a distributed system
US20170220598A1 (en) Fine-Grained Metadata Management in a Distributed File System
WO2017107015A1 (en) Storage space allocation method, and storage device
CN107341056A (en) A kind of method and device of the thread distribution based on NFS
CN103440113B (en) A kind of disk I/O resource allocation methods and device
CN117539398A (en) Method, device, equipment and medium for managing volume mapping
US10592469B1 (en) Converting files between thinly and thickly provisioned states
CN108270858A (en) A kind of private cloud framework and its data processing method based on API gateway
CN104461736A (en) Resource allocation and search method and system and cloud server
CN107479991A (en) Object methods of storage operating, apparatus and system based on kernel file system
CN112799588B (en) Data storage method for loading container cluster application data by using external storage
CN108846136A (en) A kind of optimization method of distributed type assemblies, device, system and readable storage medium storing program for executing
CN106201921A (en) The method of adjustment of a kind of cache partitions capacity and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181120