Intelligent pooling of isolated tiered runtimes for cloud-scale databases in multi-tenant environments

Through database nesting technology, dynamic allocation and unallocating operating system resources in a multi-tenant environment, the problems of waste of resources and insufficient isolation are solved, and the maximum utilization of resources and security enhancement are achieved.

CN113168346BActive Publication Date: 2025-02-25ORACLE INT CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201980077383.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-10-19
Filing Date
2019-10-18
Publication Date
2025-02-25
Estimated Expiration
2039-10-18

AI Technical Summary

Technical Problem

In a multi-tenant environment, it is difficult to maximize the use of operating system resources, especially when dynamic allocation and deallocation of operating system resources between pluggable databases, there are problems of waste of resources and insufficient isolation.

Method used

Through database nesting technology, operating system resources are divided into multiple pools and these resources are dynamically allocated and deallocated, ensuring that each pluggable database only uses its required resource levels, while achieving resource isolation and pooling.

Benefits of technology

It realizes the maximization of the use of operating system resources in a multi-tenant environment, reduces resource waste, enhances security, and improves the overall efficiency and scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113168346B_ABST
    Figure CN113168346B_ABST
Patent Text Reader

Abstract

This article describes a technology for intelligently pooling and managing isolated hierarchical runtimes in a multi-tenant environment. In an embodiment, an allocation of operating system resources of a container database management system (CDBMS) is allocated to each universal nest in a universal nest pool. The allocation includes a quota of one or more processors and a quota of memory. Then determine the configuration profile of the PDB in the CDBMS. Based on the configuration profile determined for the PDB, determine the matching universal nest from the universal nest pool. The matching universal nest is assigned to the PDB. Then configure the matching universal nest for the PDB.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to resource management of pluggable databases maintained within a CDB. More specifically, the present invention relates to single-node and multi-node database management systems that allow dynamic allocation and de-allocation of operating system resources between pluggable databases while providing isolation of operating system resources to enhance security. Background Art

[0002] The approaches described in this section are approaches that could be pursued, but are not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any approach in this section qualifies as prior art merely by virtue of its inclusion in this section. Summary of the invention

[0003] A database management system (DBMS) manages databases. A DBMS may contain one or more database servers. A database includes database data and a database dictionary, which are stored on a persistent storage mechanism such as a collection of hard disks. Database data may be stored in one or more data containers. Each container contains records. The data in each record is organized into one or more fields. In a relational DBMS, data containers are called tables, records are called rows, and fields are called columns. In an object-oriented database, data containers are called object classes, records are called objects, and fields are called attributes. Other database architectures may use other terms.

[0004] A user interacts with the database server of a DBMS by submitting commands to the database server that cause the database server to perform operations on the data stored in the database. A user may be one or more applications running on a client computer that interacts with the database server. Multiple users may also be collectively referred to as users in this article.

[0005] Database commands may be in the form of database statements that conform to a database language. The database language used to express database commands is Structured Query Language (SQL). SQL has many different versions, some standard, some proprietary, and with a variety of extensions. Data Definition Language ("DDL") commands are issued to a database server to create or configure database objects, such as tables, views, or complex data types. SQL / XML is a common extension of SQL used when manipulating XML data in an object-relational database.

[0006] A client can issue a series of requests, such as requests to execute queries, to a DBMS by establishing a database session. A database session includes a specific connection to a database server established for a client, through which a client can issue a series of requests. A database session executes within a database process, and the database session handles requests issued by a client through the database session. A database session can generate an execution plan for a query issued by a client of the database session and marshal slave processes to execute the execution plan.

[0007] A database server may maintain session state data about a database session. The session state data reflects the current state of the session and may include the identity of the user for whom the session was established, services used by the user, instances of object types, language and character set data, statistics about resource usage for the session, values ​​of temporary variables generated by processes executing software in the session, storage of cursors, variables, and other information.

[0008] The database server includes multiple database processes. The database processes run under the control of the database server (i.e., can be created or terminated by the database server) and perform various database server functions. The database processes include processes running in a database session established for a client.

[0009] A database process is an execution unit. A database process can be an operating system process or an operating system thread or a user-defined execution context, such as a user thread or fiber. Database processes can also include "database server system" processes that provide services and / or execute functions on behalf of the entire database server. Such database server system processes include listeners, garbage collectors, log writers, and recovery processes.

[0010] A multi-node database management system consists of interconnected nodes, each of which runs a database server that shares access to the same database. Typically, the nodes are interconnected via a network and share access to shared storage to varying degrees, such as shared access to a collection of disk drives and data blocks stored thereon. The nodes in a multi-node database system may take the form of a group of computers (e.g., workstations, personal computers) interconnected via a network. Alternatively, the nodes may be nodes of a grid, which consists of nodes in the form of server blades interconnected to other server blades on a rack.

[0011] Each node in a multi-node database system hosts a database server. A server, such as a database server, is a combination of integrated software components and an allocation of computing resources, such as memory, nodes, and processes on the nodes for executing the integrated software components on processors, that are dedicated to performing specific functions on behalf of one or more clients.

[0012] Resources from multiple nodes in a multi-node database system can be allocated to software running a particular database server. Each combination of software and resource allocation from a node is a server referred to herein as a "server instance" or "instance." A database server can include multiple database instances, some or all of which run on separate computers including separate server blades.

[0013] The database dictionary may include multiple data structures that store database metadata. The database dictionary may, for example, include multiple files and tables. Portions of the data structures may be cached in the main memory of the database server.

[0014] When a database object is said to be defined by a database dictionary, the database dictionary contains metadata that defines the characteristics of the database object. For example, metadata in a database dictionary that defines a database table may specify the column names and data types of the columns, and one or more files or portions thereof that store the data for the table. Metadata in a database dictionary that defines a procedure may specify the name of the procedure, its parameters and return data type, and the data types of the parameters, and may include source code and its compiled version.

