CN114676198A - Benchmark evaluation system for multimode database and construction method thereof - Google Patents
Benchmark evaluation system for multimode database and construction method thereof Download PDFInfo
- Publication number
- CN114676198A CN114676198A CN202210365988.6A CN202210365988A CN114676198A CN 114676198 A CN114676198 A CN 114676198A CN 202210365988 A CN202210365988 A CN 202210365988A CN 114676198 A CN114676198 A CN 114676198A
- Authority
- CN
- China
- Prior art keywords
- evaluation
- database
- module
- data
- workload
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2471—Distributed queries
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation 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
- G06F9/5016—Allocation 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 the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/548—Queue
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Computing Systems (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Probability & Statistics with Applications (AREA)
- Computational Linguistics (AREA)
- Debugging And Monitoring (AREA)
Abstract
本发明公开一种面向多模数据库的基准评测系统及其构建方法,系统包括:分布式数据库模块、资源监控模块、消息传输模块、工作负载执行模块和评测记录管理模块。方法包括如下步骤:(1)安装部署相关数据库集群;(2)安装部署Prometheus和Grafana资源监控软件;(3)基于Zookeeper和Kafka实现异步消息传输队列;(4)基于Java语言实现负载执行程序,用于连接异步消息传输队列和分布式数据库集群;(5)基于Java语言和前端框架vue实现评测记录管理,为评测任务创建及评测结果查看提供可视化页面。
The invention discloses a multi-mode database-oriented benchmark evaluation system and a construction method thereof. The system includes a distributed database module, a resource monitoring module, a message transmission module, a workload execution module and an evaluation record management module. The method includes the following steps: (1) Install and deploy related database clusters; (2) Install and deploy Prometheus and Grafana resource monitoring software; (3) Implement asynchronous message transmission queues based on Zookeeper and Kafka; (4) Implement load execution programs based on Java language, It is used to connect asynchronous message transmission queues and distributed database clusters; (5) Based on Java language and front-end framework vue, it implements evaluation record management, and provides visual pages for evaluation task creation and evaluation results viewing.
Description
技术领域technical field
本发明涉及一种面向多模数据库的基准评测系统及其构建方法,软件性能评测与度量分析技术领域。The invention relates to a benchmark evaluation system oriented to a multimodal database and a construction method thereof, and the technical field of software performance evaluation and measurement analysis.
背景技术Background technique
分析和处理多模数据的需求日益增多,多模数据可以分为结构化数据、半结构化数据和非结构化数据。结构化数据又包含关系型数据、键值对和图形数据等。当需要管理多模数据时,选用哪一种多模数据库是一个不可回避的关键问题。现有的对多模数据库的研究工作主要聚焦于比较多模数据库在执行时间方面的差异,而没有关注服务器的资源状况。如果服务器内存溢出,数据库也将面临宕机。在分布式的环境下,系统失效被认为是常态事件,而不是意外事件,因此对数据库资源消耗的评测至关重要。There is an increasing demand for analyzing and processing multimodal data, which can be divided into structured data, semi-structured data and unstructured data. Structured data includes relational data, key-value pairs, and graph data. When it is necessary to manage multimodal data, which multimodal database to choose is an unavoidable key issue. Existing research work on multi-modal databases mainly focuses on comparing the differences in execution time of multi-modal databases, without paying attention to the resource status of servers. If the server runs out of memory, the database will also face downtime. In a distributed environment, system failures are considered normal events rather than unexpected events, so the evaluation of database resource consumption is crucial.
发明内容SUMMARY OF THE INVENTION
发明目的:针对现有技术中存在的问题与不足,本发明提供一种面向多模数据库的基准评测系统及其构建方法,为多模数据的处理提供可量化比较的方案。Purpose of the invention: Aiming at the problems and deficiencies in the prior art, the present invention provides a multi-modal database-oriented benchmark evaluation system and its construction method, and provides a quantifiable comparison solution for multi-modal data processing.
技术方案:一种面向多模数据库的基准评测系统,包括:分布式数据库模块、资源监控模块、消息传输模块、工作负载执行模块和评测记录管理模块。所述消息传输模块为工作负载执行模块提供源数据;所述工作负载执行模块将从消息传输模块读取到的数据存储到分布式数据库模块;所述资源监控模块在工作负载执行期间采集资源数据;所述评测记录管理模块负责管理工作负载执行模块的执行结果。Technical solution: A benchmark evaluation system oriented to a multi-modal database, comprising: a distributed database module, a resource monitoring module, a message transmission module, a workload execution module and an evaluation record management module. The message transmission module provides source data for the workload execution module; the workload execution module stores the data read from the message transmission module to the distributed database module; the resource monitoring module collects resource data during workload execution ; The evaluation record management module is responsible for managing the execution results of the workload execution module.
所述分布式数据库模块包括2种多模数据库:ArangoDB、OrientDB,分布式数据库模块是评测系统的基础也是评测系统的主体。The distributed database module includes two multimodal databases: ArangoDB and OrientDB. The distributed database module is the basis of the evaluation system and the main body of the evaluation system.
所述资源监控模块由分布式监控系统Prometheus和Grafana组成,用于对数据库占用的资源进行评测。资源监控模块可以对服务器的CPU、内存、带宽以及吞吐量等资源使用情况进行监测。本系统主要对CPU和内存使用情况进行监测。The resource monitoring module is composed of distributed monitoring systems Prometheus and Grafana, and is used to evaluate the resources occupied by the database. The resource monitoring module can monitor the resource usage such as CPU, memory, bandwidth, and throughput of the server. This system mainly monitors CPU and memory usage.
所述消息传输模块由Zookeeper和Kafka实现异步消息传输队列。在该异步消息传输队列中Zookeeper起到的是注册中心的作用,使得工作负载执行模块可以从Kafka中异步获取数据。Kafka则是作为一个流数据处理平台。在评测开始前,消息传输队列生产者通过Java程序将数据集中的数据存储到Kafka中,为消费者提供数据。由Zookeeper和Kafka实现的消息传输队列不仅实现了生产者与消费者解耦,而且能够适配负载处理速度做到异步通信。The message transmission module implements asynchronous message transmission queues by Zookeeper and Kafka. In this asynchronous message transmission queue, Zookeeper acts as a registry, so that the workload execution module can asynchronously obtain data from Kafka. Kafka is used as a stream data processing platform. Before the evaluation starts, the message transmission queue producer stores the data in the data set into Kafka through the Java program to provide data for consumers. The message transmission queue implemented by Zookeeper and Kafka not only realizes the decoupling of producers and consumers, but also can adapt to the load processing speed to achieve asynchronous communication.
所述工作负载执行模块模拟真实的大数据应用场景设计了大量的负载。大致可以分为三类负载:单表增删改查工作负载、多线程工作负载、多表联合查询工作负载。单表增删改查工作负载每次仅对一个表进行增删改查操作,从而模拟数据迁移和数据实例化的操作;多线程工作负载通过创建多个线程来执行任务,从而模拟大数据应用场景下数据库同时处理多个请求的高并发操作;多表联合查询工作负载通过表与表之间的联合查询,从而模拟大数据场景中具有复杂业务逻辑的操作。The workload execution module designs a large number of loads by simulating real big data application scenarios. It can be roughly divided into three types of workloads: single-table addition, deletion, modification and query workloads, multi-threaded workloads, and multi-table joint query workloads. Single-table CRUD workloads only perform CRUD operations on one table at a time, thereby simulating data migration and data instantiation operations; multi-threaded workloads create multiple threads to perform tasks, thus simulating big data application scenarios The database handles high concurrent operations of multiple requests at the same time; the multi-table joint query workload simulates operations with complex business logic in big data scenarios through joint query between tables.
所述评测记录管理模块通过构建易交互的Web页面降低数据库评测门槛,增强数据库评测交互性。评测记录管理模块共分为两个部分:任务提交部分和评测记录查看部分。在任务提交部分用户可以通过Web页面选择相关参数并提交评测任务。在评测记录查看部分用户可以查看所有评测任务的状态及参数。The evaluation record management module lowers the threshold of database evaluation by constructing an easy-to-interact Web page, and enhances the interactivity of database evaluation. The evaluation record management module is divided into two parts: the task submission part and the evaluation record viewing part. In the task submission section, users can select relevant parameters through the Web page and submit evaluation tasks. In the evaluation record viewing section, users can view the status and parameters of all evaluation tasks.
一种面向多模数据库的基准评测系统的构建方法,包括如下步骤:A method for constructing a benchmark evaluation system oriented to a multimodal database, comprising the following steps:
(1)为提升数据库的可靠性和可用性,同时也为了模拟真实的大数据库应用场景。首先需要为涉及评测的数据库安装部署主从集群。(1) In order to improve the reliability and availability of the database, and also to simulate real large database application scenarios. First, you need to deploy the master-slave cluster for the database installation involved in the evaluation.
(2)为了精确地统计服务器的资源占用情况,需要安装分布式资源监控软件Prometheus和Grafana。Prometheus本质上是一个时间序列数据库,通过定时采样服务器的资源情况实现资源监控的目的。Grafana则是一个图形界面化工具,能够将Prometheus采集到的数据呈现到界面上。该资源监控软件提供包含CPU、内存、带宽、吞吐量在内的各种服务器资源监控功能,本系统主要监控CPU和内存两类资源。(2) In order to accurately count the resource occupancy of the server, the distributed resource monitoring software Prometheus and Grafana need to be installed. Prometheus is essentially a time series database, which realizes the purpose of resource monitoring by regularly sampling the resource situation of the server. Grafana is a graphical interface tool that can present the data collected by Prometheus to the interface. The resource monitoring software provides various server resource monitoring functions including CPU, memory, bandwidth, and throughput. This system mainly monitors two types of resources: CPU and memory.
(3)为了实现数据输入输出解耦并实现异步通信,需要安装部署Zookeeper和Kafka组成的异步消息传输队列。在该消息队列中,Zookeeper作为注册中心,用于实现消息的负载均衡,Kafka作为流数据处理平台。使用消息队列可以解决数据输入输出相互影响的问题,避免了一个环节出错,整个流程都要重新开始,实现了输入输出的解耦。使用消息队列解决数据输入输出的问题。如果不使用消息队列,让程序直接读文件,则整个系统耦合在一起,一个环节出现问题评测就要从头再来。使用消息队列之后,输入和输出两个环节是分开的,即使出现问题,也不用全部重做。另外,这样也有利于定位错误位置。其次,消息队列可以缓存数据,生产者提前将数据存储到Kafka中,消费者需要的时候再去取,实现了异步通信的功能。(3) In order to realize the decoupling of data input and output and realize asynchronous communication, it is necessary to install and deploy an asynchronous message transmission queue composed of Zookeeper and Kafka. In this message queue, Zookeeper is used as a registry to achieve load balancing of messages, and Kafka is used as a stream data processing platform. The use of message queues can solve the problem of the mutual influence of data input and output, avoid a link error, and the entire process must be restarted, realizing the decoupling of input and output. Use message queues to solve data input and output problems. If you don't use message queues and let the program read files directly, the whole system is coupled together, and if there is a problem in one link, the evaluation will have to start all over again. After using the message queue, the input and output links are separated, and even if there is a problem, there is no need to redo it all. In addition, this also helps to locate the wrong location. Secondly, the message queue can cache data. The producer stores the data in Kafka in advance, and the consumer fetches it when needed, realizing the function of asynchronous communication.
(4)工作负载执行模块是用Java语言实现的,通过编码的方式将负载转换为可运行的程序。工作负载执行模块需要部署在JDK1.8的环境中。该模块包含了大量的工作负载,主要可以分为三类:单表增删改查工作负载、多线程工作负载、多表联合查询工作负载。(4) The workload execution module is implemented in Java language, and converts the workload into a runnable program by coding. The workload execution module needs to be deployed in the JDK1.8 environment. This module contains a large number of workloads, which can be mainly divided into three categories: single-table addition, deletion, modification and query workloads, multi-threaded workloads, and multi-table joint query workloads.
(5)评测记录管理模块是用Java语言和vue前端框架实现的。该模块提供评测任务提交功能和评测记录查看功能。需要部署在JDK1.8和nodeJS的环境中。(5) The evaluation record management module is implemented in Java language and Vue front-end framework. This module provides evaluation task submission function and evaluation record viewing function. It needs to be deployed in the environment of JDK1.8 and nodeJS.
所述步骤(3)中,用Zookeeper和Kafka实现异步消息传输队列,该消息传输队列的生产者在评测开始前通过Java程序将多模数据集中的数据写入到Kafka中,评测开始后,工作负载执行模块作为异步消息传输队列的消费者从Kafka中读取数据,具体步骤为:In the step (3), an asynchronous message transmission queue is implemented with Zookeeper and Kafka. The producer of the message transmission queue writes the data in the multi-mode data set into Kafka through a Java program before the evaluation starts. After the evaluation starts, the work The load execution module reads data from Kafka as a consumer of the asynchronous message transmission queue. The specific steps are:
输入:多模数据集;Input: multimodal dataset;
输出:Kafka流数据;Output: Kafka stream data;
首先,输入阶段判断多模数据集文件下一行是否存在,如果存在就读取下一行并发送到Kafka中,如果下一行不存在即读取到文件末尾,则输入阶段结束。其次,在输出阶段,消费者连接Kafka并通过对应的topic消费输入阶段发送到Kafka中的数据,直到消费者主动关闭连接输出结束。First, the input stage determines whether the next line of the multi-mode data set file exists. If it exists, the next line is read and sent to Kafka. If the next line does not exist, it is read to the end of the file, and the input stage ends. Secondly, in the output stage, the consumer connects to Kafka and consumes the data sent to Kafka through the corresponding topic in the input stage, until the consumer actively closes the connection and the output ends.
所述步骤(4)中,用Java语言实现的工作负载执行模块,具体算法步骤如下:In the step (4), the workload execution module implemented by the Java language has the following specific algorithm steps:
输入:负载编号,需要评测的数据库编号;Input: load number, database number to be evaluated;
输出:执行时间、占用的CPU和内存;Output: execution time, CPU and memory occupied;
在消息队列获取到数据后,工作负载执行模块根据用户选择的负载编号和需要评测的数据库编号开始运行程序。首先系统会创建一条标记为待评测的记录,该记录创建时仅包含负载编号和数据库标号。系统按照记录提交的先后顺序执行工作负载,并将当前执行的记录标记为评测中。程序运行期间会保存每条记录的运行时间,同时调用由Prometheus和Grafana组成的资源监控模块获取CPU和内存占用情况。执行工作负载程序运行结束后,工作负载执行模块会将执行时间和资源占用情况保存到数据库中,并将当前记录标记为已评测。After the message queue obtains the data, the workload execution module starts to run the program according to the load number selected by the user and the database number to be evaluated. First, the system creates a record marked for evaluation, which contains only the load number and database label when it is created. The system executes the workloads in the order in which the records were submitted, and marks the currently executing records as under evaluation. During the running of the program, the running time of each record will be saved, and the resource monitoring module composed of Prometheus and Grafana will be called to obtain the CPU and memory usage. After the execution of the workload program is completed, the workload execution module saves the execution time and resource occupancy in the database, and marks the current record as evaluated.
所述步骤(5)中,评测记录管理模块为用户提供了易交互的Web界面,一共分为两个部分:In the step (5), the evaluation record management module provides users with an easy-to-interact Web interface, which is divided into two parts:
(a)评测任务提交部分,该部分将负载编号、数据库编号等参数以选项的形式呈现出来,供用户选择。同时对于每一个任务都有详细的描述信息。用户通过选择相应的参数并点击执行按钮,工作负载执行模块会创建一条待评测任务并保存在数据库中;(a) The evaluation task submission part, which presents parameters such as load number and database number in the form of options for users to choose. At the same time, there is detailed description information for each task. By selecting the corresponding parameters and clicking the execute button, the workload execution module will create a task to be evaluated and save it in the database;
(b)评测记录查看部分,该部分展示了所有的评测记录。用户可以根据评测状态、负载类型、数据库编号来筛选想要查看的评测记录。(b) Evaluation record viewing section, which displays all evaluation records. Users can filter the evaluation records they want to view according to the evaluation status, load type, and database number.
为了能够模拟真实的大数据应用场景,本系统设计了大量的负载类型,可以分为以下三类:单表增删改查工作负载、多线程工作负载和多表联合查询工作负载。单表增删改查工作负载用于模拟数据迁移、数据持久化的场景;多线程工作负载用于模拟高并发的应用场景;多表联合查询工作负载用于模拟具有复杂业务逻辑的场景。同时为了能够更客观地评测多模数据库处理多模数据的性能,评测的具体步骤为:评测开始前,为所有数据库搭建分布式主从集群,提高系统的可靠性和可用性。安装部署分布式资源监控系统Prometheus和Grafana监测服务器性能。通过Java实现Kafka生产者将数据集存储在Kafka中,不仅实现了生产者和消费者解耦,而且能够适配负载处理速度做到异步通信。评测开始时,用户通过系统提供的Web评测记录管理模块提交评测任务,工作负载执行模块接收到任务后创建新的评测任务并在评测结束后将评测结果更新到数据库中。评测结束后,用户可以通过系统提供的Web页面查看评测结果。In order to simulate real big data application scenarios, the system has designed a large number of load types, which can be divided into the following three categories: single-table addition, deletion, and modification workloads, multi-threaded workloads, and multi-table joint query workloads. Single-table addition, deletion, modification and query workloads are used to simulate scenarios of data migration and data persistence; multi-threaded workloads are used to simulate high-concurrency application scenarios; multi-table joint query workloads are used to simulate scenarios with complex business logic. At the same time, in order to more objectively evaluate the performance of multi-mode database processing multi-mode data, the specific steps of the evaluation are: before the evaluation starts, build a distributed master-slave cluster for all databases to improve the reliability and availability of the system. Install and deploy distributed resource monitoring systems Prometheus and Grafana to monitor server performance. Implementing Kafka producers in Java to store data sets in Kafka not only realizes the decoupling of producers and consumers, but also enables asynchronous communication by adapting to the load processing speed. When the evaluation begins, the user submits the evaluation task through the Web evaluation record management module provided by the system, and the workload execution module creates a new evaluation task after receiving the task, and updates the evaluation result to the database after the evaluation. After the evaluation, users can view the evaluation results through the Web page provided by the system.
本发明的有益效果为:根据多模数据的特性,提出了一种面向多模数据库的基准评测系统及其构建方法,根据系统提供的负载类型,用户可以模拟真实的大数据应用场景,并从执行时间和资源消耗两方面精准、公平、快速地评测多模数据库。从而为多模数据的管理提供可量化比较的方案。The beneficial effects of the present invention are as follows: according to the characteristics of multi-modal data, a benchmark evaluation system oriented to multi-modal database and its construction method are proposed. According to the load type provided by the system, users can simulate real big data application scenarios, and from Accurate, fair and fast evaluation of multimodal databases in terms of execution time and resource consumption. Thus, a quantifiable and comparable solution is provided for the management of multimodal data.
附图说明Description of drawings
图1为本发明实施例的体系结构示意图。FIG. 1 is a schematic structural diagram of an embodiment of the present invention.
具体实施方式Detailed ways
下面结合具体实施例,进一步阐明本发明,应理解这些实施例仅用于说明本发明而不用于限制本发明的范围,在阅读了本发明之后,本领域技术人员对本发明的各种等价形式的修改均落于本申请所附权利要求所限定的范围。Below in conjunction with specific embodiments, the present invention will be further illustrated, and it should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. The modifications all fall within the scope defined by the appended claims of this application.
如图1所示,一种面向多模数据库的基准评测系统,包括:分布式数据库模块、资源监控模块、消息传输模块、工作负载执行模块和评测记录管理模块。As shown in Figure 1, a benchmark evaluation system for multi-modal databases includes: a distributed database module, a resource monitoring module, a message transmission module, a workload execution module, and an evaluation record management module.
分布式数据库模块一共涉及2种多模数据库:ArangoDB和OrientDB。每种数据库都是以主从分布式集群的形式安装和部署在阿里云服务器上。分布式数据库模块是评测系统的基础也是评测系统的主体。The distributed database module involves a total of two multimodal databases: ArangoDB and OrientDB. Each database is installed and deployed on Alibaba Cloud servers in the form of master-slave distributed clusters. The distributed database module is the basis of the evaluation system and the main body of the evaluation system.
资源监控模块由分布式资源监控软件Prometheus和Grafana组成。用于监测评测系统执行负载期间的资源占用情况。为了对数据库的性能进行全面的评测,系统除了评测各数据库执行负载所需的时间,还评测各数据库执行负载期间所占用的CPU和内存情况。The resource monitoring module is composed of distributed resource monitoring software Prometheus and Grafana. It is used to monitor the resource usage during the execution load of the evaluation system. In order to comprehensively evaluate the performance of the database, the system not only evaluates the time required for each database to execute the load, but also evaluates the CPU and memory occupied by each database during the execution of the load.
消息传输模块由Zookeeper和Kafka组成。该消息传输队列不仅实现了系统解耦,而且能够适配负载处理速度做到异步通信。生产者在评测开始前将数据集中的数据生成并存储到Kafka中。消费者在评测开始后,根据topic消费队列中的数据。The message transmission module consists of Zookeeper and Kafka. The message transmission queue not only realizes the decoupling of the system, but also can adapt to the load processing speed to achieve asynchronous communication. The producer generates and stores the data in the dataset into Kafka before the evaluation starts. After the evaluation starts, consumers consume the data in the queue according to the topic.
工作负载执行模块是由Java语言实现的,依赖于JDK1.8版本。该模块模拟真实的大数据应用场景设计了大量的负载。可以分为三类:单表增删改查工作负载、多线程工作负载和多表联合查询工作负载。单表增删改查工作负载用于模拟数据迁移和持久化场景。多线程工作负载用于模拟多线程、高并发的大数据应用场景。多表联合查询工作负载用于模拟真实的复杂业务逻辑应用场景。The workload execution module is implemented by the Java language and depends on the JDK1.8 version. This module simulates real big data application scenarios and designs a large number of loads. It can be divided into three categories: single-table addition, deletion and modification workloads, multi-threaded workloads, and multi-table joint query workloads. The single-table CRUD workload is used to simulate data migration and persistence scenarios. Multi-threaded workloads are used to simulate multi-threaded, high-concurrency big data application scenarios. The multi-table federated query workload is used to simulate real complex business logic application scenarios.
评测记录管理模块是用Java语言和vue前端框架实现的。依赖于JDK1.8和nodeJS的基础环境。该模块提供评测任务提交功能和评测记录查看功能。在评测任务提交页面,用户可以选择工作负载以及需要评测的数据库并通过点击执行按钮将评测任务提交给后台。在评测记录查看页面,所有评测记录都将被展示,用户可以根据评测状态、负载类型、数据库编号筛选想要查看的评测记录。The evaluation record management module is implemented in Java language and Vue front-end framework. Depends on the basic environment of JDK1.8 and nodeJS. This module provides evaluation task submission function and evaluation record viewing function. On the evaluation task submission page, the user can select the workload and the database to be evaluated and submit the evaluation task to the background by clicking the Execute button. On the evaluation record viewing page, all evaluation records will be displayed, and users can filter the evaluation records they want to view according to the evaluation status, load type, and database number.
在评测开始之前,需要对各个模块做一系列的准备工作。在分布式数据库模块,需要测试各个数据库的连通性,保证数据库的可用性。同时将数据导入数据库中。在资源监控模块,需要检查Prometheus和Grafana是否正常工作,以及资源监控页面是否能准确监测到服务器的资源情况。在消息传输模块,需要检查Zookeeper和Kafka是否能正常运行,并测试生产者能否将数据存储到消息队列中以及消费者能够根据不同的topic从消息队列中获取数据。在工作负载执行模块,需要测试每一个负载是否能够正常运行以及负载运行后能否获取到执行时间和资源占用。在评测记录管理模块,需要测试评测任务是否能正确提交以及评测列表中的任务状态及信息是否正确。Before the evaluation starts, a series of preparations need to be done for each module. In the distributed database module, it is necessary to test the connectivity of each database to ensure the availability of the database. Simultaneously import the data into the database. In the resource monitoring module, you need to check whether Prometheus and Grafana are working properly, and whether the resource monitoring page can accurately monitor the server's resources. In the message transmission module, it is necessary to check whether Zookeeper and Kafka can run normally, and test whether the producer can store data in the message queue and whether the consumer can obtain data from the message queue according to different topics. In the workload execution module, it is necessary to test whether each load can run normally and whether the execution time and resource occupancy can be obtained after the load runs. In the evaluation record management module, it is necessary to test whether the evaluation tasks can be correctly submitted and whether the task status and information in the evaluation list are correct.
本发明还公开了一向多模数据库的基准评测系统的构建方法,包括如下步骤:The invention also discloses a method for constructing a benchmark evaluation system of a multi-modal database, comprising the following steps:
步骤1:在云服务器上下载安装需要评测的数据库,并部署为主从集群。由于不同的多模数据库安装部署和集群搭建的方式不同,以ArangoDB为例,说明多模数据库集群搭建过程如下:根据ArangoDB官网提示,安装对应版本的ArangoDB。Step 1: Download and install the database to be evaluated on the cloud server, and deploy it as a master-slave cluster. Since different multi-mode database installation and deployment and cluster building methods are different, taking ArangoDB as an example, the process of building a multi-mode database cluster is as follows: Install the corresponding version of ArangoDB according to the instructions on the ArangoDB official website.
(1)添加存储库密钥;(1) Add the repository key;
(2)使用apt-get命令安装ArangoDB。(2) Install ArangoDB using the apt-get command.
(3)搭建数据库集群:(3) Build a database cluster:
首先在作为主节点的服务器上启动ArangoDB。默认情况下,ArangoDB以集群cluster 方式启动。First start ArangoDB on the server that is the master node. By default, ArangoDB starts as a cluster.
接着启动剩下的两个从节点,三台虚拟机上的ArangoDB实例全部启动后,会在终端提示可以通过浏览器访问该多模数据库,则ArangoDB的集群搭建成功。Then start the remaining two slave nodes. After all the ArangoDB instances on the three virtual machines are started, the terminal will prompt that the multi-mode database can be accessed through the browser, and the ArangoDB cluster is successfully built.
步骤2:安装部署资源监控软件Prometheus和Grafana。Prometheus相当于是一个时间序列数据库,用于存储服务器资源使用情况。Grafana用于将Prometheus中的数据以图表的形式展示在页面中。具体安装过程为:Step 2: Install and deploy resource monitoring software Prometheus and Grafana. Prometheus is equivalent to a time series database for storing server resource usage. Grafana is used to display the data in Prometheus on the page in the form of graphs. The specific installation process is:
(1)Prometheus和Grafana安装在其中一台从服务器上;(1) Prometheus and Grafana are installed on one of the slave servers;
(2)在被监测的服务器上安装Prometheus的exporter;(2) Install the Prometheus exporter on the monitored server;
(3)将安装有exporter的服务器IP配置到Prometheus配置文件中;(3) Configure the server IP with the exporter installed into the Prometheus configuration file;
(4)在Grafana中将Prometheus添加为源数据;(4) Add Prometheus as source data in Grafana;
最后启动Prometheus和Grafana,在Grafana页面中通过编辑公式可以看到CPU、内存、带宽、吞吐量等资源使用情况。本系统主要监测CPU和内存的使用情况。其中CPU利用率的公式为:Finally, start Prometheus and Grafana. You can see the resource usage such as CPU, memory, bandwidth, and throughput by editing the formula on the Grafana page. This system mainly monitors the usage of CPU and memory. The formula for CPU utilization is:
((sum(increase(node_cpu_seconds_total{mode="idle"}[1m])) by(instance)) / (sum(increase(node_cpu_seconds_total[1m])) by(instance))))*100//用当前节点被占用的CPU除以当前节点CPU的总和得到CPU的利用率((sum(increase(node_cpu_seconds_total{mode="idle"}[1m])) by(instance)) / (sum(increase(node_cpu_seconds_total[1m])) by(instance))))*100//Use the current node The occupied CPU is divided by the sum of the current node CPU to get the CPU utilization
内存利用率的公式为:The formula for memory utilization is:
((node_memory_MemTotal_bytes -node_memory_Buffers_bytes -node_memory_Cached_bytes -node_memory_MemFree_bytes -node_memory_Slab_bytes) /node_memory_MemTotal_bytes)*100//用当前节点被占用的内存除以当前节点内存的总和得到内存的利用率((node_memory_MemTotal_bytes -node_memory_Buffers_bytes -node_memory_Cached_bytes -node_memory_MemFree_bytes -node_memory_Slab_bytes) /node_memory_MemTotal_bytes)*100// Divide the memory occupied by the current node by the sum of the memory of the current node to get the memory utilization
步骤3:安装部署Zookeeper和Kafka。在Zookeeper和Kafka组成的消息队列中,Zookeeper相当于一个注册中心,Kafka相当于一个流数据处理平台。具体安装过程如下:Step 3: Install and deploy Zookeeper and Kafka. In the message queue composed of Zookeeper and Kafka, Zookeeper is equivalent to a registry, and Kafka is equivalent to a stream data processing platform. The specific installation process is as follows:
(1)在三台云服务器中下载并解压Zookeeper和Kafka;(1) Download and decompress Zookeeper and Kafka in the three cloud servers;
(2)在Zookeeper的配置文件中添加三台服务器的IP和端口信息:(2) Add the IP and port information of the three servers to the Zookeeper configuration file:
server.1=172.16.150.154:2888:3888server.1=172.16.150.154:2888:3888
server.2=172.16.150.155:2888:3888server.2=172.16.150.155:2888:3888
server.3=172.16.150.156:2888:3888server.3=172.16.150.156:2888:3888
(3)修改Kafka配置文件server.properties中的Zookeeper日志目录和端口信息:(3) Modify the Zookeeper log directory and port information in the Kafka configuration file server.properties:
log.dirs=/opt/kafka/data/kafka-logslog.dirs=/opt/kafka/data/kafka-logs
zookeeper.connect=localhost:2181zookeeper.connect=localhost:2181
(4)启动Zookeeper和Kafka后,在控制台输入jps命令验证异步消息队列是否成功安装;(4) After starting Zookeeper and Kafka, enter the jps command in the console to verify whether the asynchronous message queue is successfully installed;
用Zookeeper和Kafka实现异步消息传输队列,该消息传输队列的生产者在评测开始前通过Java程序将多模数据集(本实施例的多模数据集为UniBench数据集)中的数据写入到Kafka中,评测开始后,工作负载执行模块作为异步消息传输队列的消费者从Kafka中读取数据,具体步骤为:An asynchronous message transmission queue is implemented with Zookeeper and Kafka. The producer of the message transmission queue writes the data in the multi-modal data set (the multi-modal data set in this embodiment is the UniBench data set) to Kafka through a Java program before the evaluation starts. , after the evaluation starts, the workload execution module reads data from Kafka as a consumer of the asynchronous message transmission queue. The specific steps are:
输入:UniBench数据集;Input: UniBench dataset;
输出:Kafka流数据;Output: Kafka stream data;
首先,输入阶段判断UniBench数据集文件下一行是否存在,如果存在就读取下一行并发送到Kafka中,如果下一行不存在即读取到文件末尾,则输入阶段结束。其次,在输出阶段,消费者连接Kafka并通过对应的topic消费输入阶段发送到Kafka中的数据,直到消费者主动关闭连接输出结束。First, the input stage determines whether the next line of the UniBench dataset file exists. If it exists, the next line is read and sent to Kafka. If the next line does not exist, it is read to the end of the file, and the input stage ends. Secondly, in the output stage, the consumer connects to Kafka and consumes the data sent to Kafka through the corresponding topic in the input stage, until the consumer actively closes the connection and the output ends.
步骤4:安装部署工作负载执行模块。工作负载执行模块的实现是通过编写Java代码将工作负载转换为可运行的程序。具体安装部署过程如下:Step 4: Install and deploy the workload execution module. The implementation of the workload execution module is to convert the workload into a runnable program by writing Java code. The specific installation and deployment process is as follows:
(1)安装Java语言的依赖环境JDK1.8;(1) Install the Java language dependency environment JDK1.8;
(2)将Java程序打包并上传到服务器;(2) Package and upload the Java program to the server;
(3)启动Java程序包;(3) Start the Java package;
用Java语言实现的工作负载执行模块,具体算法步骤如下:The workload execution module implemented in Java language, the specific algorithm steps are as follows:
输入:负载编号,需要评测的数据库编号;Input: load number, database number to be evaluated;
输出:执行时间、占用的CPU和内存;Output: execution time, CPU and memory occupied;
在消息队列获取到数据后,工作负载执行模块根据用户选择的负载编号和需要评测的数据库编号开始运行程序。首先系统会创建一条标记为待评测的记录,该记录创建时仅包含负载编号和数据库标号。系统按照记录提交的先后顺序执行工作负载,并将当前执行的记录标记为评测中。程序运行期间会保存每条记录的运行时间,同时调用由Prometheus和Grafana组成的资源监控模块获取CPU和内存占用情况。执行工作负载程序运行结束后,工作负载执行模块会将执行时间和资源占用情况保存到数据库中,并将当前记录标记为已评测。After the message queue obtains the data, the workload execution module starts to run the program according to the load number selected by the user and the database number to be evaluated. First, the system creates a record marked for evaluation, which contains only the load number and database label when it is created. The system executes the workloads in the order in which the records were submitted, and marks the currently executing records as under evaluation. During the running of the program, the running time of each record will be saved, and the resource monitoring module composed of Prometheus and Grafana will be called to obtain the CPU and memory usage. After the execution of the workload program is completed, the workload execution module saves the execution time and resource occupancy in the database, and marks the current record as evaluated.
步骤5:安装部署评测记录管理模块。评测记录管理模块是用Java语言和vue前端框架实现的。集体安装部署过程如下:Step 5: Install and deploy the evaluation record management module. The evaluation record management module is implemented in Java language and Vue front-end framework. The collective installation and deployment process is as follows:
(1)安装Java语言的依赖环境JDK1.8;(1) Install the Java language dependency environment JDK1.8;
(2)安装nodeJS最新版本;(2) Install the latest version of nodeJS;
(3)将工作负载执行模块和评测记录管理模块分别打包并上传到服务器;(3) Package the workload execution module and the evaluation record management module respectively and upload them to the server;
(4)启动前后端程序。(4) Start the front-end and back-end programs.
评测记录管理模块为用户提供了易交互的Web界面,一共分为两个部分:The evaluation record management module provides users with an easy-to-interact web interface, which is divided into two parts:
(a)评测任务提交部分,该部分将负载编号、数据库编号等参数以选项的形式呈现出来,供用户选择。同时对于每一个任务都有详细的描述信息。用户通过选择相应的参数并点击执行按钮,工作负载执行模块会创建一条待评测任务并保存在数据库中;(a) The evaluation task submission part, which presents parameters such as load number and database number in the form of options for users to choose. At the same time, there is detailed description information for each task. By selecting the corresponding parameters and clicking the execute button, the workload execution module will create a task to be evaluated and save it in the database;
(b)评测记录查看部分,该部分展示了所有的评测记录。用户可以根据评测状态、负载类型、数据库编号来筛选想要查看的评测记录。(b) Evaluation record viewing section, which displays all evaluation records. Users can filter the evaluation records they want to view according to the evaluation status, load type, and database number.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210365988.6A CN114676198A (en) | 2022-04-08 | 2022-04-08 | Benchmark evaluation system for multimode database and construction method thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210365988.6A CN114676198A (en) | 2022-04-08 | 2022-04-08 | Benchmark evaluation system for multimode database and construction method thereof |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN114676198A true CN114676198A (en) | 2022-06-28 |
Family
ID=82078928
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210365988.6A Pending CN114676198A (en) | 2022-04-08 | 2022-04-08 | Benchmark evaluation system for multimode database and construction method thereof |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114676198A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115794660A (en) * | 2023-02-06 | 2023-03-14 | 青软创新科技集团股份有限公司 | Control method, device and system based on distributed program evaluation |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108920283A (en) * | 2018-08-06 | 2018-11-30 | 成都知道创宇信息技术有限公司 | Server guard method based on Prometheus performance monitoring system |
| CN112948228A (en) * | 2021-03-15 | 2021-06-11 | 河海大学 | Multi-mode database evaluation benchmark system facing streaming data and construction method thereof |
-
2022
- 2022-04-08 CN CN202210365988.6A patent/CN114676198A/en active Pending
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108920283A (en) * | 2018-08-06 | 2018-11-30 | 成都知道创宇信息技术有限公司 | Server guard method based on Prometheus performance monitoring system |
| CN112948228A (en) * | 2021-03-15 | 2021-06-11 | 河海大学 | Multi-mode database evaluation benchmark system facing streaming data and construction method thereof |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115794660A (en) * | 2023-02-06 | 2023-03-14 | 青软创新科技集团股份有限公司 | Control method, device and system based on distributed program evaluation |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Marzullo et al. | Tools for distributed application management | |
| Sigelman et al. | Dapper, a large-scale distributed systems tracing infrastructure | |
| US8196047B2 (en) | Flexible visualization for services | |
| US7548911B2 (en) | Diagnosing problems in distributed systems | |
| US8832662B2 (en) | Rules engine for architectural governance | |
| US10116534B2 (en) | Systems and methods for WebSphere MQ performance metrics analysis | |
| US20070150599A1 (en) | Generation of resource-usage profiles for application sessions of a number of client computing devices | |
| CN104954453A (en) | Data mining REST service platform based on cloud computing | |
| US8904357B2 (en) | Dashboard for architectural governance | |
| US20070112549A1 (en) | Method and apparatus for a database workload simulator | |
| US11537576B2 (en) | Assisted problem identification in a computing system | |
| CN113886111B (en) | Workflow-based data analysis model calculation engine system and operation method | |
| EP4231149B1 (en) | Distributing and processing streams over one or more networks for on-the-fly schema evolution | |
| Li et al. | Challenges and experiences in building an efficient apache beam runner for IBM streams | |
| CN103248511B (en) | A kind of analysis methods, devices and systems of single-point service feature | |
| CN114676198A (en) | Benchmark evaluation system for multimode database and construction method thereof | |
| Ostermann et al. | Workflow monitoring and analysis tool for ASKALON | |
| CN117409809A (en) | Voice data analysis method and device, storage medium and electronic equipment | |
| Rover et al. | Software tools for complex distributed systems: Toward integrated tool environments | |
| Kukreti et al. | CloneHadoop: Process Cloning to Reduce Hadoop's Long Tail | |
| Felius | Assessing the performance of distributed PostgreSQL | |
| Klein et al. | Quality attribute-guided evaluation of NoSQL databases: an experience report | |
| CN120029887B (en) | Application program instrumentation method, system, electronic device, storage medium, and computer program product | |
| Chen et al. | Forming spn-MapReduce model for estimation job execution time in cloud computing | |
| Dam | SQL Server query performance tuning distilled |
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 |