WO2019196595A1 - 管理应用程序的方法与装置 - Google Patents

管理应用程序的方法与装置 Download PDF

Info

Publication number
WO2019196595A1
WO2019196595A1 PCT/CN2019/078399 CN2019078399W WO2019196595A1 WO 2019196595 A1 WO2019196595 A1 WO 2019196595A1 CN 2019078399 W CN2019078399 W CN 2019078399W WO 2019196595 A1 WO2019196595 A1 WO 2019196595A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
database
database node
node
time period
Prior art date
Application number
PCT/CN2019/078399
Other languages
English (en)
French (fr)
Inventor
毛敏华
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP19786078.6A priority Critical patent/EP3761175B1/en
Publication of WO2019196595A1 publication Critical patent/WO2019196595A1/zh
Priority to US17/034,740 priority patent/US11507427B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5027Allocation 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/5033Allocation 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 data affinity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5027Allocation 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/5038Allocation 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 execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/278Data partitioning, e.g. horizontal or vertical partitioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/48Program initiating; Program switching, e.g. by interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • G06F9/4862Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration the task being a mobile agent, i.e. specifically designed to migrate
    • G06F9/4875Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration the task being a mobile agent, i.e. specifically designed to migrate with migration policy, e.g. auction, contract negotiation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • G06F9/5022Mechanisms to release resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5027Allocation 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/5044Allocation 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 hardware capabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5027Allocation 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/505Allocation 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5061Partitioning or combining of resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/501Performance criteria