[0015] Database objects may be defined by a database dictionary, but metadata in the database dictionary itself may only partially specify characteristics of the database objects. Other characteristics may be defined by data structures that may not be considered part of the database dictionary. For example, a user-defined function implemented in a JAVA class may be defined in part by a database dictionary by specifying the name of the user-defined function and by specifying references to files containing the Java class source code (i.e., .java files) and the compiled version of the class (i.e., .class files).

[0016] Multi-tenant architecture

[0017] A container DBMS (CDBMS) is a powerful mechanism for database consolidation. A CDBMS provides a high degree of computer resource sharing while also providing a high degree of isolation. A container DBMS is based on "containers". A container is a collection of schemas, objects, and related structures in a multi-tenant container database (CDB) that logically appears to be a separate database to an application. Within a CDB, each container has a unique ID and name. The root database and each pluggable database (PDB) are considered containers. A CDBMS can contain many PDBs. PDBs isolate data and operations so that from a user or application perspective, each PDB looks like a traditional non-CDB. Each PDB is defined by its own separate database dictionary, which defines the database objects within the PDB. Users can access PDBs within a CDBMS by establishing a database session for the PDB.

[0018] The CDBMS stores the system metadata required to manage all PDBs within the CDBMS. In some embodiments, the root database of the CDBMS stores data that is common between the PDBs of the CDBMS, such as definitions for common users and roles, shared tables, code packages, etc. The PDB contains a collection of user-created schemas, objects, and related structures, which are logically like separate databases for applications. Therefore, each PDB can potentially be used to store data related to different applications, such as one PDB dedicated to hosting human resources applications, and another PDB dedicated to hosting sales applications. However, since shared database resources are only stored once in the root database and linked by the database dictionary of the PDB, duplication of data is avoided compared to using a completely separate traditional database to host each application. In addition, since the PDB is essentially a self-contained database by itself, the PDB can be easily transferred between different CDBs for upgrade or load balancing purposes.

[0019] CDB enables amortization of computer resources ("resource amortization"). The computer resources required to provision and host a PDB are actually amortized across multiple PDBs within the CDB. This reduces the computer resources required for each PDB.

[0020] In CDBMS, the database server system process is not dedicated to each PDB, but serves multiple PDBs within a CDB. Therefore, the overhead of the database server system process is amortized across multiple PDBs in a CDB.

[0021] A CDBMS provides isolation, at least to a certain extent. A database session established for a PDB can be limited to accessing or otherwise viewing only database objects defined for the PDB by the PDB's private database dictionary.

[0022] CDBMS can implement various levels of isolation. While database objects can be isolated between database sessions of a PDB, various computing resources can be shared between database sessions of a PDB. Therefore, hosting multiple PDBs on the same database server enables the computing resources of the database server or instance to be shared between multiple PDBs.

[0023] Resource Allocation

[0024] Using a multi-tenant architecture, a server within a single operating system instance is used to run multiple CDBs and PDBs. By using a single operating system instance, resources managed by the operating system can be shared, including computing resources, file systems, and network resources. However, computing resources are limited and expensive. A pluggable database that is allocated a portion of the computing resources may spend time idle while the allocated computing resources are not used. Techniques to maximize the use of computing resources in a multi-tenant environment are desired. This article describes techniques for pooling isolated layered runtimes in a multi-tenant environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In the attached picture:

[0026] Figure 1 An example computer networking environment is illustrated upon which embodiments may be implemented.

[0027] Figure 2 is a diagram depicting a CDB according to an embodiment of the present invention.

[0028] Figure 3 An example structure of a database nested execution model according to an embodiment of the present invention is illustrated.

[0029] Figure 4 An example pool of generic nesting and PDBs with configuration profiles is illustrated.

[0030] Figure 5 Depicts an example process for a hierarchical runtime that intelligently pools isolation in a multi-tenant environment.

[0031] Figure 6 is a diagram depicting a software system upon which embodiments of the present invention may be implemented.

[0032] Figure 7 is a diagram depicting a computer system that may be used in embodiments of the present invention. DETAILED DESCRIPTION

[0033] In the following description, for the purpose of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent that the present invention can be practiced without these specific details. In other cases, well-known structures and devices are shown in block diagram form to avoid unnecessarily obscuring the present invention.

[0034] This article describes methods for managing operating system resources for PDBs in a CDBMS in a way that maximizes resource usage in the CDBMS. Key to these methods is database nesting.

[0035] Database nesting is the collection and quota of operating system computer resources to which processes for a particular PDB database can be confined. Operating system resources are computer resources that can be accessed via and / or managed by the operating system. Operating system resources include processes, memory, network resources, file systems, subdirectories therein, and CPUs.

[0036] A database nest is associated with an operating system resource quota that can be assigned to a set of database processes. The set of database processes is referred to herein as running within the database nest. The operating system ensures that processes running within the database nest do not exceed the quotas and constraints specified by the database nest.

[0037] Database nesting enables resource pooling of operating system resources for PDBs hosted on a CDB. Specifically, the operating system resources of the CDB are divided among the database nests in the database nest's pool. When a PDB is active, the PDB is assigned a database nest. When inactive, the PDB is not actually assigned a database nest.

[0038] Resource pooling maximizes the use of a CDB's operating system resources. The operating system resources in the pool only need to support the number of PDBs that are expected to be active at the same time. Therefore, given a CDB's operating system resources can support the expected number of active PDBs, the number of PDBs that can be hosted can be greater than the number of PDBs that are expected to be active.

[0039] Dividing operating system resources between PDBs hosted on a CDB can be achieved by dividing operating system resources between database nests in a pool. In addition, not all PDBs have the same service level requirements and therefore do not require the same level of operating system resources. By dividing different levels of operating system resources between database nests in a pool, different levels of operating system resources can be divided between them according to the specific service level requirements of the PDBs. When a PDB requires it, a database nest that fits the service level requirements of the PDB can be assigned to that PDB.

[0040] The database nesting in the pool can be generic, i.e., not specific to any particular PDB. When a generic nesting is assigned to a PDB from a pool, it is then referred to as a PDB nesting and can be "customized" for the PDB. This customization is particularly related to providing PDB isolation as described in more detail below.

[0041] Each generic nest of a pool of generic nests may be assigned an operating system resource quota, and each generic nest of a pool of generic nests may be allocated a different amount of operating system resources than other generic nests of the pool of generic nests. Before a generic nest is assigned to a PDB or CDB, it may be isolated to a basic set of operating system resources that are applicable to all PDBs within the CDB to which the generic nest may potentially be assigned.

[0042] A generic nest can be assigned to one or more PDBs or CDBs, and can then be further configured based on a PDB configuration profile associated with the PDB. To maximize the use of operating system resources, the database server can dynamically allocate and de-allocate operating system resources reserved for PDB nests.

[0043] As previously mentioned, embodiments of the present invention are implemented within a CDBMS. Therefore, a brief description of the CDBMS is useful.

[0044] General operating environment

[0045] Figure 1 An example computer networking environment is illustrated upon which embodiments may be implemented. Figure 1 Only a specific number of each element is depicted, but a real environment may have many more (perhaps hundreds or thousands) Figure 1 Each element shown in .

[0046] exist Figure 1 In the present invention, database server 100 represents a combination of software and resources on one or more computing devices that are communicatively coupled to databases (CDB 103, CDB 104) and to each other and to database client 107 via network 106. Database server 100 runs an operating system instance. Examples of operating system instances are described below in "Software Overview". CDB 103 and CDB 104 are collectively referred to as "CDBs". Examples of computing devices on which a database server can be implemented are described below in "Hardware Overview".

[0047] In an embodiment, network 106 represents one or more local area networks, wide area networks, internetworks, or service provider networks. In some embodiments, network 106 represents the Internet.

[0048] In an embodiment, database client 107 represents a combination of software and resources on one or more computing devices that implement one or more applications that send commands to a database server to retrieve, modify, delete, or submit data stored by a CDB. Examples of computing devices on which a database server may be implemented are described below in "Hardware Overview".

[0049] CDB

[0050] Figure 2 The diagram illustrates an example structure for a general purpose CDBMS according to an embodiment. For the sake of illustrating a clear example, the CDB 103 is described Figure 2 , however, the description also applies to CDB 104.

[0051] CDB 103 includes multiple databases hosted and managed by database server 100. The databases include pluggable database PDA 220 and pluggable database PDB 230, as well as root database 210, which is associated with pluggable database PDA 230 and pluggable database PDB 230, as will be described in more detail below. In other embodiments, CDB 103 may include more than Figure 2 The number of pluggable databases depicted in the .

[0052] The pluggable database PDA 220 includes a database dictionary 221. The data of the database objects for the pluggable database PDA 220 are stored in a table space file 226.

[0053] The pluggable database PDB 230 includes a database dictionary 231. A tablespace file 236 stores data for database objects of the pluggable database PDB 230.

[0054] The database server 100 responsible for the CDB 103 can establish a database session for the root database 210 or any member pluggable database. The database dictionary of the PDB for which the database session is established determines the scope of commands issued by the database client 107 (e.g., which database(s) the command will be executed on), which permissions are checked, which database dictionaries will be used for the session, etc. A database session established for a PDB may be referred to herein as running within the PDB. A database session established for a root database is referred to herein as running with the CDB or the CDBMS of the CDB.

[0055] Root database

[0056] Root database 210 is a database used by database server 100 to globally manage CDB 103. An important function facilitated by root database 210 is to define pluggable databases within CDB 103. Similar to pluggable databases, root database 210 includes database dictionary 211. The database dictionary of the root database may be referred to herein as the root database dictionary. Database dictionary 211 contains metadata that defines various aspects of CDB 103 required to manage CDB 103 and the pluggable databases contained therein. The data of the database objects defined by database dictionary 211 is stored in tablespace files 216.

[0057] The database dictionary 211 defines the pluggable database in terms of CDB 103 or the characteristics of the pluggable database. The property PluggableDB is the name or label of the pluggable database.

[0058] The records in the database dictionary 211 define pluggable databases, and which database nest each pluggable database is assigned to. For example, one record in the database dictionary 211 defines a pluggable database PDA 220 and its database nest NESTA. Another record in the database dictionary 211 defines a pluggable database PDB 230 and its database nest NESTB. The pluggable databases and corresponding database nest assignments may also be stored in a dictionary storage file, such as PDA.DBIDC and PDB.DBIDC. The database dictionary 221, 231 may also define which database nest each pluggable database is assigned to. In an embodiment, two or more pluggable databases may be assigned to a single database nest.

[0059] Pluggable database sessions

[0060] A user can access a PDB in CDB 103 by submitting a connection request that identifies the PDB. In response to receiving the request, database server 100 establishes a database session for the PDB. Establishing a database session for the PDB requires establishing the database dictionary of the PDB as the database dictionary of the database session. Once the PDB dictionary is established as the database dictionary of the PDB, access to the database objects of the PDB and to the public database objects of the root database will be isolated, as will be described in further detail. Establishing the PDB dictionary as the database dictionary of the database session may be referred to herein as attaching the database dictionary to the database session.

[0061] With respect to PDB objects in one or more PDBs of a CDB, database commands issued to a database session attached to a PDB dictionary can only access PDB objects defined by the PDB dictionary. Thus, access for a user of a database session may be restricted to access to PDB objects defined by the attached PDB dictionary, thereby isolating database access to PDB objects from access in the corresponding PDB. This isolation applies not only to end users but also to administrators of the PDB.

[0062] For example, in response to a connection request to access the pluggable database PDA 220, the database dictionary 221 is attached to the database session. Database commands issued in the database session are executed against the database dictionary 221. Access to pluggable database objects through data manipulation language (DML) commands issued in the database session is isolated to the pluggable database objects defined by the database dictionary 221. Isolation is achieved in the same manner by concurrently executing database sessions with the pluggable database PDA or pluggable database B.

[0063] Namespace

[0064] Each database nest can be isolated to its own set of processes, files, memory, and system call limits. A database session of a PDB running within a database nest cannot access processes and resources in another database nest of another PDB.