Definitions

  • the present application relates to the field of database clustering and, more particularly, to a method and apparatus for managing applications.
  • the present application provides a method and apparatus for managing an application, which can dynamically adjust a database node running an application to avoid an overload of the database node.
  • a method for managing an application characterized in that it is executed in a database cluster system comprising at least two database nodes, each database node storing at least one database object, the method comprising: a first time period, running an application on the first database node; determining a target database node according to the at least one historical database object accessed by the application in the first time period, wherein the target database node stores the history a database object; the application is run on the target database node during a second time period.
  • the method for managing an application in the embodiment of the present application may determine a target database node based on a historical database object accessed by the application, so that the application running on the first database node migrates to the target database node to run.
  • the relationship between the application and the running database node is dynamic, and can be adjusted according to the load of the database cluster system, the database node where the database object is located, and the like.
  • the running the application on the first database node in the first time period comprises: running the first application on the first database node in the first time period A module, the application being any one of the first application modules.
  • Application modules are a categorization of a class of applications. Running the same type of application on the same database node can reduce the data communication between the database clusters and avoid the performance degradation of the database cluster system due to the increase of the inter-cluster traffic, which leads to the decline of application performance.
  • the first application is determined from the first application module; the at least one historical database object accessed during the first time period according to the application Determining the target database node, comprising: calculating a data amount ratio of the at least one second database node, obtaining at least one value, wherein the second database node includes the target database node, and the data volume ratio is the first
  • the application accesses a ratio of the amount of data of the historical database object on the second database node to the total amount of access during the first time period, the total access amount being that the first application accesses during the first time period a total amount of data; determining a maximum value of the at least one value, the database node corresponding to the maximum value is the target database node; and in the second time period, running the application on the target database node
  • the method includes: running the first application on the target database node in a second time period.
  • Determining a first application from the first application module and migrating the first application from the first database node to the target database node may reduce the load of the first database node.
  • the maximum value means that the first application accesses the database object in the database node the most, and the first application is migrated to the database node, which can reduce data communication between the database clusters.
  • the running the application on the target database node during the second time period comprises: utilizing a central processing unit CPU of the target database node When the rate is less than the first threshold, the application is run on the target database node during the second time period.
  • the CPU utilization of the target database node is also determined before the application is migrated to the target database node.
  • the application is migrated to run on the target database node when the CPU utilization of the target database node is less than a certain threshold.
  • the method further includes: collecting operation information of the database cluster system in real time, where the operation information of the database cluster system includes load information of the database cluster system And information about the communication performance of the database cluster system; determining, according to the operation information of the database cluster system, whether the application runs on the target database node in the second time period.
  • Adjusting the running node of the application may affect the communication performance of the database cluster system, so the running information of the database cluster system is collected in real time, and the running information includes the load information and communication performance information of the database cluster system.
  • the application is migrated to the target database node when the run information meets certain conditions.
  • the database nodes running the application can be dynamically adjusted, and the communication performance of the database cluster system can be guaranteed.
  • the determining whether the application is to run on the target database node during a second time period comprises: when communication performance of the database cluster system is met Determining, in the first condition, that the application runs on the target database node in a second time period; or, when the CPU utilization of the first database node exceeds a second threshold, determining that the application is in the first The second period of time runs on the target database node.
  • the application can be migrated.
  • the CPU utilization of the first database node exceeds a certain threshold, in order to reduce the load of the first database node, the application on the first database node is migrated to run on other database nodes.
  • the at least one historical database object is stored on the at least one second database node, and wherein the first time period is according to the application Determining at least one historical database object, determining the target database node, comprising: determining, according to a preset mapping relationship, the target database node from the at least one second database node, the mapping relationship being the application and the capable Running a relationship between database nodes of the application; and/or determining, based on the second application module, the target database node from the at least one second database node, the application in the second application module Running on the target database node, the application is the same type of application as the application in the second application module.
  • a plurality of database nodes are determined by the historical database object, and the method for determining the target database node from the plurality of database nodes is many, which may be determined according to a preset mapping relationship, that is, determining from a plurality of database nodes The database node where the application is running. Alternatively, you can set the application on a database node running a similar application.
  • the operational information of the application is periodically detected, the operational information of the application including database node information accessed by the application.
  • the database node running the application can be dynamically adjusted according to the running status of the application and the database node information to ensure the overall communication performance of the database cluster system.
  • an apparatus for managing an application comprising means for performing the steps of the method of managing an application in the first aspect and any of the possible implementations of the first aspect.
  • a device for managing an application which may be a device for managing an application in the above method design, or a chip configured in a device for managing an application.
  • the device includes a processor, a memory, a communication interface, and a bus.
  • the processor, the memory, and the communication interface communicate through a bus, and may also implement communication by other means such as wireless transmission.
  • the memory is for storing instructions for executing instructions stored by the memory.
  • the memory stores the program code, and the processor can invoke the program code stored in the memory to perform the method of managing the application in the first aspect and any of the possible implementations of the first aspect.
  • a chip system comprising a processor, the means for managing an application implementing the functions involved in the above aspects, for example, operating, collecting, determining, or processing the methods involved in the above method Data and / or information.
  • the chip system further includes a memory for holding program instructions and data necessary for the device managing the application.
  • the program instructions saved by the memory include instructions for executing the method of managing an application in the first aspect and any of the possible implementations of the first aspect.
  • the chip system may be composed of a chip, and may also include a chip and other discrete devices.
  • a computer program product comprising: computer program code, when the computer program code is run on a computer, causing the computer to perform any of the first aspect and the first aspect described above A way to manage an application in a possible implementation.
  • a computer readable medium storing program code for executing an apparatus of a management application, the program code comprising for performing the first aspect and any of the first aspects An instruction to implement a method of managing an application.
  • the present application may further combine to provide more implementations.
  • FIG. 1 is a schematic diagram of a system of a method for managing an application applicable to an embodiment of the present application
  • FIG. 2 is a schematic diagram of implementing an application partition according to an application module
  • FIG. 3 is a schematic flowchart of a method for managing an application provided by an embodiment of the present application
  • FIG. 4 is a schematic logic diagram of a method for managing an application in an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an apparatus for managing an application provided by an embodiment of the present application.
  • FIG. 6 is another schematic diagram of an apparatus for managing an application provided by an embodiment of the present application.
  • the method and apparatus for managing an application can be applied to a computer, which includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer.
  • the hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also referred to as main memory).
  • the operating system may be any one or more computer operating systems that implement business processing through a process, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system.
  • the application layer includes applications such as browsers, contacts, word processing software, and instant messaging software.
  • the computer may be a handheld device such as a smart phone, or may be a terminal device such as a personal computer.
  • the present application is not particularly limited as long as the management application recorded by the embodiment of the present application can be recorded.
  • the program of the code of the method may be managed by the method of managing the application according to the embodiment of the present application.
  • the execution body of the method for managing an application of the embodiment of the present application may be a computer device or a functional module of the computer device capable of calling a program and executing the program.
  • the term "article of manufacture” as used in this application encompasses a computer program accessible from any computer-readable device, carrier, or media.
  • the computer readable medium may include, but is not limited to, a magnetic storage device (eg, a hard disk, a floppy disk, or a magnetic tape, etc.), such as a compact disc (CD), a digital versatile disc (Digital Versatile Disc, DVD). Etc.), smart cards and flash memory devices (eg, Erasable Programmable Read-Only Memory (EPROM), cards, sticks or key drivers, etc.).
  • various storage media described herein can represent one or more devices and/or other machine-readable media for storing information.
  • the term "machine readable medium” may include, but is not limited to, a wireless channel and various other mediums capable of storing, containing, and/or carrying instructions and/or data.
  • the database cluster system 100 is applicable to the database cluster system of the embodiment of the present application.
  • the database cluster system 100 may include: a database and a client.
  • the database can also be understood as a database node; the client can also be understood as an application or an application module.
  • Database Cluster uses at least two or more database servers to form a virtual single database logical image that provides transparent data services to clients like a single database system.
  • the database cluster system is the core of an information system, so in addition to the business logic, users are concerned about system performance. Performance issues relate to hardware, software, networking, application design architecture, code quality, and more. If the database cluster can provide load balancing and automatic optimization, it will bring great benefits to the overall system performance.
  • RAC Real Application Cluster
  • a service is a group or type of application that consists of business components that correspond to the application's load.
  • Services in RAC implement continuous, uninterrupted database operations and support multiple services in multiple instances. Assign a service to one or more instances and run on an alternate instance that can be used as a backup instance. If the primary instance fails, Oracle will move the service from the failed instance to the alternate instance that is still running. Oracle also automatically performs connection load balancing between instances running services.
  • RAC works with multiple low-cost computers as a large computer for database processing and can be used in a variety of applications.
  • application partitioning is generally required. The main purpose is to enable applications accessing the same or the same type of data to run on the same database node, reducing the database cluster. Data communication between.
  • each application module includes one or more applications.
  • the program of the order module runs on the database node 1
  • the program of the finance module runs on the database node 2
  • the program of the manufacturing module runs on the database node 3
  • the program of the other modules runs on the database node 4.
  • Programs of different application modules run on different database nodes, and programs of the same module run on the same database node to implement application partitioning. This method is divided according to the application module, the granularity is relatively coarse, and the load of different application modules may be different, so it is easy to cause load imbalance.
  • the partition is applied according to the application module, the program of the application module cannot be split to perform inter-node provisioning.
  • the present application provides a method for managing an application, which aims to dynamically adjust a database node running by an application, thereby avoiding the problem of imbalance of database node load.
  • the Dynamic Application Partition Method is a set of framework and algorithm for collecting information proposed in the embodiment of the present application.
  • the DAPM determines which database node the application runs on based on the collected application information, system load information when the application is running, and so on.
  • the definition of the application DAPM type is shown in Table 2.
  • Table 3 The values in Table 3 are used to represent the mapping relationship between the application and the database nodes.
  • 200 2 7 +2 6 +2 3 , indicating that the application can run on 4 nodes, 7 nodes, and 8 nodes.
  • 255 2 7 +2 6 +2 5 +2 4 +2 3 +2 2 +2 1 +2 0 , indicating that the application can run on 1 node, 2 nodes, 3 nodes, 4 nodes, 5 nodes , 6 nodes, 7 nodes, 8 nodes.
  • 3 2 1 +2 0 , indicating that the application can run on 1 node and 2 nodes.
  • mapping relationship and the indicated information are merely exemplary descriptions, and in the case where the function of mapping relationship (ie, which database node is used to indicate the application running) can be implemented, the mapping relationship may be The specific form and the indicated information are arbitrarily changed. The embodiments of the present application are not limited thereto.
  • Programs can only run on one node and cannot be migrated to other database nodes 1 Programs can only run on one database node, but can be migrated to other nodes 2 Considering load balancing factors, the program can run at up to 2 database nodes. 3 Considering load balancing factors, programs can run up to 3 database nodes. 4 Considering load balancing factors, programs can run up to 4 database nodes. 5 Considering load balancing factors, programs can run up to 5 database nodes. 6 Considering load balancing factors, programs can run up to 6 database nodes. 7 Considering load balancing factors, programs can run up to 7 database nodes. 8 Considering load balancing factors, programs can run up to 8 database nodes.
  • the CPU threshold that is, the threshold of CPU utilization.
  • CPU utilization that is, CPU resources occupied by running programs.
  • CPU utilization represents the condition of the machine running the program at a certain point in time. The higher the CPU utilization, the more the machine is running at this time, and vice versa.
  • the determination of the CPU threshold may be preset according to experience, or may be specifically set according to the respective application, and is not limited herein.
  • the CPU threshold can be 90%, that is, when the CPU utilization of a database node exceeds 90%, it indicates that the load of the database node is too high.
  • the cluster communication performance index that is, the indicator that the cluster communication performance meets.
  • the running node of an application it affects the communication performance of the database system cluster. Therefore, when adjusting the running node of the application, it is necessary to ensure that the performance of the cluster communication is maintained at a certain level. For example, cluster communication consumes no more than 10% of the system's total time.
  • an “application” may refer to a computer program that performs certain tasks or multiple specific tasks. It runs in a user mode and can interact with a user and has a visual user interface.
  • application and “program” are often used interchangeably and will be understood by those skilled in the art.
  • adjusting an application refers to migrating an application running on one database node to another database node, and those skilled in the art understand the meaning thereof.
  • database node and “node” may sometimes be mixed, and it should be noted that the meaning to be expressed is consistent when the difference is not emphasized.
  • Access objects and “access database objects” can sometimes be mixed. It should be noted that the meanings to be expressed are consistent when the distinction is not emphasized.
  • the first, second, third, etc. are only for facilitating the distinction between different objects, for example, distinguishing different database nodes, distinguishing different applications, etc., and should not constitute any limitation to the present application. .
  • “and/or” describes the association relationship of the associated objects, indicating that there may be three relationships, for example, A and/or B, which may indicate that A exists separately, A and B exist simultaneously, and B exists separately. These three situations.
  • the character "/” generally indicates that the contextual object is an "or” relationship.
  • At least one means one or more; “at least one of A and B", similar to "A and/or B", describing the association of associated objects, indicating that there may be three relationships, for example, A and B. At least one of them may indicate that A exists separately, and A and B exist simultaneously, and B cases exist separately.
  • FIG. 3 is an application (hereinafter, referred to as application #A for ease of understanding and explanation) is adjusted from the first database node (hereinafter, referred to as node #1 for ease of understanding and explanation) to the target database node (below) For ease of understanding and explanation, record as node #2).
  • application #A for ease of understanding and explanation
  • node #1 for ease of understanding and explanation
  • node #2 record as node #2
  • FIG. 3 is a schematic diagram of a method 100 of managing an application according to an embodiment of the present application.
  • the method 100 is performed in a database cluster system that includes at least two database nodes, such as a method that can be used with the database cluster system 100.
  • the method 100 includes steps 110-130, each of which is described in detail below.
  • One or more applications can be run on node #1, and the multiple applications can belong to the same application module or belong to different application modules. This embodiment of the present application does not limit this.
  • the method before the application #A is run on the node #1 in the first time period, the method includes: determining, according to the preset mapping relationship, the node #1, where the mapping relationship is the application #A and the node #1 Relationship between; or, according to the history database object accessed by the application #A, determine the node #1; or, according to the application module #A (ie, an example of the second application module), determine the node #1, the application module #A
  • the application in the application runs on node #1, and the application in application #A and application module #A is the same type of application.
  • determining node #1 is specifically described below. In the embodiment of the present application, there are many ways to determine the node #1, and at least include the following three.
  • Node #1 is determined according to a preset mapping relationship.
  • the node that can run the application #A is determined. Specifically, it is assumed that the application #A can operate on 4 nodes, 7 nodes, and 8 nodes according to the mapping relationship.
  • a possible implementation manner is: selecting a node with a low load from the 4 nodes, 7 nodes, and 8 nodes as node #1 according to the specific conditions of the 4 nodes, 7 nodes, and 8 nodes (for example, load conditions), Run application #A.
  • Another possible implementation is to determine node #1 according to the category of the application running on the 4-node, 7-node, and 8-node. That is, a node running the same category as the application #A is selected as the node #1.
  • At least one database object is stored in each database node.
  • Database objects have tables, indexes, views, charts, defaults, rules, triggers, users, functions, and more.
  • the tables in the database are similar to the ones we use in our daily lives. It is also composed of rows and columns. Columns consist of information of the same type, each column is also called a field, and the title of each column is called the field name. The row includes several columns of information items. A row of data is called a record or a record that expresses a meaningful combination of information.
  • a database table consists of one or more records, and a table without records is called an empty table. There is usually a primary key in each table that uniquely identifies a record.
  • the index is based on the order in which the specified database table columns are established. It provides a quick way to access data and supervises the data of the table so that the data in the column it points to is not duplicated. Such as clustering index.
  • program information collection and analysis are performed.
  • the main code of the application is collected regularly, as well as the database objects that are primarily accessed. Collect and quantify the proportion of these codes and access objects. Determine which database node the application is running on based on the percentage. For example, in a historical access, which database node is the primary node of the database object most frequently accessed by application #A, the database node is determined to be node #1.
  • the node #1 is determined.
  • Application module #A includes multiple applications that run on one database node. If the application #A also belongs to the application module #A, that is, the application #A and the application in the application module #A are the same type of application, the database node is determined as the node #1. By running the same type of application on the same database node, data communication between database clusters can be reduced, and the performance of the database cluster system can be degraded due to the increase of inter-cluster traffic, resulting in a decline in application performance.
  • the running information of the application is periodically detected, and the running information of the application includes database node information accessed by the application.
  • the database node running the application can be dynamically adjusted according to the running status of the application and the database node information to ensure the overall communication performance of the database cluster system.
  • At least one database object is stored on each database node.
  • An application accesses a database object, that is, accesses a database node that includes these database objects.
  • FIG. 4 shows a schematic logic diagram of a method of managing an application suitable for an embodiment of the present application.
  • Figure 4 includes: 410, program information collection analysis. Collect information about the running of the program, and analyze the program access object information, that is, the database object that the program mainly accesses. Collect and quantify the proportion of these codes and access objects.
  • Table 4 shows a specific example. Taking application #A as HWPROGA as an example, the access object of HWPROGA (that is, the accessed database object) is: TAB1, IDX1, TAB2, IDX2, TAB3, IDX3.
  • the percentage of access data represents the percentage of data accessed by these database objects during the entire HWPROGA run.
  • Figure 4 also includes 420, system operational information analysis.
  • the running information of the database cluster system is collected in real time, and the running information of the database cluster system includes load information of the database cluster system and communication performance information of the database cluster system; and running according to the database cluster system.
  • Information determine if application #A is running on node #2 during the second time period.
  • Adjusting the running node of the application may affect the communication performance of the database cluster system, so it is necessary to collect the running information of the database cluster system in real time.
  • the application is migrated to the target database node when the run information meets certain conditions.
  • the database nodes running the application can be dynamically adjusted, and the communication performance of the database cluster system can be guaranteed.
  • the running information of the database cluster system includes system load, system cluster communication performance status, and primary node information of the database object.
  • the specific introduction is shown in Table 5.
  • HWPROGA TAB1 Program name Access object Access data volume HWPROGA TAB1 21.64% HWPROGA IDX1 12.5% HWPROGA TAB2 30.05% HWPROGA IDX2 12.01% HWPROGA TAB3 16.98% HWPROGA IDX3 6.188%
  • Database object name Primary node TAB1 2 IDX1 2 TAB2 3 IDX2 3 TAB3 2 IDX3 2
  • Node #2 can be determined by collecting the database objects accessed by application #A and determining the database nodes where these access objects are located.
  • Table 4 lists the access objects of the application HWPROGA, and Table 6 shows the master node information of these access objects.
  • the nodes accessed by HWPROGA have 2 nodes and 3 nodes.
  • Figure 4 also includes: 430, Program Run Node Settings. That is, according to 410 and 420, the information of the node #2 is analyzed and thus dynamically set. Alternatively, it is also possible to make a setting suggestion according to the program, and then set it as needed after manual judgment.
  • determining, according to at least one historical database object accessed by the application #A in the first time period, the node #2 comprising: calculating a data amount ratio of the at least one second database node, to obtain at least one value, wherein The at least one historical database object is stored on the at least one second database node, the data amount ratio is that the application #A accesses the historical database object on the second database node during the first time period
  • the ratio of the amount of data to the total amount of access, the total amount of access is the total amount of data accessed by the application #A during the first time period; determining the maximum value of the at least one value, the database node corresponding to the maximum value For node #2; in the second time period, running application #A on node #2 includes: running application #A on node #2 during the second time period.
  • the maximum value means that application #A accesses the most database objects in the database node, and the application #A is migrated to the database node, which can reduce data communication between the database clusters.
  • Table 6 and Table 4 can determine the data volume ratio of each database node, as shown in Table 7.
  • the scores of the respective nodes i.e., an example of the data amount ratio of the database nodes.
  • the maximum amount of data amount corresponds to 2 nodes, so for the application HWPROGA, its target database node (ie, node #2) can be determined to be 2 nodes.
  • the at least one historical database object is stored on the at least one second database node, and the target database node is determined according to the at least one historical database object accessed by the application in the first time period
  • the method includes: determining, according to a preset mapping relationship, the target database node from the at least one second database node, where the mapping relationship is a relationship between the application and a database node capable of running the application And/or determining the target database node from the at least one second database node according to the second application module, the application in the second application module running on the target database node, the application
  • the program is the same type of application as the application in the second application module.
  • the node accessed by HWPROGA has 2 nodes and 3 nodes.
  • the target database node is determined according to the mapping relationship between HWPROGA and the database node capable of running the HWPROGA. For example, suppose that it is determined according to the mapping relationship that the database node capable of running HWPROGA includes 3 nodes, excluding 2 nodes, and then 3 nodes are determined as target database nodes.
  • Another possible implementation manner is: select the database node with the highest score (2 nodes) and the second highest score (3 nodes) from Table 7. Assuming that the database node capable of running HWPROGA includes 3 nodes according to the mapping relationship, and does not include 2 nodes, it is determined that the 3 nodes are target database nodes.
  • another possible implementation manner is: assuming that the application running on the same application module as HWPROGA is running on the 3 nodes, the 3 nodes are determined as the target database node regardless of whether the 3 nodes are the highest score.
  • the database node capable of running HWPROGA includes 3 nodes, excluding 2 nodes, but the scores of the 2 nodes are the highest, and the scores of the 3 nodes are very low, so it is determined that the 2 nodes with high scores are the target database nodes.
  • the program scheduler is also included in Figure 4, which can schedule the program to run.
  • the partition setting by application module is generally statically fixed, usually configured in the system setting layer (for example, by configuring different managers), and cannot be dynamically adjusted according to changes in program operation. Modifying the configuration generally affects system availability and is not flexible enough.
  • the program scheduler in the embodiment of the present application can flexibly schedule a program and adjust a database node in which the application runs.
  • the application #A is migrated to run on node #2, and certain conditions need to be met.
  • the next step is to introduce.
  • determining whether the application #A is running on the node #2 in the second time period comprises: determining that the application #A is in the second time period when the communication performance of the database cluster system satisfies the first condition Running on node #2; or, when the CPU utilization of node #1 exceeds the second threshold, it is determined that application #A is running on node #2 during the second time period.
  • the application #A runs on the node #2 in the second period, and includes at least the following three cases.
  • the communication performance of the database cluster system satisfies the first condition.
  • the first condition may be that the cluster communication time exceeds 10% of the total consumption time of the system.
  • the first condition is met, that is, when the cluster communication time exceeds 10% of the system's total consumption time, the application partition is adjusted to reduce the cluster communication time. That is, the application #A running on node #1 is migrated to run on node #2.
  • the CPU utilization of node #1 exceeds the second threshold.
  • the second threshold may be preset according to experience, or may be specifically configured according to the respective application, and is not limited herein.
  • the second threshold can be 90%.
  • running the application on the node #1 in the first time period including: running, in the first time period, the first application module on the node #1, where the application #A is any one of the first application modules An application.
  • the first application is optionally determined from the first application module.
  • the first application may be: the primary node of the primary accessed database object is not the application of node #1.
  • the first application may be an application that consumes the most system resources. or.
  • the first application can also be any one of the applications.
  • the primary node where application #A is located and the database node where application #A is running are not the same node.
  • the primary node where the database object accessed by the application #A is located is the node #1, and the application #A is running on the node #1, the running node of the application #A is not changed, that is, Application #A is still running on node #1.
  • running the application #A on the node #2 includes: when the CPU usage of the node #2 is less than the first threshold, in the second period, at the node #2 Run application #A on it.
  • the first threshold may be pre-set according to experience, or may be specifically configured according to the respective application, and is not limited herein.
  • the first threshold can be 90%.
  • first time period and the second time period mentioned in the embodiment of the present application are only for explaining that the application can be adjusted from one database node to another, and the protection scope of the embodiment of the present application is not limited.
  • one cycle period can be set, where the first time period and the second time period represent two consecutive periods.
  • the method for managing an application in the embodiment of the present application may determine a target database node based on a historical database object accessed by the application, so that the application running on the first database node is migrated to the target database node for running.
  • the relationship between the application and the running database node is dynamic, and can be adjusted according to the load of the database cluster system, the database node where the database object is located, and the like.
  • FIG. 5 is a schematic diagram of an apparatus 500 for managing an application provided by an embodiment of the present application. It should be understood that the apparatus 500 for managing an application shown in FIG. 5 is merely an example, and the apparatus for managing an application of the embodiment of the present application may further include other modules or units.
  • the apparatus 500 for managing the application is used to execute the above-described system 100 and method 100, and the operations or processes executed in FIG. 4, and detailed description thereof will be omitted herein to avoid redundancy.
  • the apparatus 500 is applied to a database cluster system including at least two database nodes, each of which stores at least one database object, and the apparatus 500 includes:
  • the running unit 510 is configured to run an application on the first database node in the first time period
  • the processing unit 520 is configured to determine, according to the at least one historical database object accessed by the application in the first time period, a target database node, where the target database node stores the historical database object;
  • the running unit 510 is further configured to run the application on the target database node in a second time period.
  • the running unit 510 is specifically configured to: run, in the first time period, the first application module on the first database node, where the application is any one of the first application modules.
  • processing unit 520 is further configured to: determine, by using the first application module, the first application;
  • the processing unit 520 is specifically configured to:
  • the running unit 510 is configured to: run the first application on the target database node in a second time period.
  • the running unit 510 is configured to: when the central processor CPU utilization of the target database node is less than a first threshold, run the application on the target database node in a second time period.
  • the apparatus 500 further includes: an acquisition unit 530, configured to: collect operation information of the database cluster system in real time, where operation information of the database cluster system includes a load of the database cluster system Information and information on the communication performance of the database cluster system;
  • the processing unit 520 is configured to: determine, according to the running information of the database cluster system, whether the application runs on the target database node in a second time period.
  • processing unit 520 is specifically configured to:
  • the at least one historical database object is stored on the at least one second database node
  • the processing unit 520 is further configured to: use the at least one second database node according to a preset mapping relationship. Determining the target database node, the mapping relationship being a relationship between the application and a database node capable of running the application; and/or, according to the second application module, from the at least one second database
  • the target database node is determined in the node, and the application in the second application module runs on the target database node, and the application is the same type of application as the application in the second application module.
  • the device 500 further includes: a detecting unit 540, configured to: periodically detect running information of the application, where the running information of the application includes database node information accessed by the application.
  • FIG. 6 is another schematic diagram of an apparatus for managing an application according to an embodiment of the present application.
  • the apparatus 10 includes a processor 11, a memory 12, a communication interface 13, and a bus 14.
  • the processor 11, the memory 12, and the communication interface 13 may communicate via the bus 14, or may communicate by other means such as wireless transmission.
  • the memory 12 is for storing instructions
  • the processor 11 is for executing instructions stored in the memory 12
  • the memory 12 stores program codes
  • the processor 11 can call program codes stored in the memory 12 to control the communication interface 13 to send and receive information.
  • signals cause device 10 to perform the functions, performed actions, or processes described above in system 100 and method 100 or in FIG.
  • the processor 11 can call the program code stored in the memory 12 to perform the following operations:
  • the application is run on the target database node.
  • the apparatus 10 may correspond to (eg, be configured or be itself) the system 100 and method 100 described above or in FIG. 4, and that each module or unit in the apparatus 10 is used to perform the above-described system 100 and method 100, respectively.
  • the functions in FIG. 4 and the various operations or processes performed are omitted herein for the sake of avoiding redundancy.
  • the processor may be a CPU, and the processor may also be other general purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable Logic devices, discrete gates or transistor logic devices, discrete hardware components, and more.
  • DSPs digital signal processors
  • ASICs application specific integrated circuits
  • FPGAs field programmable gate arrays
  • the general purpose processor can be a microprocessor or any conventional processor or the like.
  • the embodiments of the present application may be applied to a processor or may be implemented by a processor.
  • the processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the foregoing method embodiment may be completed by an integrated logic circuit of hardware in a processor or an instruction in a form of software.
  • the processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a Field Programmable Gate Array (FPGA), or the like. Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to perform the steps of the above method.
  • the memory can be either volatile memory or non-volatile memory, or can include both volatile and nonvolatile memory.
  • the non-volatile memory may be a read-only memory (ROM), a programmable read only memory (ROMM), an erasable programmable read only memory (erasable PROM, EPROM), or an electrical Erase programmable EPROM (EEPROM) or flash memory.
  • ROM read-only memory
  • PROM programmable read only memory
  • EEPROM electrical Erase programmable EPROM
  • flash memory a random access memory (RAM) that acts as an external cache.
  • RAM Direct memory bus random access memory
  • bus may include, in addition to the data bus, a power bus, a control bus, a status signal bus, and the like.
  • various buses are labeled as buses in the figure.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product.
  • the technical solution of the present application which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program code. .

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)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请提供了一种管理应用程序的方法与装置。该方法在包括至少两个数据库节点的数据库集群***中执行,每个数据库节点上存储有至少一个数据库对象,该方法包括:在第一时段,在第一数据库节点上运行应用程序;根据所述应用程序在所述第一时段访问的至少一个历史数据库对象,确定目标数据库节点,其中,所述目标数据库节点存储有所述历史数据库对象;在第二时段,在所述目标数据库节点上运行所述应用程序。根据本申请,能够动态调整运行应用程序的数据库节点,避免数据库节点出现超负载的问题。

Description

管理应用程序的方法与装置
本申请要求于2018年04月13日提交中国国家知识产权局、申请号为201810332622.2、发明名称为“管理应用程序的方法与装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据库集群技术领域,并且更具体地,涉及管理应用程序的方法与装置。
背景技术
大型的应用***通常运行在数据库集群(Database Cluster)***上。在这种共享数据(Share Everything)架构的数据库集群上运行大型应用***时,一般要进行应用分区,主要目的是让访问相同或同一类数据的应用运行在相同的数据库节点上,减少数据库集群之间的数据通讯,避免因为集群间通讯量的增大导致性能下降,从而导致应用性能的下降。
现有的分区技术一般是按照应用模块来分区。每个应用模块运行在指定的数据库节点(Database Instance)上。这种分区方式,可能会导致某个数据库节点超负载,比如中央处理器(Central Processing Unit,CPU)负载过高。
发明内容
本申请提供一种管理应用程序的方法与装置,能够动态调整运行应用程序的数据库节点,避免数据库节点出现超负载的问题。
第一方面,提供了一种管理应用程序的方法,其特征在于,在包括至少两个数据库节点的数据库集群***中执行,每个数据库节点上存储有至少一个数据库对象,所述方法包括:在第一时段,在第一数据库节点上运行应用程序;根据所述应用程序在所述第一时段访问的至少一个历史数据库对象,确定目标数据库节点,其中,所述目标数据库节点存储有所述历史数据库对象;在第二时段,在所述目标数据库节点上运行所述应用程序。
基于上述技术方案,本申请实施例的管理应用程序的方法可以基于应用程序访问的历史数据库对象,确定目标数据库节点,从而实现运行在第一数据库节点上的应用程序迁移到目标数据库节点上运行。相比于现有技术,可以避免某个数据库节点过高时,也无法拆分应用模块的应用程序以进行数据库节点间调整的问题。因此,通过本申请实施例,应用程序与所运行的数据库节点的关系是动态的,可以根据数据库集群***的负载、数据库对象所在的数据库节点的情况等进行调整。
结合第一方面,在第一方面的某些实现方式中,所述在第一时段,在第一数据库节点上运行应用程序,包括:在第一时段,在第一数据库节点上运行第一应用模块,所述应用程序是所述第一应用模块中的任一应用程序。
应用模块是一类应用程序的归类。将同一类应用程序运行在同样的数据库节点上, 可以减少数据库集群之间的数据通讯,避免因为集群间通讯量的增大导致数据库集群***性能下降,从而导致应用性能的下降。
结合第一方面,在第一方面的某些实现方式中,从所述第一应用模块中确定第一应用程序;所述根据所述应用程序在所述第一时段访问的至少一个历史数据库对象,确定目标数据库节点,包括:计算至少一个第二数据库节点的数据量比例,得到至少一个数值,其中,所述第二数据库节点包括所述目标数据库节点,所述数据量比例是所述第一应用程序在所述第一时段,访问所述第二数据库节点上的历史数据库对象的数据量与总访问量的比例,所述总访问量是所述第一应用程序在所述第一时段访问的数据总量;确定所述至少一个数值中的最大值,所述最大值对应的数据库节点为所述目标数据库节点;所述在第二时段,在所述目标数据库节点上运行所述应用程序,包括:在第二时段,在所述目标数据库节点上运行所述第一应用程序。
从第一应用模块中确定一个第一应用程序,并将第一应用程序从第一数据库节点迁移到目标数据库节点,可以降低第一数据库节点的负载。此外,最大值意味着第一应用程序访问该数据库节点中的数据库对象最多,将第一应用程序迁移到该数据库节点,可以减少数据库集群之间的数据通讯。
结合第一方面,在第一方面的某些实现方式中,所述在第二时段,在所述目标数据库节点上运行所述应用程序,包括:当所述目标数据库节点的中央处理器CPU利用率小于第一阈值时,在第二时段,在所述目标数据库节点上运行所述应用程序。
为了保证目标数据库节点的负载,如,目标数据库节点的CPU利用率,在将应用程序迁移到目标数据库节点之前,还会确定目标数据库节点的CPU利用率。当目标数据库节点的CPU利用率小于一定的阈值时,才会将应用程序迁移到该目标数据库节点上运行。
结合第一方面,在第一方面的某些实现方式中,所述方法还包括:实时采集所述数据库集群***的运行信息,所述数据库集群***的运行信息包括所述数据库集群***的负载信息和所述数据库集群***的通讯性能的信息;根据所述数据库集群***的运行信息,确定所述应用程序在第二时段,是否在所述目标数据库节点上运行。
调整应用程序的运行节点可能会影响数据库集群***的通讯性能,所以要实时采集数据库集群***的运行信息,该运行信息包括数据库集群***的负载信息和通讯性能的信息。当该运行信息满足一定的条件时,才会将应用程序迁移到目标数据库节点上运行。从而,既可以动态调整运行应用程序的数据库节点,还可以保证数据库集群***的通讯性能。
结合第一方面,在第一方面的某些实现方式中,所述确定所述应用程序在第二时段,是否在所述目标数据库节点上运行,包括:当所述数据库集群***的通讯性能满足第一条件时,确定所述应用程序在第二时段,在所述目标数据库节点上运行;或,当所述第一数据库节点的CPU利用率超过第二阈值时,确定所述应用程序在第二时段,在所述目标数据库节点上运行。
当数据库集群***的通讯性能满足一定的条件时,可以迁移应用程序。或者,当第一数据库节点的CPU利用率超过一定的阈值时,为了减小第一数据库节点的负载,将第一数据库节点上的应用程序迁移到其他数据库节点上运行。
结合第一方面,在第一方面的某些实现方式中,所述至少一个历史数据库对象存储在所述至少一个第二数据库节点上,以及,所述根据所述应用程序在所述第一时段访问的至少一个历史数据库对象,确定目标数据库节点,包括:根据预设的映射关系,从所述至少一个第二数据库节点中确定所述目标数据库节点,所述映射关系是所述应用程序与能够运行所述应用程序的数据库节点之间的关系;和/或,根据第二应用模块,从所述至少一个第二数据库节点中确定所述目标数据库节点,所述第二应用模块中的应用程序在所述目标数据库节点上运行,所述应用程序与所述第二应用模块中的应用程序是同一类应用程序。
本申请实施例中,通过历史数据库对象确定多个数据库节点,从多个数据库节点中确定目标数据库节点的方式很多,可以是根据预设的映射关系确定,即,从多个数据库节点中确定能够运行该应用程序的数据库节点。或者,也可以是将该应用程序设置在运行同类应用程序的数据库节点上。
结合第一方面,在第一方面的某些实现方式中,周期性地检测所述应用程序的运行信息,所述应用程序的运行信息包括所述应用程序访问的数据库节点信息。
周期性地检测应用程序的运行信息,可以根据应用程序的运行状况、数据库节点信息,动态地调整运行应用程序的数据库节点,保证数据库集群***整体的通讯性能。
第二方面,提供了一种管理应用程序的装置,包括用于执行上述第一方面以及第一方面中任一种可能实现方式中的管理应用程序的方法的各步骤的单元。
第三方面,提供了一种管理应用程序的设备,所述设备可以为上述方法设计中管理应用程序的装置,或者为配置于管理应用程序的装置中的芯片。所述设备:包括处理器、存储器、通信接口和总线。其中,处理器、存储器、通信接口通过总线进行通信,也可以通过无线传输等其他手段实现通信。该存储器用于存储指令,该处理器用于执行该存储器存储的指令。该存储器存储程序代码,且处理器可以调用存储器中存储的程序代码执行第一方面以及第一方面中任一种可能实现方式中的管理应用程序的方法。
第四方面,提供了一种芯片***,该芯片***包括处理器,用于管理应用程序的装置实现上述方面中所涉及的功能,例如,运行,采集,确定,或处理上述方法中所涉及的数据和/或信息。在一种可能的设计中,所述芯片***还包括存储器,所述存储器,用于保存管理应用程序的装置必要的程序指令和数据。具体地,所述存储器保存的程序指令包括用于执行第一方面以及第一方面中任一种可能实现方式中的管理应用程序的方法的指令。
可选地,该芯片***可以由芯片构成,也可以包括芯片和其他分立器件。
第五方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行上述第一方面以及第一方面中任一种可能实现方式中的管理应用程序的方法。
第六方面,提供了一种计算机可读介质,所述计算机可读介质存储管理应用程序的装置执行的程序代码,所述程序代码包括用于执行第一方面以及第一方面中任一种可能实现方式中的管理应用程序的方法的指令。
本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。
附图说明
图1是适用于本申请实施例的管理应用程序的方法的***的示意图;
图2是按照应用模块实现应用分区的示意图;
图3是本申请实施例提供的管理应用程序的方法的示意性流程图;
图4是适用于本申请实施例的管理应用程序的方法的示意性逻辑图;
图5是本申请实施例提供的管理应用程序的装置的一示意图;
图6是本申请实施例提供的管理应用程序的装置的另一示意图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
本申请实施例提供的管理应用程序的方法与装置,可以应用于计算机上,该计算机包括硬件层、运行在硬件层之上的操作***层,以及运行在操作***层上的应用层。该硬件层包括中央处理器(Central Processing Unit,CPU)、内存管理单元(Memory Management Unit,MMU)和内存(也称为主存)等硬件。该操作***可以是任意一种或多种通过进程(Process)实现业务处理的计算机操作***,例如,Linux操作***、Unix操作***、Android操作***、iOS操作***或windows操作***等。该应用层包含浏览器、通讯录、文字处理软件、即时通信软件等应用。
并且,在本申请实施例中,该计算机可以是智能手机等手持设备,也可以是个人计算机等终端设备,本申请并未特别限定,只要能够通过运行记录有本申请实施例的管理应用程序的方法的代码的程序,以根据本申请实施例的管理应用程序的方法对应用程序进行管理即可。
本申请实施例的管理应用程序的方法的执行主体可以是计算机设备,或者,是计算机设备中能够调用程序并执行程序的功能模块。
此外,本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。
本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(Compact Disc,CD)、数字通用盘(Digital Versatile Disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、卡、棒或钥匙驱动器等)。
另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。其中,术语“机器可读介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
为便于理解本申请实施例,首先结合图1详细介绍适用于本申请实施例的管理应用程序的方法的***架构。
图1是适用于本申请实施例的管理应用程序的方法的***100的示意图。如图1所示,适用于本申请实施例的数据库集群***,该数据库集群***100可以包括:数据库、客户端。其中,数据库,也可以理解为数据库节点;客户端,也可以理解为应用程序或 应用模块。
首先介绍一下数据库集群。
数据库集群(Database Cluster),顾名思义,就是利用至少两台或者多台数据库服务器,构成一个虚拟单一数据库逻辑映像,像单数据库***那样,向客户端提供透明的数据服务。现在,大型的应用***通常运行在数据库集群***上。如图1中,每台数据库都可以为客户端独立处理任务。数据库集群***是一个信息***的核心,因此除了业务逻辑之外,用户还关心***性能。性能问题涉及硬件、软件、网络、应用设计架构、代码质量等多方面。数据库集群如果能提供负载均衡能力和自动优化能力,则是对整个***性能具有莫大的好处。
以企业资源计划***(Enterprise Resource Planning,ERP)甲骨文公司(Oracle)电子商务套件(E-Business Suit,EBS)为例,它后台的数据库***一般是运行在Oracle真正的应用级集群(Real Application Cluster,RAC)的数据库集群上。RAC为服务提供了自动负载管理。服务是一组或一类应用程序,它们由与应用程序负载相对应的业务组件组成。RAC中的服务实现了连续、不中断的数据库操作,并支持多个实例中的多个服务。将服务分配在一个或多个实例以及可以用作备份实例的替代实例上运行。如果主实例出现故障,Oracle将把服务从故障实例转移到仍旧运行的替代实例上。Oracle还自动在运行着服务的实例间进行连接负载平衡。
RAC利用多台低成本计算机一同工作,作为一台大型计算机来进行数据库处理,可用于各种应用程序。在这种共享数据(Share Everything)架构的数据库集群上运行大型应用***时,一般要进行应用分区,主要目的是让访问相同或同一类数据的应用运行在相同的数据库节点上,减少数据库集群之间的数据通讯。
一种可能的实现方式是,按照应用模块来分区。如图2所示,各个应用模块包括一个或多个应用程序。订单模块的程序运行在数据库节点1,财务模块的程序运行在数据库节点2,制造模块的程序运行在数据库节点3,其它模块的程序运行在数据库节点4。通过不同应用模块的程序运行在不同数据库节点,相同模块的程序运行在同一个数据库节点来实现应用分区。这种按照应用模块来分的方式,粒度比较粗,不同应用模块的负载可能会不同,因此容易导致负载的不均衡。而且按照应用模块来分区的话,无法拆分应用模块的程序进行节点间调配。
因此,本申请提供一种管理应用程序的方法,旨在可以动态调整应用程序运行的数据库节点,从而避免出现数据库节点负载不均衡的问题。
为了便于理解本申请实施例,下面首先通过表1简单介绍几个概念。
表1
Figure PCTCN2019078399-appb-000001
Figure PCTCN2019078399-appb-000002
其中,动态应用分区方法(Dynamic Application Partition Method,DAPM)是本申请实施例提出的一套收集信息的框架和算法。DAPM根据收集的应用程序信息、应用程序运行时的***负载信息等,决定应用程序运行在哪个数据库节点上。应用程序DAPM类型的定义如表2。
其中,以8个数据库节点为例,应用程序和数据库节点映射关系的具体形式如表3。
表3中数值用于表示应用程序和数据库节点的映射关系。
例如,16=2 4,指示该应用程序只能运行在5节点上。
又如,200=2 7+2 6+2 3,指示该应用程序可以运行在4节点、7节点、8节点上。
又如,255=2 7+2 6+2 5+2 4+2 3+2 2+2 1+2 0,指示该应用程序可以运行在1节点、2节点、3节点、4节点、5节点、6节点、7节点、8节点上。
又如,3=2 1+2 0,指示该应用程序可以运行在1节点、2节点上。
应理解,上述映射关系的具体形式和指示的信息仅为示例性说明,在能够实现映射关系的功能(即,用于指示应用程序运行在哪些数据库节点上)的情况下,可以与映射关系的具体形式和指示的信息进行任意变更。本申请实施例并未限定于此。
表2
应用程序DAPM类型 描述
0 程序只能运行在一个节点,且不能被迁移至其它数据库节点
1 程序只能运行在一个数据库节点,但是可以被迁移到其它节点
2 考虑负载均衡因素,程序最多可以运行在2个数据库节点
3 考虑负载均衡因素,程序最多可以运行在3个数据库节点
4 考虑负载均衡因素,程序最多可以运行在4个数据库节点
5 考虑负载均衡因素,程序最多可以运行在5个数据库节点
6 考虑负载均衡因素,程序最多可以运行在6个数据库节点
7 考虑负载均衡因素,程序最多可以运行在7个数据库节点
8 考虑负载均衡因素,程序最多可以运行在8个数据库节点
表3
Figure PCTCN2019078399-appb-000003
其中,CPU阈值,即CPU利用率的阈值。CPU利用率,即运行的程序占用的CPU资源。CPU利用率表示机器在某个时间点的运行程序的情况。CPU利用率越高,说明机器在这个时间上运行了很多程序,反之较少。CPU阈值的确定,可以是根据经验预设 定的,或者根据各自应用情况具体设定,此处不作限定。例如,CPU阈值可以为90%,即,当某个数据库节点的CPU利用率超过90%时,表示该数据库节点的负载过高。
其中,集群通讯性能指标,即集群通讯性能满足的指标。调整应用程序的运行节点时,会影响数据库***集群的通讯性能。因此,调整应用程序的运行节点时,需要保证集群通讯的性能维持在一定水平的指标。例如,集群通讯消耗时间不超过***所有时间的10%。
需要说明的是,在本申请实施中,“应用程序”可以指为完成某项或多项特定工作的计算机程序,它运行在用户模式,可以和用户进行交互,具有可视的用户界面。名词“应用程序”和“程序”经常交替使用,本领域技术人员理解其含义。
还需要说明的是,在本申请实施中,“调整应用程序”指将在一个数据库节点上运行的应用程序迁移到另一个数据库节点上运行,本领域技术人员理解其含义。
还需要说明的是,本申请实施例中,“数据库节点”和“节点”有时可以混用,应当指出的是,在不强调其区别时,其所要表达的含义是一致的。“访问对象”和“访问数据库对象”有时可以混用,应当指出的是,在不强调其区别时,其所要表达的含义是一致的。
还需要说明的是,在本申请中,第一、第二、第三等仅为便于区分不同的对象,例如,区分不同的数据库节点、区分不同的应用程序等,不应对本申请构成任何限定。
还需要说明的是,“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。“至少一个”是指一个或一个以上;“A和B中的至少一个”,类似于“A和/或B”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和B中的至少一个,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
下面将结合附图详细说明本申请提供的技术方案。图3是将一个应用程序(以下,为了便于理解和说明,记作应用程序#A)从第一数据库节点(以下,为了便于理解和说明,记作节点#1)调整到目标数据库节点(以下,为了便于理解和说明,记作节点#2)。
图3是本申请实施例的管理应用程序的方法100的示意图。该方法100在包括至少两个数据库节点的数据库集群***中执行,如,方法可用于数据库集群***100。方法100包括步骤110-130,下面详细描述各个步骤。
110,在第一时段,在节点#1上运行应用程序#A。
节点#1上可以运行1个或多个应用程序,该多个应用程序可以属于同一应用模块,也可以属于不同应用模块。本申请实施例对此不作限定。
可选地,在第一时段,在节点#1上运行应用程序#A之前,包括:根据预设的映射关系,确定节点#1,所述映射关系是所述应用程序#A与节点#1之间的关系;或,根据应用程序#A访问的历史数据库对象,确定节点#1;或,根据应用模块#A(即,第二应用模块的一例),确定节点#1,应用模块#A中的应用程序在节点#1上运行,应用程序#A与应用模块#A中的应用程序是同一类应用程序。
下面具体介绍确定节点#1的方式。本申请实施例中,确定节点#1的方式很多,至少包括以下三种。
方式1
根据预设的映射关系确定节点#1。
例如,根据表3示出的映射关系,确定可以运行应用程序#A的节点。具体地,假设根据映射关系确定应用程序#A可运行在4节点、7节点、8节点上。一种可能的实现方式是,根据4节点、7节点、8节点的具体情况(如,负载情况),从4节点、7节点、8节点中选择一个负载低的节点作为节点#1,用来运行应用程序#A。另一种可能的实现方式是,根据4节点、7节点、8节点上运行的应用程序的类别来确定节点#1。即,选择运行着与应用程序#A同类别的节点作为节点#1。还有一种可能的实现方式是,从4节点、7节点、8节点中随机确定一个节点作为节点#1。具体的实现方式,本申请实施例不限定。
方式2
根据应用程序#A访问的历史数据库对象,确定节点#1。
每个数据库节点中存储有至少一个数据库对象。数据库对象有表,索引,视图,图表,缺省值,规则,触发器,用户,函数等。例如,数据库中的表与我们日常生活中使用的表格类似,它也是由行(Row)和列(Column)组成的。列由同类的信息组成,每列又称为一个字段,每列的标题称为字段名。行包括了若干列信息项。一行数据称为一个或一条记录,它表达有一定意义的信息组合。一个数据库表由一条或多条记录组成,没有记录的表称为空表。每个表中通常都有一个主关键字,用于唯一地确定一条记录。又如,索引是根据指定的数据库表列建立起来的顺序。它提供了快速访问数据的途径,并且可监督表的数据,使其索引所指向的列中的数据不重复。如聚簇索引。
可选地,在本申请实施例中,会进行程序信息收集和分析。如,定时收集应用程序的主要的代码,以及主要访问的数据库对象。收集的同时量化这些代码和访问对象所占的比例。根据所占的比例,确定应用程序运行在哪个数据库节点上。例如,在历史访问中,哪个数据库节点是应用程序#A最常访问的数据库对象的主节点,则就将该数据库节点确定为节点#1。
方式3
根据应用模块#A,确定节点#1。
应用模块#A中包括多个应用程序,该多个应用程序在一个数据库节点上运行。如果应用程序#A也属于应用模块#A,也就是说,应用程序#A与应用模块#A中的应用程序是同一类应用程序,那么将该数据库节点确定为节点#1。通过将同一类应用程序运行在同样的数据库节点上,可以减少数据库集群之间的数据通讯,避免因为集群间通讯量的增大导致数据库集群***性能下降,从而导致应用性能的下降。
应理解,以上列举的确定节点#1的三种方式仅为示例性说明,本申请实施例并未限定于此,其他能够确定运行节点#1的方式均落入本申请的保护范围内,例如,随机确定一个节点作为节点#1。
可选地,周期性地检测所述应用程序的运行信息,所述应用程序的运行信息包括所述应用程序访问的数据库节点信息。
周期性地检测应用程序的运行信息,可以根据应用程序的运行状况、数据库节点信息,动态地调整运行应用程序的数据库节点,保证数据库集群***整体的通讯性能。
120,根据应用程序#A在第一时段访问的至少一个历史数据库对象,确定节点#2,其中,节点#2存储有所述历史数据库对象。
每个数据库节点上存储有至少一个数据库对象。应用程序访问数据库对象,即访问包括这些数据库对象的数据库节点。
如上所述,在本申请实施例中,会进行程序收集和分析。图4示出了适用于本申请实施例的管理应用程序的方法的示意性逻辑图。图4包括:410,程序信息收集分析。收集程序运行的信息,分析得出程序访问对象信息,即该程序主要访问的数据库对象。收集的同时量化这些代码和访问对象所占的比例。表4示出了一个具体的例子。以应用程序#A为HWPROGA为例,HWPROGA的访问对象(即,访问的数据库对象)有:TAB1、IDX1、TAB2、IDX2、TAB3、IDX3。访问数据量占比表示的是:访问这些数据库对象占HWPROGA整个运行过程中所访问数据量的百分比。
从表4可以看出,HWPROGA主要访问的数据库对象是TAB2。
图4还包括420,***运行信息分析。可选地,实时采集数据库集群***的运行信息,所述数据库集群***的运行信息包括所述数据库集群***的负载信息和所述数据库集群***的通讯性能的信息;根据所述数据库集群***的运行信息,确定应用程序#A在第二时段,是否在节点#2上运行。
调整应用程序的运行节点可能会影响数据库集群***的通讯性能,所以要实时采集数据库集群***的运行信息。当该运行信息满足一定的条件时,才会将应用程序迁移到目标数据库节点上运行。从而,既可以动态调整运行应用程序的数据库节点,还可以保证数据库集群***的通讯性能。
该数据库集群***的运行信息包括***负载、***集群通讯性能状况、数据库对象的主节点信息等。具体的介绍见表5。
表4
程序名 访问对象 访问数据量占比
HWPROGA TAB1 21.64%
HWPROGA IDX1 12.5%
HWPROGA TAB2 30.05%
HWPROGA IDX2 12.01%
HWPROGA TAB3 16.98%
HWPROGA IDX3 6.188%
表5
Figure PCTCN2019078399-appb-000004
Figure PCTCN2019078399-appb-000005
表6
数据库对象名 所在主节点
TAB1 2
IDX1 2
TAB2 3
IDX2 3
TAB3 2
IDX3 2
其中,根据数据库对象所在的主节点信息,可以确定应用程序迁移到哪个数据库节点上。通过收集应用程序#A访问的数据库对象,进而判断这些访问对象所在的数据库节点,可以确定出节点#2。仍以应用程序HWPROGA为例,表4列出了应用程序HWPROGA的访问对象,表6示出了这些访问对象所在的主节点信息。
从表6可以看出,HWPROGA访问的节点有2节点、3节点。
图4还包括:430,程序运行节点设置。即,根据410和420,分析得出节点#2的信息,从而动态设置。或者,也可以是根据程序提出设置建议,人工判断后根据需要再去设置。
可选地,所述根据应用程序#A在所述第一时段访问的至少一个历史数据库对象,确定节点#2,包括:计算至少一个第二数据库节点的数据量比例,得到至少一个数值,其中,所述至少一个历史数据库对象存储在所述至少一个第二数据库节点上,所述数据量比例是应用程序#A在所述第一时段,访问所述第二数据库节点上的历史数据库对象的数据量与总访问量的比例,所述总访问量是应用程序#A在所述第一时段访问的数据总量;确定所述至少一个数值中的最大值,所述最大值对应的数据库节点为节点#2;所述在第二时段,在节点#2上运行应用程序#A,包括:在第二时段,在节点#2上运行应用程序#A。
最大值意味着应用程序#A访问该数据库节点中的数据库对象最多,将应用程序#A迁移到该数据库节点,可以减少数据库集群之间的数据通讯。通过表6和表4可以确定出各个数据库节点的数据量比例,如表7所示。
表7
数据库节点 主节点数据库对象 节点得分
1 0
2 TAB1,IDX1,TAB3,IDX3 21.64+12.5+16.98+6.188=57.308
3 TAB2,IDX2 30.05+12.01=42.06
4 0
从表7可以看出,各个节点的得分(即,数据库节点的数据量比例的一例)。节点的得分越高,意味着数据量比例越大,也意味着应用程序HWPROGA经常访问该节点的数据库对象。数据量比例最大值对应的是2节点,因此,对于应用程序HWPROGA,它的目标数据库节点(即,节点#2)可以确定为2节点。
可选地,所述至少一个历史数据库对象存储在所述至少一个第二数据库节点上,以及,所述根据所述应用程序在所述第一时段访问的至少一个历史数据库对象,确定目标数据库节点,包括:根据预设的映射关系,从所述至少一个第二数据库节点中确定所述目标数据库节点,所述映射关系是所述应用程序与能够运行所述应用程序的数据库节点之间的关系;和/或,根据第二应用模块,从所述至少一个第二数据库节点中确定所述目标数据库节点,所述第二应用模块中的应用程序在所述目标数据库节点上运行,所述应用程序与所述第二应用模块中的应用程序是同一类应用程序。
具体地,一种可能的实现方式是:从表6可以看出,HWPROGA访问的节点有2节点、3节点。根据HWPROGA与能够运行该HWPROGA的数据库节点之间的映射关系确定目标数据库节点。例如,假设,根据映射关系确定能够运行HWPROGA的数据库节点包括3节点,不包括2节点,那么确定3节点为目标数据库节点。
或,另一种可能的实现方式是:从表7中选择出得分最高(2节点)、得分次高(3节点)的数据库节点。假设根据映射关系确定能够运行HWPROGA的数据库节点包括3节点,不包括2节点,那么确定3节点为目标数据库节点。
或,另一种可能的实现方式是:假设3节点上运行着与HWPROGA属于同一应用模块的应用程序,则不管3节点是否是得分最高,都确定3节点为目标数据库节点。
需要说明的是,上述几种可能的实现方式只是示例性说明,本申请实施例并未限定于此。例如,根据映射关系确定能够运行HWPROGA的数据库节点包括3节点,不包括2节点,但2节点的得分最高,3节点的得分很低,那么依然确定得分高的2节点为目标数据库节点。
此外,图4中还包括程序调度器,可以调度程序运行。按应用模块的分区设置一般是静态固定的,通常是配置在***设置层(例如通过配置不同的管理器来实现),无法根据程序运行的变化动态调整,修改配置一般会影响***可用性,不够灵活。本申请实施例中的程序调度器,可以灵活调度程序,调整应用程序运行的数据库节点。
130,在第二时段,在节点#2上运行应用程序#A。
确定节点#2后,将应用程序#A迁移到节点#2上运行,需要满足一定的条件。接下来具体介绍。
可选地,确定应用程序#A在第二时段,是否在节点#2上运行,包括:当所述数据库集群***的通讯性能满足第一条件时,确定应用程序#A在第二时段,在节点#2上运行;或,当节点#1的CPU利用率超过第二阈值时,确定应用程序#A在第二时段,在节点#2上运行。
具体地,确定应用程序#A在第二时段,在节点#2上运行,至少包括以下三种情况。
情况1
数据库集群***的通讯性能满足第一条件。
一种可能的实现方式,该第一条件可以是集群通讯时间超过***所有消耗时间的10%。满足第一条件,即,集群通讯时间超过***所有消耗时间的10%时,开始调整应用分区以减少集群通讯时间。也就是说,将在节点#1上运行的应用程序#A迁移到节点#2上运行。
情况2
节点#1的CPU利用率超过第二阈值。
具体地,节点#1(应用程序#A当前运行的节点)的CPU利用率超过CPU阈值(即,第二阈值的一例)时,修改应用程序#A的运行节点。从而可以减轻节点#1的负载。此处,第二阈值可以是根据经验预设定的,或者根据各自应用情况具体配置,此处不作限定。例如,第二阈值可以为90%。
可选地,在第一时段,在节点#1上运行应用程序,包括:在第一时段,在节点#1上运行第一应用模块,应用程序#A是所述第一应用模块中的任一应用程序。
当节点#1的CPU利用率超过第二阈值时,可选地,从第一应用模块中确定第一应用程序。其中,该第一应用程序可以是:主要访问的数据库对象的主节点不是节点#1的应用程序。或者,该第一应用程序可以是消耗***资源最多的应用程序。或者。该第一应用程序也可以是任意一个应用程序。
情况3
应用程序#A的主要访问对象所在主节点和应用程序#A所运行的数据库节点不是同一节点。
具体地,假如,应用程序#A主要访问的数据库对象所在的主节点是节点#1,而应用程序#A在节点#1上运行,则不改变应用程序#A的运行节点,也就是说,应用程序#A仍在节点#1上运行。
应理解,以上列举的三种情况仅为示例性说明,本申请实施例并未限定于此。
可选地,所述在第二时段,在节点#2上运行应用程序#A,包括:当节点#2的中央处理器CPU利用率小于第一阈值时,在第二时段,在节点#2上运行应用程序#A。
在将应用程序#A从节点#1迁移到节点#2时,需要确定节点#2当前的CPU利用率。当节点#2的CPU利用率小于第一阈值(即,CPU阈值)时,才可以将应用程序#A迁移到节点#2上运行。这样,可以保证节点#2的负载。此处,第一阈值可以是根据经验预设定的,或者根据各自应用情况具体配置,此处不作限定。例如,第一阈值可以为90%。
需要说明的是,本申请实施例提及的第一时段和第二时段仅是为了说明应用程序可以从一个数据库节点调整到另一个数据库节点上运行,并未限定本申请实施例的保护范围。例如,可以设定一个周期时段,此处的第一时段和第二时段表示两个相连的周期。
应理解,在本申请实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
基于上述技术方案,本申请实施例的管理应用程序的方法可以基于应用程序访问的历史数据库对象,确定目标数据库节点,从而实现运行在第一数据库节点上的应用程序 迁移到目标数据库节点上运行。相比于现有技术,可以避免某个数据库节点过高时,也无法拆分应用模块的应用程序以进行数据库节点间调整的问题。因此,通过本申请实施例,应用程序与所运行的数据库节点的关系是动态的,可以根据数据库集群***的负载、数据库对象所在的数据库节点的情况等进行调整。
图5是本申请实施例提供的管理应用程序的装置500的一示意图。应理解,图5示出的管理应用程序的装置500仅为示例,本申请实施例的管理应用程序的装置还可包括其他模块或单元。该管理应用程序的装置500用于执行上述***100和方法100、以及图4中所执行的各动作或处理过程,这里,为了避免赘述,省略其详细说明。
装置500应用于包括至少两个数据库节点的数据库集群***,每个数据库节点上存储有至少一个数据库对象,所述装置500包括:
运行单元510,用于在第一时段,在第一数据库节点上运行应用程序;
处理单元520,用于根据所述应用程序在所述第一时段访问的至少一个历史数据库对象,确定目标数据库节点,其中,所述目标数据库节点存储有所述历史数据库对象;
所述运行单元510,还用于在第二时段,在所述目标数据库节点上运行所述应用程序。
可选地,所述运行单元510具体用于:在第一时段,在第一数据库节点上运行第一应用模块,所述应用程序是所述第一应用模块中的任一应用程序。
可选地,所述处理单元520还用于:从所述第一应用模块中确定第一应用程序;
所述处理单元520具体用于:
计算至少一个第二数据库节点的数据量比例,得到至少一个数值,其中,所述至少一个历史数据库对象存储在所述至少一个第二数据库节点上,所述数据量比例是所述第一应用程序在所述第一时段,访问所述第二数据库节点上的历史数据库对象的数据量与总访问量的比例,所述总访问量是所述第一应用程序在所述第一时段访问的数据总量;确定所述至少一个数值中的最大值,所述最大值对应的数据库节点为所述目标数据库节点;
所述运行单元510用于:在第二时段,在所述目标数据库节点上运行所述第一应用程序。
可选地,所述运行单元510用于:当所述目标数据库节点的中央处理器CPU利用率小于第一阈值时,在第二时段,在所述目标数据库节点上运行所述应用程序。
可选地,所述装置500还包括:采集单元530,所述采集单元530用于:实时采集所述数据库集群***的运行信息,所述数据库集群***的运行信息包括所述数据库集群***的负载信息和所述数据库集群***的通讯性能的信息;
所述处理单元520用于:根据所述数据库集群***的运行信息,确定所述应用程序在第二时段,是否在所述目标数据库节点上运行。
可选地,所述处理单元520具体用于:
当所述数据库集群***的通讯性能满足第一条件时,确定所述应用程序在第二时段,在所述目标数据库节点上运行;或,
当所述第一数据库节点的CPU利用率超过第二阈值时,确定所述应用程序在第二时段,在所述目标数据库节点上运行。
可选地,所述至少一个历史数据库对象存储在所述至少一个第二数据库节点上,以及,所述处理单元520还用于:根据预设的映射关系,从所述至少一个第二数据库节点中确定所述目标数据库节点,所述映射关系是所述应用程序与能够运行所述应用程序的数据库节点之间的关系;和/或,根据第二应用模块,从所述至少一个第二数据库节点中确定所述目标数据库节点,所述第二应用模块中的应用程序在所述目标数据库节点上运行,所述应用程序与所述第二应用模块中的应用程序是同一类应用程序。
所述装置500还包括:检测单元540,所述检测单元540用于:周期性地检测所述应用程序的运行信息,所述应用程序的运行信息包括所述应用程序访问的数据库节点信息。
图6是本申请实施例的管理应用程序的装置的另一示意图。该装置10包括:处理器11、存储器12、通信接口13和总线14。其中,处理器11、存储器12、通信接口13(例如可以为网卡)通过总线14进行通信,也可以通过无线传输等其他手段实现通信。该存储器12用于存储指令,该处理器11用于执行该存储器12存储的指令,该存储器12存储程序代码,且处理器11可以调用存储器12中存储的程序代码,以控制通信接口13收发信息或信号,使得装置10执行上述***100和方法100或图4中的功能、所执行的各动作或处理过程。
具体地,处理器11可以调用存储器12中存储的程序代码执行以下操作:
在第一时段,在第一数据库节点上运行应用程序;
根据通信接口13收集所述应用程序在所述第一时段访问的至少一个历史数据库对象,确定目标数据库节点,其中,所述目标数据库节点存储有所述历史数据库对象;
在第二时段,在所述目标数据库节点上运行所述应用程序。
应理解,该装置10可以对应(例如,配置在或本身即为)上述***100和方法100或图4中,并且,该装置10中各模块或单元分别用于执行上述***100和方法100或图4中的功能和所执行的各动作或处理过程,这里,为了避免赘述,省略其详细说明。
在本申请实施例中,处理器可以是CPU,处理器还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者是任何常规的处理器等。
应注意,本申请实施例可以应用于处理器中,也可以由处理器实现。该处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介 质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
应理解,存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data date SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(direct ram bus RAM,DR RAM)。
还应理解,总线除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的***、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory, ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (16)

  1. 一种管理应用程序的方法,其特征在于,在包括至少两个数据库节点的数据库集群***中执行,每个数据库节点上存储有至少一个数据库对象,所述方法包括:
    在第一时段,在第一数据库节点上运行应用程序;
    根据所述应用程序在所述第一时段访问的至少一个历史数据库对象,确定目标数据库节点,其中,所述目标数据库节点存储有所述历史数据库对象;
    在第二时段,在所述目标数据库节点上运行所述应用程序。
  2. 根据权利要求1所述的方法,其特征在于,
    所述在第一时段,在第一数据库节点上运行应用程序,包括:
    在第一时段,在第一数据库节点上运行第一应用模块,所述应用程序是所述第一应用模块中的任一应用程序。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    从所述第一应用模块中确定第一应用程序;
    所述根据所述应用程序在所述第一时段访问的至少一个历史数据库对象,确定目标数据库节点,包括:
    计算至少一个第二数据库节点的数据量比例,得到至少一个数值,其中,所述至少一个历史数据库对象存储在所述至少一个第二数据库节点上,所述数据量比例是所述第一应用程序在所述第一时段,访问所述第二数据库节点上的历史数据库对象的数据量与总访问量的比例,所述总访问量是所述第一应用程序在所述第一时段访问的数据总量;
    确定所述至少一个数值中的最大值,所述最大值对应的数据库节点为所述目标数据库节点;
    所述在第二时段,在所述目标数据库节点上运行所述应用程序,包括:
    在第二时段,在所述目标数据库节点上运行所述第一应用程序。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述在第二时段,在所述目标数据库节点上运行所述应用程序,包括:
    当所述目标数据库节点的中央处理器CPU利用率小于第一阈值时,在第二时段,在所述目标数据库节点上运行所述应用程序。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述方法还包括:
    实时采集所述数据库集群***的运行信息,所述数据库集群***的运行信息包括所述数据库集群***的负载信息和所述数据库集群***的通讯性能的信息;
    根据所述数据库集群***的运行信息,确定所述应用程序在第二时段,是否在所述目标数据库节点上运行。
  6. 根据权利要求5所述的方法,其特征在于,所述确定所述应用程序在第二时段,是否在所述目标数据库节点上运行,包括:
    当所述数据库集群***的通讯性能满足第一条件时,确定所述应用程序在第二时段,在所述目标数据库节点上运行;或,
    当所述第一数据库节点的CPU利用率超过第二阈值时,确定所述应用程序在第二时段,在所述目标数据库节点上运行。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述至少一个历史数 据库对象存储在所述至少一个第二数据库节点上,以及
    所述根据所述应用程序在所述第一时段访问的至少一个历史数据库对象,确定目标数据库节点,包括:
    根据预设的映射关系,从所述至少一个第二数据库节点中确定所述目标数据库节点,所述映射关系是所述应用程序与能够运行所述应用程序的数据库节点之间的关系;和/或,
    根据第二应用模块,从所述至少一个第二数据库节点中确定所述目标数据库节点,所述第二应用模块中的应用程序在所述目标数据库节点上运行,所述应用程序与所述第二应用模块中的应用程序是同一类应用程序。
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述方法还包括:
    周期性地检测所述应用程序的运行信息,所述应用程序的运行信息包括所述应用程序访问的数据库节点信息。
  9. 一种管理应用程序的装置,其特征在于,应用于包括至少两个数据库节点的数据库集群***,每个数据库节点上存储有至少一个数据库对象,所述装置包括:
    运行单元,用于在第一时段,在第一数据库节点上运行应用程序;
    处理单元,用于根据所述应用程序在所述第一时段访问的至少一个历史数据库对象,确定目标数据库节点,其中,所述目标数据库节点存储有所述历史数据库对象;
    所述运行单元,还用于在第二时段,在所述目标数据库节点上运行所述应用程序。
  10. 根据权利要求9所述的装置,其特征在于,所述运行单元具体用于:
    在第一时段,在第一数据库节点上运行第一应用模块,所述应用程序是所述第一应用模块中的任一应用程序。
  11. 根据权利要求10所述的装置,其特征在于,所述处理单元还用于:
    从所述第一应用模块中确定第一应用程序;
    所述处理单元具体用于:
    计算至少一个第二数据库节点的数据量比例,得到至少一个数值,其中,所述至少一个历史数据库对象存储在所述至少一个第二数据库节点上,所述数据量比例是所述第一应用程序在所述第一时段,访问所述第二数据库节点上的历史数据库对象的数据量与总访问量的比例,所述总访问量是所述第一应用程序在所述第一时段访问的数据总量;确定所述至少一个数值中的最大值,所述最大值对应的数据库节点为所述目标数据库节点;
    所述运行单元用于:
    在第二时段,在所述目标数据库节点上运行所述第一应用程序。
  12. 根据权利要求9至11中任一项所述的装置,其特征在于,所述运行单元用于:
    当所述目标数据库节点的中央处理器CPU利用率小于第一阈值时,在第二时段,在所述目标数据库节点上运行所述应用程序。
  13. 根据权利要求9至12中任一项所述的装置,其特征在于,所述装置还包括:采集单元,
    所述采集单元用于:实时采集所述数据库集群***的运行信息,所述数据库集群***的运行信息包括所述数据库集群***的负载信息和所述数据库集群***的通讯性能 的信息;
    所述处理单元用于:根据所述数据库集群***的运行信息,确定所述应用程序在第二时段,是否在所述目标数据库节点上运行。
  14. 根据权利要求13所述的装置,其特征在于,所述处理单元具体用于:
    当所述数据库集群***的通讯性能满足第一条件时,确定所述应用程序在第二时段,在所述目标数据库节点上运行;或,
    当所述第一数据库节点的CPU利用率超过第二阈值时,确定所述应用程序在第二时段,在所述目标数据库节点上运行。
  15. 根据权利要求9至14中任一项所述的装置,其特征在于,所述至少一个历史数据库对象存储在所述至少一个第二数据库节点上,以及
    所述处理单元还用于:
    根据预设的映射关系,从所述至少一个第二数据库节点中确定所述目标数据库节点,所述映射关系是所述应用程序与能够运行所述应用程序的数据库节点之间的关系;和/或,
    根据第二应用模块,从所述至少一个第二数据库节点中确定所述目标数据库节点,所述第二应用模块中的应用程序在所述目标数据库节点上运行,所述应用程序与所述第二应用模块中的应用程序是同一类应用程序。
  16. 根据权利要求9至15中任一项所述的装置,其特征在于,所述装置还包括:检测单元,
    所述检测单元用于:周期性地检测所述应用程序的运行信息,所述应用程序的运行信息包括所述应用程序访问的数据库节点信息。
PCT/CN2019/078399 2018-04-13 2019-03-16 管理应用程序的方法与装置 WO2019196595A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19786078.6A EP3761175B1 (en) 2018-04-13 2019-03-16 Method and apparatus for managing application program
US17/034,740 US11507427B2 (en) 2018-04-13 2020-09-28 Application program management method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810332622.2A CN108733484B (zh) 2018-04-13 2018-04-13 管理应用程序的方法与装置
CN201810332622.2 2018-04-13

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/034,740 Continuation US11507427B2 (en) 2018-04-13 2020-09-28 Application program management method and apparatus

Publications (1)

Publication Number Publication Date
WO2019196595A1 true WO2019196595A1 (zh) 2019-10-17

Family

ID=63938891

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/078399 WO2019196595A1 (zh) 2018-04-13 2019-03-16 管理应用程序的方法与装置

Country Status (4)

Country Link
US (1) US11507427B2 (zh)
EP (1) EP3761175B1 (zh)
CN (1) CN108733484B (zh)
WO (1) WO2019196595A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108733484B (zh) 2018-04-13 2021-12-03 华为技术有限公司 管理应用程序的方法与装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007003630A1 (en) * 2005-07-05 2007-01-11 International Business Machines Corporation Systems and methods for memory migration
CN103888501A (zh) * 2012-12-24 2014-06-25 华为技术有限公司 虚拟机迁移方法和装置
CN104077187A (zh) * 2013-03-29 2014-10-01 国际商业机器公司 用于调度应用程序的执行的方法和***
WO2015171800A1 (en) * 2014-05-09 2015-11-12 Amazon Technologies, Inc. Migration of applications between an enterprise-based network and a multi-tenant network
CN108733484A (zh) * 2018-04-13 2018-11-02 华为技术有限公司 管理应用程序的方法与装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7552171B2 (en) * 2003-08-14 2009-06-23 Oracle International Corporation Incremental run-time session balancing in a multi-node system
CN100547583C (zh) * 2003-08-14 2009-10-07 甲骨文国际公司 数据库的自动和动态提供的方法
US8364908B2 (en) * 2008-04-28 2013-01-29 International Business Machines Corporation Migrating program objects in a multi-node computer system
WO2012103920A1 (en) * 2011-01-31 2012-08-09 Telefonaktiebolaget L M Ericsson (Publ) Distributed database
US9183099B2 (en) * 2013-11-12 2015-11-10 Vmware, Inc. Replication of a write-back cache using a placeholder virtual machine for resource management
US10255188B2 (en) * 2014-03-17 2019-04-09 Vmware, Inc. Migrating workloads across host computing systems based on cache content usage characteristics
US9594598B1 (en) * 2015-06-12 2017-03-14 Amazon Technologies, Inc. Live migration for virtual computing resources utilizing network-based storage
CN107291546B (zh) * 2016-03-30 2020-07-14 华为技术有限公司 一种资源调度方法及装置
WO2018065051A1 (en) * 2016-10-05 2018-04-12 Telefonaktiebolaget Lm Ericsson (Publ) Controlling resource allocation in a data center
CN106844510B (zh) * 2016-12-28 2021-01-15 北京五八信息技术有限公司 一种分布式数据库集群的数据迁移方法和装置
US10817497B2 (en) * 2018-01-29 2020-10-27 Salesforce.Com, Inc. Migration flow control

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007003630A1 (en) * 2005-07-05 2007-01-11 International Business Machines Corporation Systems and methods for memory migration
CN103888501A (zh) * 2012-12-24 2014-06-25 华为技术有限公司 虚拟机迁移方法和装置
CN104077187A (zh) * 2013-03-29 2014-10-01 国际商业机器公司 用于调度应用程序的执行的方法和***
WO2015171800A1 (en) * 2014-05-09 2015-11-12 Amazon Technologies, Inc. Migration of applications between an enterprise-based network and a multi-tenant network
CN108733484A (zh) * 2018-04-13 2018-11-02 华为技术有限公司 管理应用程序的方法与装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3761175A4

Also Published As

Publication number Publication date
US20210011774A1 (en) 2021-01-14
US11507427B2 (en) 2022-11-22
CN108733484B (zh) 2021-12-03
EP3761175A4 (en) 2021-04-21
CN108733484A (zh) 2018-11-02
EP3761175A1 (en) 2021-01-06
EP3761175B1 (en) 2022-07-27

Similar Documents

Publication Publication Date Title
US11269819B1 (en) Managing consistency models in a distributed database
CA2978889C (en) Opportunistic resource migration to optimize resource placement
US11487771B2 (en) Per-node custom code engine for distributed query processing
US10356150B1 (en) Automated repartitioning of streaming data
US20230004436A1 (en) Container scheduling method and apparatus, and non-volatile computer-readable storage medium
US11086683B2 (en) Redistributing workloads across worker nodes based on policy
CN107968810B (zh) 一种服务器集群的资源调度方法、装置和***
US10460254B2 (en) System and method for reducing state space in reinforced learning by using decision tree classification
US10866970B1 (en) Range query capacity allocation
US20130318525A1 (en) Locality-aware resource allocation for cloud computing
US10860385B2 (en) Method and system for allocating and migrating workloads across an information technology environment based on persistent memory availability
US9330158B1 (en) Range query capacity allocation
US11513854B1 (en) Resource usage restrictions in a time-series database
US10812408B1 (en) Preventing concentrated selection of resource hosts for placing resources
WO2019196595A1 (zh) 管理应用程序的方法与装置
US10594620B1 (en) Bit vector analysis for resource placement in a distributed system
US11336519B1 (en) Evaluating placement configurations for distributed resource placement
US20230029380A1 (en) System and method of multilateral computer resource reallocation and asset transaction migration and management
CN115292280A (zh) 一种跨区域的数据调度方法、装置、设备及存储介质
US10721181B1 (en) Network locality-based throttling for automated resource migration
US11381468B1 (en) Identifying correlated resource behaviors for resource allocation
CN109274545A (zh) 一种基于混合云的循环存储方法
US11941074B2 (en) Fetching a query result using a query filter
Chum et al. SLA-Aware Adaptive Mapping Scheme in Bigdata Distributed Storage Systems
US20220147370A1 (en) Management of computing devices

Legal Events

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

Ref document number: 19786078

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019786078

Country of ref document: EP

Effective date: 20200930

NENP Non-entry into the national phase

Ref country code: DE