[0065] According to an embodiment, database nesting is achieved by using operating system namespaces. Operating systems such as Linux support isolation features such as namespaces. Namespaces are features supported by many operating systems (such as Linux) for isolating the operation of multiple processes from other processes running within the same computer system. An operating system kernel (such as Linux) provides the ability to programmatically create different types of "namespaces" (such as, "process identification" namespaces and "network" namespaces). For example, when creating a "process identification" or "PID" namespace, processes belonging to the namespace can only see other processes that have been created in the same namespace. Other operating systems also support isolation features, such as namespaces. Additional non-limiting examples of operating systems that include network isolation features (such as namespaces) are Solaris zones and Windows server containers.

[0066] Similarly, when you create a "network" namespace, processes belonging to that namespace can only see the network sockets, bound ports, interfaces, routing tables, etc. defined for that namespace. In effect, creating a namespace creates a network stack. Processes within a network namespace are limited to their own set of network sockets, bound ports, interfaces, routing tables, etc. defined for that namespace.

[0067] Network namespaces partition the use of a network—devices, addresses, ports, routes, firewall rules, etc.—into separate logical boxes, essentially virtualizing the network within a single running kernel instance. Each network namespace has its own network devices, IP addresses, TCP / UDP ports, and routing tables. Each network namespace can be configured with a unique routing table and / or firewall rules. As described herein, each network namespace provides a copy of the network stack.

[0068] Other processes outside of the network namespace cannot access these network resources or even know that these network resources exist. In addition, processes assigned to the namespace cannot monitor or view traffic related to another network namespace.

[0069] Operating systems such as Linux provide several other types of namespaces. For example, a mount namespace isolates a process from mounted filesystems. A mount namespace is the set of mounted filesystems that a process can access. This set may be different from a process running locally on the host or from a process running in another namespace, which may have its own set of mounted filesystems. A process inside a mount namespace can change its set of mounted filesystems without affecting processes running outside the namespace.

[0070] UTS namespaces allow a single system to appear to have different host names and domain names to different processes. UTS namespaces isolate host names from Network Information Service (NIS) domain names. Host names in a namespace can be changed without affecting the host name of the host itself. UTS namespaces can be used to isolate host names.

[0071] IPC namespaces isolate certain interprocess communication resources, such as Portable Operating System Interface (POSIX) message queues and System V interprocess communication (IPC) mechanisms. IPC namespaces isolate processes from System V-style interprocess communication. This prevents processes in different IPC namespaces from using, for example, the Shared Memory (SHM) family of functions to establish a range of shared memory between two processes. Instead, each process can use the same identifier for the shared memory region and create two such unique regions.

[0072] PID namespaces isolate the process ID number space, which means that processes in different PID namespaces can have the same PID. Using PID namespaces, a single process can have multiple PIDs associated with it, one for each namespace it belongs to. PID namespaces are nested, which means that when a new process is created, it will have a PID for each namespace from its current namespace up to the initial PID namespace. Therefore, the initial PID namespace is able to see all processes, although it will see processes with different PIDs from other namespaces. PID namespaces allow containers to provide features such as suspending / resume a collection of processes in a container and migrating a container to a new host while the processes inside the container maintain the same PID.

[0073] User namespaces isolate user IDs and group IDs between the host and the container. User namespaces allow a process to have root privileges within the namespace without granting it access to processes outside the namespace. Additionally, user namespaces provide privilege isolation and user identity separation between multiple sets of processes. Similar to PID namespaces, user namespaces are nested, and each new user namespace is considered a child of the user namespace in which it was created. User namespaces contain mapping tables that translate user IDs from the container's point of view to the system's point of view. This allows, for example, the root user to have user ID 0 in a container, but actually be seen by the system as user ID 1,800,000 for ownership checks.

[0074] Database nested isolation

[0075] A database nest can provide file system isolation, such as limiting the file system(s) that a process associated with a PDB can access. For example, a database nest can be assigned its own installation namespace that limits the installed file systems that a process running in the database nest can access.

[0076] Database nesting can provide inter-process communication isolation, such as isolating resources such as POSIX message queues and System V IPC mechanisms between processes.

[0077] The database nest may provide memory isolation, such as limiting which memory segments a process running in the database nest may access.

[0078] Database nesting can also provide system restrictions for executing system calls. For example, database nesting can prevent the execution of certain system calls, and can also only allow the execution of certain system calls.

[0079] Figure 3 The diagram illustrates an example structure of a database nested execution model according to an embodiment. For the sake of illustrating a clear example, the CDB 304 is described as follows: Figure 3 .

[0080] CDB nest 302 includes multiple databases hosted and managed by database server 100. The databases include CDB 304, pluggable database PDA 306, and pluggable database PDB 308. In other embodiments, CDB 304 may include more than Figure 3 However, due to inherent hardware limitations, some implementations may set an upper limit on the number of pluggable databases that CDB 304 can support.

[0081] Each database CDB 304, PDA 306, PDB 308 is contained by one or more database nests. For example, CDB 304 is contained by CDB nest 302, pluggable database PDA 306 is contained by PDA nest 310, and pluggable database PDB 308 is contained by PDB nest 312.

[0082] In each database nest CDB nest 302, PDA nest 310, PDB nest 312, various namespaces are used to restrict system resources and isolate them from the operating system 314. For example, the CDB nest 302 restricts database processes 316, 318, 320 to exclusive access by the CDB 304. The PDA nest 310 restricts database processes 322, 324, 326, PDB file system 328, system limits 330, CPU 332, memory 334, and network 336 to exclusive access by the pluggable database PDA 306 and any database associated with the parent nested CDB nest 302 (such as CDB 304). Similarly, the PDB nest restricts database processes 340, 342, 344, PDB file system 346, system limits 348, CPU 350, memory 352, and network 354 to exclusive access by pluggable database PDB 308 and any database associated with the parent nested CDB nest 302 (such as CDB 304).

[0083] Generic database nesting

[0084] There are operating system resources such as memory and CPU in the container database management system (CDBMS). Operating system resources can be allocated to the common database nested pool. In an embodiment, operating system resources may include processes, memory, network resources, file systems, subdirectories therein, and CPU.

[0085] Universal nests have the features described above for database nests. A universal database nest pool (hereinafter referred to as a "universal nest") can be created by a system administrator, a database process, or instantiated when a container database management system is created. The database server assigns operating system resources between each universal nest in the universal nest pool. Each universal nest in the universal nest pool is assigned an operating system resource quota. For example, one or more CPUs and memory segments can be assigned to each universal nest in the universal nest pool. Quotas can be implemented using operating system features (such as Cgroups in Linux), which can be used to limit how much of each operating system resource can be allocated and used by a universal nest. Each universal nest in the universal nest pool can be allocated a different amount of operating system resources than each other universal nest in the universal nest pool.

[0086] A generic nest may be assigned to one or more PDBs or CDBs. Once assigned, a generic nest is referred to as a PDB nest, and may then be further configured based on a configuration profile associated with the PDB or CDB, as described herein. Prior to being assigned to a PDB or CDB, a generic nest may be isolated to basic system resources applicable to all PDBs or CDBs to which the generic nest may potentially be assigned. For example, a generic nest that has not yet been assigned to a PDB or CDB may include an isolation feature that limits access by processes defined by the generic nest to certain system directories limited to all database nests.

[0087] Quotas and allocations of operating system resources to the general nests may be assigned based on system usage metrics and statistics generated by the CDBMS. For example, if the CDBMS monitors that 50% of the PDBs managed by the CDBMS require 16 CPUs, and the other 50% of the PDBs managed by the CDBMS require 8 CPUs, then the CDBMS may set the quota for each general nest in the general nest pool to be evenly split across the entire general nest pool, such that 50% of the general nests have a quota of 16 CPUs, and the other 50% of the general nests have a quota of 8 CPUs.

[0088] According to an embodiment, the attributes, properties, and namespaces associated with the generic nesting feature are captured as a nesting configuration profile, which is stored within the generic nesting infrastructure. The nesting configuration profile can specify characteristics and properties, such as which operating system resources are currently allocated or have been allocated to the generic nest. The nesting configuration profile is a feature of the database nesting, and when the generic nest is attached to a PDB and converted to a PDB nest, the nesting configuration profile will be retained with the generic nest. When the generic nest is established, a default profile is applied. The database administrator can customize the profile through database parameters and configuration files.

[0089] Figure 4 A pool of generic nests and PDBs with configuration profiles is illustrated. Generic nest pool 402 includes a plurality of generic nests 404, 406, 408, 410, 412, 414, 416, 418. As described above, each generic nest in generic nest pool 402 may include a nest configuration profile. Each generic nest in generic nest pool 402 may be assigned a different number of operating system resources than other generic nests of the generic nest pool. For example, generic nest 404 may be assigned 24 CPUs, and generic nest 410 may be assigned 8 CPUs. In addition, generic nest 406 may be assigned 24 CPUs, and generic nest 408 may be assigned 20 CPUs.

[0090] PDB Configuration Profile

[0091] According to an embodiment, the operating system resources associated with the PDB are captured as a PDB configuration profile stored in association with the PDB. When the PDB is first established, a default profile is applied. The database administrator can customize the profile through database parameters and configuration files, or can create a profile over time through a CDMBS that monitors the characteristics of the MBP. In an embodiment, the database dictionary can store each PDB configuration profile and a mapping to the corresponding PDB. In an embodiment, the PDB configuration profile includes information about the isolation characteristics of the CPU, memory, process usage, and the PDB.

[0092] For example, Figure 4 A plurality of PDBs with corresponding PDB configuration profiles are illustrated. Each PDB 420, 422, 424, 426 is associated with a PDB configuration profile. The PDB configuration profile of each PDB 420, 422, 424, 426 can specify the attributes and characteristics of each corresponding PDB. For example, the PDB configuration profile for PDB 420 can specify that PDB 420 utilizes 24 CPUs, and the PDB configuration profile for PDB 422 can specify that PDB 422 utilizes 8 CPUs.

[0093] Assigning and configuring common nesting

[0094] Before a user can establish a session with a PDB, the PDB must be open. A user can request to open the PDB. Alternatively, a user can request a database session, and if the PDB is not open, the request is received as a request to open the PDB.

[0095] Once the PDB is opened, the database server establishes a database session for the PDB. Establishing a database session for the PDB requires establishing the database dictionary of the PDB as the database dictionary of the database session and assigning a database nest to the PDB.

[0096] In order to assign a database nest to a PDB, the database dictionary of the PDB is scanned to determine which database nest is assigned to the PDB. If it is determined that the database dictionary has a database nest assigned to the PDB, the database nest mapped to the PDB is established as the database nest for the database session.

[0097] If it is determined that the database dictionary does not map a database nest to the PDB, or if it is determined that the database dictionary maps a generic nest pool to the PDB, the database server determines a matching generic nest from the generic nest pool.

[0098] To determine a match, the database server compares the configuration profile of the PDB to the nest configuration profile of each generic nest in the generic nest pool. The generic nest that most closely matches the PDB configuration is selected as the matching generic nest. For example, if the PDB configuration file of the PDB specifies 16 CPUs, and the nest profile of a particular generic nest specifies 14 CPUs and is the closest match to the remaining nests in the generic nest pool, then the particular generic nest is selected as the matching generic nest.

[0099] In case the general nesting of coupling is selected for PDB, the general nesting of coupling is assigned to PDB and configured based on the PDB configuration profile of PDB.For example, if the PDB configuration profile of PDB specifies various namespace isolation features (such as system call, CPU and network isolation) required, these features can be added to PDB nesting at runtime so.In addition, if the PDB configuration profile of PDB specifies the distribution of operating system resources that are not accurately matched with the nesting configuration profile, operating system resources such as CPU and memory can be distributed to general nesting so, to accurately match the PDB configuration profile of PDB.For example, if selected general nesting distributes 14 CPUs, and the PDB configuration profile of PDB specifies 16 CPUs, can be nested for PDB to distribute 2 CPUs in addition at runtime so.

[0100] Figure 4A generic nest pool and a plurality of PDBs are illustrated. Generic nests 404, 406, 408, 410, 412, 414, 416, 418 in a generic nest pool 402 are available for assignment to PDBs 420, 422, 424, 426. As discussed above, when a database server establishes a database session for a PDB, the database server determines a matching generic nest from the generic nest pool 402. The PDB configuration profile associated with the PDBs 420, 422, 424, 426 matches the nest configuration profile associated with the generic nests 404, 406, 408, 410, 412, 414, 416, 418. For example, if the PDB configuration profile associated with PDB 420 specifies that PDB 420 requires 24 CPUs, and the nesting profile associated with generic nest 404 specifies that 24 CPUs are allocated to generic nest 404, then a match is determined between generic nest 404 and PDB 420. In another example, if the PDB configuration profile associated with PDB 420 specifies that PDB 420 requires 24 CPUs, and the nesting profile associated with generic nest 404 specifies that 20 CPUs are allocated to generic nest 404, then after determining that generic nest 404 is the best or closest match to PDB 420, generic nest 404 may be assigned to PDB 420. After generic nest 404 is assigned to PDB 420, generic nest 404 may be allocated 4 more CPUs during runtime to meet the 24 CPU requirement of the PDB configuration profile of PDB 420.

[0101] Recover idle PDB nesting

[0102] The database server can detect that the PDB is idle, and the database nest or general nest assigned to the PDB can be deprived from the operating system resources allocated thereto. Detecting that the PDB is idle can include that the database server identifies that the database session of the PDB is not active within a threshold amount of time. If the database server detects that the PDB is idle, the PDB nest assigned to the PDB can be deprived from the operating system resources allocated (reducing quota). Then, the deprived operating system resources can be reallocated to the general nest by the PDB nest, and the general nest is added to the general nest pool, or a new general nest is created in a background process, and the new general nest is added to the general nest pool.

[0103] Example Process

[0104] Figure 5 An example process for intelligently pooling isolated tiered runtimes in a multi-tenant environment is illustrated. For illustration purposes, DBMS 108 is used to discuss Figure 5 The process flow depicted in .

[0105] At step 502, an operating system resource allocation of the CDBMS is allocated to each universal nest in the universal nest pool. The allocation includes a quota for one or more processors and a quota for memory. For a particular universal nest in the universal nest pool, the amount of operating system resources in the operating system resource allocation allocated to the particular universal nest is different from the amount of operating system resources in the operating system resource allocation allocated to at least another universal nest in the universal nest pool.

[0106] At step 504, a PDB configuration profile is determined for a particular PDB in the CDBMS.

[0107] At step 506, a matching generic nest is determined from the generic nest pool based on the PDB configuration profile determined for the particular PDB.

[0108] At step 508, the matching generic nesting is assigned to a specific PDB.

[0109] At step 510, a matching generic nesting is configured for a particular PDB.

[0110] Software Overview

[0111] Figure 6 Can be used to control Figure 7 6 is a block diagram of a basic software system 600 for the operation of a computing system 700. The software system 600 and its components, including their connections, relationships, and functions, are merely exemplary and are not meant to limit implementation of the example embodiment(s). Other software systems suitable for implementing the example embodiment(s) may have different components, including components with different connections, relationships, and functions.

[0112] Software system 600 is provided for directing the operation of computing system 700. Software system 600, which may be stored on system memory (RAM) 706 and storage devices (eg, hard disk or flash memory) 710, includes a kernel or operating system (OS) 610.

[0113] The OS 610 manages low-level aspects of computer operation, including managing the execution of processes, memory allocation, file input and output (I / O), and device I / O. One or more applications, represented as 602A, 602B, 602C ... 602N, may be "loaded" (e.g., transferred from storage device 710 into memory 706) for execution by the system 600. Applications or other software intended for use on the computer system 700 may also be stored as a downloadable set of computer-executable instructions, for example, for downloading and installation from an Internet location (e.g., a Web server, app store, or other online service).

[0114] The software system 600 includes a graphical user interface (GUI) 615 for receiving user commands and data in a graphical (e.g., "click" or "touch gesture") manner. In turn, these inputs can be operated by the system 600 according to instructions from the operating system 610 and / or (one or more) applications 602. The GUI 615 is also used to display the results of operations from the OS 610 and (one or more) applications 602, and the user can provide additional input or terminate the session (e.g., log out).

[0115] The OS 610 may execute directly on the bare hardware 620 (e.g., processor(s) 704) of the computer system 700. Alternatively, a hypervisor or virtual machine monitor (VMM) 630 may be inserted between the bare hardware 620 and the OS 610. In this configuration, the VMM 630 acts as a software "buffer" or virtualization layer between the OS 610 and the bare hardware 620 of the computer system 700.

[0116] VMM 630 instantiates and runs one or more virtual machine instances ("guest machines"). Each guest machine includes a "guest" operating system (such as OS 610), and one or more applications (such as (one or more) applications 602) designed to execute on the guest operating system. VMM 630 presents a virtual operating platform to the guest operating system and manages the execution of the guest operating system.

[0117] In some cases, VMM 630 can allow a guest operating system to run as if it were running directly on bare hardware 620 of computer system 700. In these instances, the same version of the guest operating system that is configured to execute directly on bare hardware 620 can also execute on VMM 630 without modification or reconfiguration. In other words, VMM 630 can provide full hardware and CPU virtualization to guest operating systems in some cases.

[0118] In other cases, the guest operating system may be specially designed or configured to execute on VMM 630 to improve efficiency. In these instances, the guest operating system is "aware" that it is executing on a virtual machine monitor. In other words, VMM 630 may provide paravirtualization to the guest operating system in some cases.

[0119] A computer system process includes an allocation of hardware processor time, as well as an allocation of memory (physical and / or virtual), an allocation of memory for storing instructions executed by the hardware processor, for storing data generated by the execution of instructions by the hardware processor, and / or for storing hardware processor state (e.g., contents of registers) between allocations of hardware processor time when the computer system process is not running. A computer system process runs under the control of an operating system and may run under the control of other programs executing on the computer system.

[0120] Multiple threads can run in a process. Each thread also includes an allocation of hardware processing time, but shares access to the memory allocated to the process. When the threads are not running, the memory is used to store the contents of the processor between allocations. The term thread can also be used to refer to a computer system process when multiple threads are not running.

[0121] cloud computing

[0122] The term "cloud computing" is used generally herein to describe a computing model that enables on-demand access to a shared pool of computing resources, such as computer networks, servers, software applications, and services, and allows resources to be rapidly provisioned and released with minimal management effort or service provider interaction.

[0123] A cloud computing environment (sometimes referred to as a cloud environment or just a cloud) can be implemented in a variety of different ways to best suit different requirements. For example, in a public cloud environment, the underlying computing infrastructure is owned by an organization that makes its cloud services available to other organizations or the public. In contrast, a private cloud environment is generally intended for use by or within a single organization. A community cloud is intended to be shared by several organizations within a community; while a hybrid cloud includes two or more types of clouds (e.g., private, community, or public) bound together by data and application portability.

[0124] In general, the cloud computing model enables some of those responsibilities that might previously have been provided by an organization's own information technology department to instead be delivered as a service layer within a cloud environment for use by consumers (either inside or outside the organization, depending on the public / private nature of the cloud). Depending on the specific implementation, the precise definition of the components or features provided by or within each cloud service layer may vary, but common examples include: Software as a Service (SaaS), in which consumers use software applications running on a cloud infrastructure, while the SaaS provider manages or controls the underlying cloud infrastructure and applications. Platform as a Service (PaaS), in which consumers can use software programming languages ​​and development tools supported by the supplier of the PaaS to develop, deploy, and otherwise control their own applications, while the PaaS provider manages or controls other aspects of the cloud environment (i.e., everything under the runtime execution environment). Infrastructure as a Service (IaaS), in which consumers can deploy and run arbitrary software applications, and / or provide processes, storage, networks, and other basic computing resources, while the IaaS provider manages or controls the underlying physical cloud infrastructure (i.e., everything below the operating system layer). Database as a Service (DBaaS), in which the consumer uses a database server or database management system running on a cloud infrastructure, while the DbaaS provider manages or controls the underlying cloud infrastructure, applications, and servers, including one or more database servers.

[0125] The above basic computer hardware and software and cloud computing environment are presented to illustrate the basic underlying computer components that can be used to implement the (one or more) example embodiments. However, the (one or more) example embodiments are not necessarily limited to any particular computing environment or computing device configuration. Alternatively, according to the present disclosure, the (one or more) example embodiments can be implemented in any type of system architecture or processing environment that a person skilled in the art will understand as being capable of supporting the features and functions of the (one or more) example embodiments presented herein.

[0126] Hardware Overview

[0127] According to one embodiment, the technology described herein is implemented by one or more special-purpose computing devices. The special-purpose computing device can be hard-wired to perform the present technology, or can include a digital electronic device that is permanently programmed to perform the present technology, such as one or more application-specific integrated circuits (ASICs) or field programmable gate arrays (FPGAs), or can include one or more general-purpose hardware processors that are programmed to perform the present technology according to program instructions in firmware, memory, other storage devices, or combinations. This special-purpose computing device can also combine customized hard-wired logic, ASICs or FPGAs with customized programming to implement the present technology. The special-purpose computing device can be a desktop computer system, a portable computer system, a handheld device, a networking device, or any other device that combines hard-wired and / or program logic to implement the technology.

[0128] For example, Figure 7 700 is a block diagram illustrating a computer system 700 upon which embodiments of the present invention may be implemented. Computer system 700 includes a bus 702 or other communication mechanism for communicating information and a hardware processor 704 coupled with bus 702 for processing information. Hardware processor 704 may be, for example, a general purpose microprocessor.

[0129] The computer system 700 also includes a main memory 706, such as a random access memory (RAM) or other dynamic storage device, coupled to the bus 702 for storing information and instructions to be executed by the processor 704. The main memory 706 may also be used to store temporary variables or other intermediate information during execution of instructions to be executed by the processor 704. Such instructions, when stored in a non-transitory storage medium accessible to the processor 704, cause the computer system 700 to become a special-purpose machine customized to perform the operations specified in the instructions.

[0130] Computer system 700 also includes a read only memory (ROM) 708 or other static storage device coupled to bus 702 for storing static information and instructions for processor 704. A storage device 710, such as a magnetic or optical disk, is provided and coupled to bus 702 for storing information and instructions.

[0131] The computer system 700 may be coupled via the bus 702 to a display 712, such as a cathode ray tube (CRT), for displaying information to a computer user. An input device 714, including alphanumeric and other keys, is coupled to the bus 702 for communicating information and command selections to the processor 704. Another type of user input device is a cursor control 716, such as a mouse, trackball, or cursor direction keys, for communicating direction information and command selections to the processor 704 and for controlling cursor movement on the display 712. Such input devices typically have two degrees of freedom in two axes, a first axis (e.g., x) and a second axis (e.g., y), to allow the device to specify a position in a plane.

[0132] The computer system 700 may implement the techniques described herein using custom hardwired logic, one or more ASICs or FPGAs, firmware, and / or program logic that, in combination with the computer system, makes the computer system 700 a special purpose machine or programs the computer system 700 to be a special purpose machine. According to one embodiment, the techniques herein are performed by the computer system 700 in response to the processor 704 executing one or more sequences of one or more instructions contained in the main memory 706. These instructions may be read into the main memory 706 from another storage medium, such as the storage device 710. Execution of the sequences of instructions contained in the main memory 706 causes the processor 704 to perform the process steps described herein. In alternative embodiments, hardwired circuitry may be used in place of or in combination with software instructions.

[0133] The term "storage medium" as used herein refers to any non-transitory medium that stores data and / or instructions that cause a machine to operate in a particular manner. Such storage media may include non-volatile media and / or volatile media. Non-volatile media include, for example, optical or magnetic disks, such as storage device 710. Volatile media include dynamic memory, such as main memory 706. Common forms of storage media include, for example, floppy disks, flexible disks, hard disks, solid-state drives, magnetic tapes or any other magnetic data storage media, CD-ROMs, any other optical data storage media, any physical media with a hole pattern, RAM, PROM and EPROM, FLASH-EPROM, NVRAM, any other memory chip, or cassette tape.

[0134] Storage media are distinct from but may be used in conjunction with transmission media. Transmission media participate in the transfer of information between storage media. For example, transmission media include coaxial cables, copper wire, and optical fiber, including the wires that comprise bus 702. Transmission media may also take the form of acoustic or light waves, such as those generated during radio wave and infrared data communications.

[0135] Various forms of media may be involved in carrying one or more sequences of one or more instructions to the processor 704 for execution. For example, the instructions may initially be carried on a disk or solid-state drive of a remote computer. The remote computer can load the instructions into its dynamic memory and send the instructions over a telephone line using a modem. A modem local to the computer system 700 can receive the data on the telephone line and use an infrared transmitter to convert the data to an infrared signal. An infrared detector can receive the data carried in the infrared signal and appropriate circuitry can place the data on the bus 702. The bus 702 carries the data to the main memory 706, from which the processor 704 retrieves and executes the instructions. The instructions received by the main memory 706 may optionally be stored on the storage device 710 before or after execution by the processor 704.

[0136] Computer system 700 also includes a communication interface 718 coupled to bus 702. Communication interface 718 provides bidirectional data communication coupled to network link 720, wherein network link 720 is connected to local network 722. For example, communication interface 718 can be an integrated services digital network (ISDN) card, a cable modem, a satellite modem, or a modem that provides data communication connection to a telephone line of a corresponding type. As another example, communication interface 718 can be a LAN card that provides data communication connection to a compatible local area network (LAN). Wireless links can also be implemented. In any such implementation, communication interface 718 sends and receives electrical signals, electromagnetic signals, or optical signals that carry digital data streams representing various types of information.

[0137] The network link 720 typically provides data communication to other data devices through one or more networks. For example, the network link 720 can provide a connection to a host computer 724 or to data equipment operated by an Internet Service Provider (ISP) 726 through a local network 722. The ISP 726, in turn, provides data communication services through the global packet data communication network now commonly referred to as the "Internet" 728. Both the local network 722 and the Internet 728 use electrical, electromagnetic, or optical signals that carry digital data streams. The signals through the various networks and the signals on the network link 720 and through the communication interface 718 are example forms of transmission media that carry the digital data to or from the computer system 700.

[0138] Computer system 700 can send messages and receive data, including program code, through the network(s), network link 720, and communication interface 718. In the Internet example, server 730 can transmit the requested code for an application program through Internet 728, ISP 726, local network 722, and communication interface 718.

[0139] The received code may be executed by processor 704 as it is received, and / or stored in storage device 710 or other non-volatile storage for later execution.

[0140] In the foregoing specification, embodiments have been described with reference to numerous specific details that vary from implementation to implementation. Therefore, the specification and drawings should be regarded as illustrative rather than restrictive. The sole and exclusive indicator of the scope of the invention, and what the applicants intend as the scope of the invention, is the literal and equivalent range of the set of claims issuing from this application, in the specific form in which such claims issue, including any subsequent corrections.

Claims

1. A resource management method, comprising: Allocate operating system resource allocation isolated to a container database management system CDBMS to each universal nest in a universal nest pool for assignment to a plurality of pluggable databases PDBs, the allocation comprising a quota of one or more processors and a quota of memory, the CDBMS containing the plurality of PDBs; wherein each general purpose nest in said pool of general purpose nests is isolated to a respective allocation of said operating system resources; wherein, for a particular universal nest in the pool, an amount of operating system resources in an operating system resource allocation allocated to the particular universal nest is different from an amount of operating system resources in an operating system resource allocation allocated to at least another universal nest in the pool; Establishing a corresponding database session for each of the multiple PDBs, wherein establishing a corresponding database session for each PDB comprises: determining a PDB configuration profile for each of said PDBs, determining a matching generic nest from the pool based on a PDB configuration profile determined for each of the PDBs, the PDB configuration profile including information about CPU, memory, process usage, and isolation characteristics of the PDB, assigning the matching universal nesting to each of the PDBs, and Configuring a matching universal nesting for each of the PDBs, thereby converting the matching universal nesting into a PDB nesting assigned to each of the PDBs; How much operating system resources the database session can use is limited to the corresponding allocation of operating system resources allocated to the PDB nest.

2. The method of claim 1, wherein the allocation includes a quota of network resources, a quota of storage, a quota of processors, a system call set, and a quota of memory.

3. The method of claim 1, wherein each generic nest in the pool is associated with a nest configuration profile; Wherein for each PDB in the plurality of PDBs, determining a matching generic nest from the pool includes determining a closest match between a PDB configuration profile of the each PDB and a nest configuration file associated with a generic nest in the pool of generic nests.

4. The method of claim 1, wherein for each PDB in the plurality of PDBs, configuring a matching generic nest for the each PDB comprises modifying a set of operating system resources to which the matching generic nest is isolated. 5 . The method of claim 1 , wherein for each PDB in the plurality of PDBs, the matching generic nesting is configured based on a PDB configuration profile of the each PDB.

6. The method of claim 1, further comprising: Detecting that a specific PDB among the plurality of PDBs is idle; An allocation of operating system resources allocated to a PDB nest assigned to the particular PDB is deallocated.

7. The method of claim 6, further comprising: Based on the de-allocation, generating a new universal nest and adding the new universal nest to the universal nest pool; An operating system resource allocation is allocated to a new universal nest in the universal nest pool.

8. The method of claim 6, wherein detecting that the particular PDB is idle comprises identifying that a database session for the particular PDB has been inactive for a threshold amount of time.

9. One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause the method of any one of claims 1 to 8 to be performed.

10. A resource management system comprising one or more computing devices including components, implemented at least in part by computing hardware, the computing hardware being configured to implement the steps of any one of the methods recited in claims 1-8.

Citation Information

Patent Citations

  • Container database

    US20140095530A1