Shadow Experiments with Serverless Multitenant Cloud Services
The shadow query engine optimizes query execution in multi-tenant cloud services by determining optimal configuration parameters, reducing resource consumption, and maintaining performance.
Patent Information
- Application Number
- JP2023507272
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-08-04
- Filing Date
- 2021-08-02
- Publication Date
- 2025-08-06
- Estimated Expiration
- 2041-08-02
Smart Images

Figure 0007719577000001 
Figure 0007719577000002 
Figure 0007719577000003
Abstract
Description
[Technical Field]
[0001] The present invention relates generally to the field of query optimization, and more specifically to optimizing query execution in multi-tenant cloud services. [Background technology]
[0002] Information retrieval (IR) is the activity of obtaining resources related to an information need from a collection of information system resources. Searching can be based on full-text indexing or other content-based indexing. Information retrieval is the science of locating information within documents, searching the documents themselves as well as metadata that describes the data, and searching text, image, or audio databases. The information retrieval process begins when a user enters a query into a system. A query is a formal statement of an information need, such as a search string in a web search engine. In information retrieval, a query does not uniquely identify a single object in a collection. Instead, several objects may match the query, possibly with different degrees of relevance.
[0003] A cloud service is any service that is made available to users on demand over the Internet from a cloud computing provider's servers, rather than being delivered from a company's own on-premises servers. Cloud services are designed to provide easy and scalable access to applications, resources, and services and are fully managed by the cloud service provider. Cloud storage is a model of computer data storage in which digital data is stored in a logical pool. The physical storage is spread across multiple servers (sometimes in multiple locations), and the physical environment is typically owned and managed by a hosting company. These cloud storage providers are responsible for keeping the data available and accessible and ensuring that the physical environment remains protected and operational. People and organizations purchase or lease storage capacity from the provider to store user, organizational, or application data. Summary of the Invention
[0004] Aspects of the present invention disclose a method, computer program product, and system for query execution in a multitenant cloud service. The method includes one or more processors determining category classes for service queries. The method further includes one or more processors sending a selected number of service queries from one of the determined category classes to a shadow query engine for execution. Each of the service queries classified by category includes a different set of configuration parameter values for the shadow query engine. The method further includes one or more processors recording metadata for the selected number of service queries of one category class executed by the shadow query engine. The metadata includes performance data, a query category class, and at least one associated configuration parameter value. The method further includes one or more processors determining a correlation between the performance data, the query category class, and at least one associated configuration parameter value. The method further includes one or more processors determining optimal configuration parameter values, including optimal configuration parameters, for executing the selected number of service queries of the one category class from the determined correlation.
[0005] In another embodiment, the method further includes one or more processors applying a configuration based on the optimal configuration parameter values to an expanded set of service queries of the same category class in the shadow query engine. The method further includes one or more processors validating the applied configuration. In response to a positive validation result, the method further includes one or more processors executing future queries of the same category class in a query engine having identical characteristics to the shadow query engine using the configuration having the optimal configuration parameter values.
[0006] It should be noted that embodiments of the present invention are described with reference to different subject matters. In particular, some embodiments are described with reference to method-type claims, while other embodiments are described with reference to apparatus-type claims. However, those skilled in the art will infer from the above and following description that, unless otherwise notified, in addition to any combination of features belonging to one type of subject matter, any combination of features relating to different subject matters, in particular any combination of features of a method-type claim with features of an apparatus-type claim, is also considered to be disclosed in this document.
[0007] The above-defined and further aspects of the invention will be apparent from and will be explained with reference to the example embodiments described hereinafter, without the invention being limited thereto. Preferred embodiments of the invention will now be described, by way of example only, with reference to the following drawings, in which: [Brief explanation of the drawings]
[0008] [Figure 1] FIG. 1 is a block diagram illustrating an embodiment of the computer-implemented method of the present invention for optimizing query execution in a multi-tenant cloud service, in accordance with an embodiment of the present invention. [Figure 2] FIG. 2 is a block diagram illustrating a general setup between an application program and a query engine, according to an embodiment of the present invention. [Figure 3] 1 is a block diagram illustrating an embodiment of the proposed inventive concept, showing the main components, in accordance with an embodiment of the present invention; [Figure 4] FIG. 1 is a block diagram illustrating an embodiment of a query optimization system for optimizing query execution in a multi-tenant cloud service, in accordance with an embodiment of the present invention. [Figure 5] 5 illustrates an embodiment of a computer system including a query optimization system according to FIG. 4, in accordance with an embodiment of the present invention. [Figure 6] FIG. 1 illustrates a cloud computing environment according to an embodiment of the present invention. [Figure 7]FIG. 1 illustrates abstraction model layers according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0009] In the context of this description, the following conventions, terms or expressions, or combinations thereof, may be used:
[0010] The term "multitenant cloud service" may refer to a program that, when invoked for execution, receives data and sends results back to the invoking system, typically in a cloud computing environment. A detailed description of cloud computing environments can be found below. In either case, a multitenant cloud service may be made available to multiple users.
[0011] The term "service query" may refer to a call from a first service (i.e., a first executed partial program) to another service (i.e., another executed partial program, such as a query engine service), which includes parameter values for a query on data accessible to the second service. After executing the query, the second service may return the search data to the calling service (i.e., the first service). However, this general rule may be violated if a shadow query engine is invoked. Here, the query may be executed solely for the optimization process regarding configuration parameters for the related service. There is no need to send the search data back to the original service that initiated the service call to the (main) query engine (instead of the shadow query engine).
[0012] The term "shadow query engine" may refer to a program typically implemented as a service in a multi-tenant cloud computing environment that functions similarly to a productively used query engine or a query service for retrieving data from a database or another data storage. In particular, a shadow query engine may be configurable when invoked with the same types of configuration and execution parameters as the typical query engine in operational use. Thus, a shadow query engine may be considered a copy of the query engine in operational use. In certain embodiments, the query engine and shadow query engine may be implemented at least partially (or completely) in hardware.
[0013] The term "overprovisioned cloud computing environment" may indicate that a cloud computing environment may be implemented and configured to provide more computing and service resources than may normally be required by a large number of users and tenants. Excess capacity may be required to avoid degradation of response times during periods of peak demand for one or more tenants.
[0014] The term "machine learning-based system" may refer to a system or service that operates according to the teachings of the artificial intelligence paradigm. The system is not programmed to follow procedural instructions, but rather learns how to respond to incoming data based on learning by experimentation with well-accepted and understood concepts. Supervised, semi-supervised, and unsupervised learning concepts may thereby be used as part of the implementation of the concepts proposed herein. The learning concepts may be applied specifically to the classification task at hand, to classify historical queries into classes of queries. For example, the maximum number of classes to use may be a starting parameter for the machine learning service.
[0015] The term "Spark," specifically Apache Spark™ from the Apache Foundation, may refer to a well-known open-source distributed general-purpose cluster computing framework. Spark™ provides an interface for programming entire clusters with implicit data parallelism and fault tolerance.
[0016] The term "cloud computing" and its equivalent "cloud service environment" may be interpreted in this context as a model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction. The cloud model promotes availability and consists of at least five essential characteristics, three service models, and four deployment models:
[0017] Furthermore, cloud software takes full advantage of the cloud paradigm by being service-oriented with a focus on statelessness (with exceptions), low coupling, modularity, and semantic interoperability.
[0018] The proposed computer-implemented method for optimizing query execution in multi-tenant cloud services may provide multiple advantages, contributions, and technical effects.
[0019] Embodiments of the present invention recognize that the ever-increasing amount of structured, semi-structured, and unstructured data in enterprise storage systems continues to increase the demand for effective data management and data search tools. Therefore, to generate value from existing data lakes, more and more data must be analyzed, combined, and searched. This results in an increasing number of databases and a disproportionately large increase in queries against the data. Very often, enterprise data is stored, at least in part, in cloud storage systems and accessed by services operating in cloud computing environments. However, whether deployed on-premise or as cloud services, data search applications and services require increasingly more computational resources.
[0020] Accordingly, embodiments of the present invention further recognize that programmers are increasingly seeking efficient data search and query techniques, even in large cloud computing environments where query engines are often deployed as query services. Relational databases, in particular, whether row- or column-oriented, have been optimized for query performance for decades. In-memory computing and an ever-increasing number of caching systems are now being used to decrease database query response times. Thus, there is room and a need for better query techniques that help reduce the computational resources required for the same number of queries.
[0021] Embodiments of the present invention may enable continuous optimization of configuration parameter settings for a query engine, typically in a service-based, multi-tenant cloud computing environment. Example embodiments of the present invention can continuously explore numerous configuration variations at reasonable resource costs, using spare capacity that is typically available in a multi-tenant cluster system to weather peak demands, but that is unused during periods of normal resource consumption.
[0022] Thus, embodiments of the present invention can optimize complex systems without knowing how different configurations may change their behavior, and this can be achieved without impairing existing customer workloads and without negatively impacting the typical response times and resource consumption of typically deployed query engines.
[0023] Another advantage is that shadow execution by the shadow query engine can be synchronous or deferred (i.e., optimizations can be made based on historical queries), although in these cases the deferred execution may include handling access token expiration and changes to the input data set.
[0024] The following describes additional embodiments of this method that are also applicable to related systems. According to one acceptable embodiment of this method, the configuration parameters, or more precisely, the configuration parameter values, may include at least one selected from the group of memory size, buffer size, serialization option, compression parameter value, networking parameter value, scheduling-specific value, and execution option value. The values related to the configuration parameters may be Spark™-specific and may allow various tuning parameter values to affect the functionality of the shadow query engine and the actual query engine after the optimization process.
[0025] According to embodiments of the method, each service query may involve a database query. A variety of databases may be used, such as relational databases, object-oriented databases, semi-structured databases, content management systems, text search engines, non-SQL databases (structured query languages), and services such as Apache Solr™ (a well-known open source search engine) or another well-known open source search engine. Thus, the concepts proposed herein may be applied to virtually any database that is sensitive to the parameter settings of its execution environment, according to various embodiments of the present invention.
[0026] According to an advantageous embodiment of the method, a selected number of service queries of a category class may originate from a group of users. The group of users may be associated with a tenant in a multi-user cloud computing environment. Assuming equivalent queries pertain to a single tenant, query optimization may be tenant- or customer-specific. In another embodiment, the selected number of service queries may be associated with selected applications of a group of applications, such as an enterprise resource management system, a customer relationship management system, or a supply chain management system. Thus, query optimization may be application- or application-group-specific.
[0027] According to another advantageous embodiment of the method, the expanded set of service queries may originate from two or more groups of users. Thus, optimizations achieved from query examples from one tenant may be used for other tenants, i.e., other groups of users or application systems. Thus, query optimizations achieved for one user may be used for other customers without requiring the same amount of system resources to determine optimized configuration parameters.
[0028] According to one example embodiment of this method, the category classes may generally relate to data definition operations. In particular, the data definition operations may be, but are not limited to, SQL statements, spatial queries, time series queries, data join operations, write access, data deletion operations, and aggregation operations, union operations, data grouping operations, ordering statements, or string operations. Furthermore, this method may be applicable to any type of query in any type of database.
[0029] According to another advantageous embodiment of this method, the shadow query engine may be selected from a set of spare query engines in an over-provisioned cloud computing environment. Therefore, performance degradation of the production system may be measurable, and active users may not see any response time degradation. To achieve the flexibility and resilience for which cloud environment services are typically built, additional resources may be available in the cloud computing environment.
[0030] According to another example embodiment of this method, the optimal configuration parameter values may reflect (i.e., be a function of) at least one operational constraint selected from the group of latency, throughput, resource usage, and combinations thereof. Thus, different priorities for optimization may be selected by a system administrator.
[0031] According to one optional embodiment of this method, the categorical classes may be determined by applying a machine learning-based system to a set of historical queries to the query engine. The goal of these features may be to identify well-distinguishable classes. Supervised, semi-supervised, and unsupervised machine learning systems may be used for such classification tasks.
[0032] According to a further embodiment of this method, the multi-tenant cloud service may be a Spark™-based computing environment. Cloud computing environments based on Spark™ technology (e.g., any version of Apache® Spark™) are currently very common, and therefore a large community of users of such cloud computing environments would benefit from the application of the concepts proposed herein. However, the concepts of the present invention are not limited to Apache Spark™ and may also be implemented in other cloud computing frameworks.
[0033] A detailed description of the drawings is provided below. All instructions in the drawings are schematic. First, a block diagram of an embodiment of the inventive computer-implemented method for optimizing query execution in a multi-tenant cloud service, according to various embodiments of the present invention, is provided. Afterwards, further embodiments and implementations of a query optimization system for optimizing query execution in a multi-tenant cloud service, according to various embodiments of the present invention, are described.
[0034] FIG. 1 illustrates a block diagram of an example embodiment of a computer-implemented method 100 for optimizing query execution in a multi-tenant cloud service, in accordance with an embodiment of the present invention.
[0035] In step 102, the computer-implemented method 100 includes determining a category class for the service query. Then, in step 104, the computer-implemented method 100 includes submitting a selected number of service queries of one of the category classes (particularly for a duplicate separation experiment) to a shadow query engine for query execution. For example, each of the service queries classified by category includes a different set of configuration parameter values for the shadow query engine. The selected number of service queries of one of the category classes is relatively low compared to the total number of queries submitted for execution in a predetermined period of time. This period may be selected in the context of the underlying application requiring the query results. This period may be from a few seconds to an hour (e.g., 1 second, 10 seconds, 100 seconds, 1 minute, 10 minutes, or 1 hour), but may also be within approximately 10% of the total queries within the selected period of time. Additionally, the shadow query engine is equivalent in characteristics to the query engine actually used to execute the query.
[0036] In another embodiment, instead of each query of a class using different configuration parameters when executed by the shadow query engine, the shadow query engine may also execute the same query with different configuration parameters, which can facilitate the data volume being recorded and analyzed in the next step. In other embodiments, a mixture of both alternatives is considered a viable option.
[0037] At step 106, the computer-implemented method 100 further includes recording metadata for a selected number of service queries of one category class executed by the shadow query engine, whereby the metadata includes at least one selected from the group including performance data, query category class, and at least one value of an associated configuration parameter value. Thus, the computer-implemented method 100 can collect data describing the characteristics and actual functionality of the shadow query engine.
[0038] At step 108, the computer-implemented method 100 also includes determining a correlation. In various embodiments, the computer-implemented method 100 determines a correlation between the performance data, the query category classes, and at least one of the associated configuration parameter values. Then, at step 110, the computer-implemented method 100 includes determining optimal configuration parameter values from the correlation. In various embodiments, the optimal configuration parameter values include optimal configuration parameters for execution of a selected number of service queries of one of the category classes.
[0039] In step 112, the computer-implemented method 100 includes validating the configuration by applying the configuration with the initial optimal configuration parameter values for execution to an expanded set of service queries of the same class in the shadow query engine. The expanded set may result from a mix of queries from different users of the same tenant or different tenants (as opposed to a selected number of queries that may originate from only one user of one tenant in a multi-user cloud computing environment). In one example embodiment, the computer-implemented method 100 begins step 112 as a second phase of the process of FIG. 1 according to an embodiment of the present invention.
[0040] In step 114, computer-implemented method 100 includes, upon a positive validation result (from step 112), using the configuration having the optimal configuration parameter values for execution of future queries of the same category class in the primary or active query engine (as opposed to the shadow query engine). In an example embodiment, the query engine and the shadow query engine have identical characteristics. As a result of this method, optimized execution parameter value settings can be achieved for the active query engine based on the configuration parameter settings determined by the shadow query engine during idle time in the cloud computing environment.
[0041] 2 shows a block diagram of a general setup 200 between an application program 204 and a query engine 210, according to an embodiment of the present invention. The application program 204 may have a user interface 202. The user interface 202 can continuously generate queries, symbolized as different classes 206, 208, which are sent to the query engine 210 for execution, and the results of the queries are returned to the application program 204 as symbolized by a data path 214.
[0042] In various embodiments, the described functionality is implemented as a service in a cloud computing environment serving multiple tenants and users. In one additional embodiment, the search execution environment (i.e., configuration and / or resources) may not be maintained per tenant or user. The query engine 210 may be any type of engine, such as one implemented using the Spark™ computing framework. In another aspect, different query engines may be used by different tenants based on the appropriate query model. In this aspect, different shadow query engines may also be used. Thus, the defined system employs some over-provisioning to react to query request spikes. Thus, the system may have some spare capacity that may not normally be provisioned to customers (i.e., tenants).
[0043] In further embodiments, the query engine may be invoked with different configuration parameter value settings (e.g., memory size, serialization options, etc.), which may affect the execution characteristics (e.g., latency, throughput, etc.) of the instance(s) of the query engine(s). Some queries may only be executed with certain configurations due to possible errors such as out-of-memory. Additionally, the configuration parameter settings are determined by the query service and not by the user or further tenant. Furthermore, certain classes of queries require different configuration parameter settings for the best user experience for a given system capacity.
[0044] Thus, embodiments of the present invention recognize the need to solve optimization problems. Optimal configuration parameter values need to be selected on an ongoing basis to execute newly arriving queries. An appropriate set of configuration values needs to be selected so that the system is presented in an "idle" state. Thus, embodiments of the present invention recognize the need to solve and explore complex optimization problems involving a large space of variation. Additionally, teams running query engines may have limited insight into the internals of the query engine. Embodiments of the present invention recognize that typical known solutions rely on operator experience using a fixed, averaged set of configuration parameters. Furthermore, a selected set 212 of one class of queries is circled (in the representation of FIG. 2) and plays a role in FIG. 3.
[0045] FIG. 3 shows a block diagram of an example embodiment 300 of the proposed inventive concepts, illustrating the main components according to an embodiment of the present invention. Repeated from FIG. 2 are classes of queries 208, with associated selected sets of configuration parameter values 304. Also shown is a shadow query engine 302 that executes a selected set of queries 212 of a query class. In the example embodiment, the query engine 302 is specifically hidden from the user and is not in a production environment to return results to the user. In another example embodiment, the results of the query are not used for further processing, so the results serve no further purpose.
[0046] However, query execution metadata 308 is recorded in a specific storage area 306 and configured in association with the query and the selected set of configuration parameter values 304. Embodiments of the present invention can now activate a correlation unit 310 to determine a correlation between the class of query, the selected set of configuration parameter values, and the resulting performance data, such as memory usage, response time, throughput, etc. Based on the correlation analysis, embodiments of the present invention can then determine an optimal set 312 of configuration parameter values for the shadow query engine 302.
[0047] At decision 314, embodiments of the present invention may check whether the optimal set 312 is already based on an expansion set of queries for the selected class. If the optimal set 312 is not based on an expansion set of queries for the selected class (decision 314, NO branch), then the process returns to the beginning and repeats the aforementioned sequence of activities with an expansion set 208 of historical queries for the same class. In this second phase, embodiments of the present invention may test and determine whether the optimal configuration parameter values determined for the shadow query engine 302 remain the same for the selected set 212 of queries. If the optimal configuration parameter values determined for the shadow query engine 302 do not remain the same for the selected set 212 of queries, another set of selected sets 212 of queries is selected. Thus, embodiments of the present invention may continue to iterate the optimization process until an optimal set of configuration parameter values 312 for the shadow query engine 302 for the selected class of queries is determined. The expansion set 208 of historical queries may be selected from multiple tenants and / or users.
[0048] Thus, if an optimal configuration parameter value set 312 is found based on the expanded set 208 of historical queries for that class, embodiments of the present invention send the optimal configuration parameter setting value set to query engine 210 (FIG. 2) for use as configuration parameter values for future queries of the selected class (decision 314, YES branch).
[0049] This process is repeated for other (e.g., all) classes of queries. This allows embodiments of the present invention to utilize the specific capacity of the cloud computing environment. In various embodiments, the optimization process may occur only during times when the cloud computing environment has spare capacity, and not during peak usage times for cloud computing resources.
[0050] It is worth mentioning that sampling (i.e., selection of a selected number of queries in the selected set of queries 212) can be based on machine-learning (ML)-based clustering of queries based on a dedicated, predetermined distance function. The target class can be based on the constructs and / or operators used in the query (e.g., aggregations, geospatial joins, etc.) derived from the query parser. In addition, the classification of queries (e.g., distributed into more / fewer than n partitions) can be connected to features of the data used as input to the query, including spatial data originating from a specific source or targeting a predetermined data sink (e.g., reading from Kafka®, i.e., Apache Kafka® for stream processing) and written to a COS (i.e., Cloud Object Store). However, any other data source / sink combination is also possible.
[0051] 4 illustrates a block diagram of an embodiment of a query optimization system 400 for optimizing query execution in a multi-tenant cloud service, in accordance with an embodiment of the present invention. The query optimization system 400 includes first determining means, in particular a first determining unit 402, adapted to determine category classes for service queries. The query optimization system 400 further includes transmitter means, in particular a transmitter 404, adapted to transmit a selected number of service queries of one of the category classes to a shadow query engine for execution. According to various embodiments of the present invention, each of the categorized service queries thereby includes a different set of configuration parameter values for the shadow query engine.
[0052] Additionally, the query optimization system 400 includes a recording means, specifically a recorder 406, adapted to record metadata for a selected number of service queries of one category class executed by the shadow query engine. In an example embodiment, the metadata includes at least one selected from the group including performance data, query category classes, and at least one value of a related configuration parameter value, and a determining means, specifically a second determining unit 408, adapted to determine a correlation, e.g., at least one correlation between the performance data, query category classes, and at least one value of a related configuration parameter value, and the determining means. A third determining unit 410, specifically, is adapted to determine optimal configuration parameter values, including optimal configuration parameters, for executing the selected number of service queries of one of the category classes from the correlation.
[0053] The query optimization system 400 further includes application means, particularly application module 412, adapted to validate the configuration by applying the configuration having optimal configuration parameter values for execution to an expanded set of service queries of the same class in the shadow query engine. The transmitter means (i.e., transmitter 404) is also adapted, upon positive validation results, to use the configuration having the optimal configuration parameter values for future executions of queries of the same category class in the query engine. This allows the query engine and the shadow query engine to have identical characteristics in various embodiments.
[0054] It is understood that the units and modules of the query optimization system 400 are in communicative communication for signal exchange. In particular, the first determining unit 402, the transmitter 404, the recorder 406, the second determining unit 408, the third determining unit 410, and the application module 412 are communicatively connected in this manner. Alternatively, the units and modules may be in communicative communication via a system internal bus system 414.
[0055] Embodiments of the present invention may be implemented with virtually any type of computer, regardless of whether the platform is suitable for storing and / or executing program code. Figure 5 illustrates an example computer system 500 (e.g., at least one of many nodes in a multi-tenant cloud computing cluster) suitable for executing program code related to the proposed methods according to various embodiments of the present invention.
[0056] Regardless of whether computer system 500 is capable of implementing and / or performing any of the functions identified above, computer system 500 is merely one example of a suitable computer system and is not intended to suggest any limitation as to the scope of use or functionality of the embodiments of the present invention described herein. There are components within computer system 500 that operate with numerous other general-purpose or special-purpose computer system environments or configurations. Examples of well-known computer systems, environments, or configurations, or combinations thereof, that may be suitable for use with computer system / server 500 include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of the above systems or devices. Computer system / server 500 may be described in the general context of computer system-executable instructions, such as program modules, executed by computer system 500. Generally, program modules may include routines, programs, objects, components, logic, and data structures that perform particular tasks or implement particular abstract data types. The computer system / server 500 may also be practiced in a distributed cloud computing environment where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media, including memory storage devices.
[0057] 5, computer system / server 500 is depicted in the form of a general-purpose computing device. Components of computer system / server 500 may include, but are not limited to, one or more processors or processing units 502, a system memory 504, and a bus 506 that couples various system components, including system memory 504, to processor 502. Bus 506 may represent any one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MCA) bus, the Enhanced ISA (EISA) bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus. The computer system / server 500 typically includes a variety of computer system-readable media. Such media may be any available media that can be accessed by the computer system / server 500, including both volatile and nonvolatile media, removable and non-removable media.
[0058] System memory 504 may include computer-system-readable media in the form of volatile memory, such as random access memory (RAM) 508 and / or cache memory 510. Computer system / server 500 may also include other removable / non-removable, volatile / non-volatile computer-system storage media. By way of example only, a storage system 512 may be provided for reading from and writing to a non-removable, non-volatile magnetic medium (not shown, commonly referred to as a "hard drive"). Although not shown, a magnetic disk drive may be provided for reading from and writing to a removable, non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive may be provided for reading from or writing to a removable, non-volatile optical disk, such as a CD-ROM, DVD-ROM, or other optical medium. In such cases, each may be connected to bus 506 by one or more data media interfaces. As will be further shown and described below, memory 504 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of embodiments of the present invention.
[0059] A program / utility having a set (at least one) of program modules 516 may be stored in memory 504, for example and without limitation, in addition to an operating system, one or more application programs, other program modules, and program data. Each of the operating system, one or more application programs, other program modules, and program data, or any combination thereof, may include an implementation of a networked environment. The program modules 516 generally perform the functions and / or methods of embodiments of the present invention as described herein.
[0060] Additionally, computer system / server 500 may communicate with one or more external devices 518, such as a keyboard, pointing device, display 520, one or more devices that allow a user to interact with computer system / server 500, or any device (e.g., a network card, modem, etc.) that allows computer system / server 500 to communicate with one or more other computer devices, or a combination thereof. Such communication may occur via input / output (I / O) interface 514. Furthermore, computer system / server 500 may communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), or a public network (e.g., the Internet), or a combination thereof, via network adapter 522. As shown, network adapter 522 may communicate with other components of computer system / server 500 via bus 506. Although not shown, it should be understood that other hardware and / or software components may be used with computer system / server 500. Examples include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems.
[0061] Additionally, a query optimization system 400 for optimizing query execution in a multi-tenant cloud service may be attached to the bus system 506 .
[0062] Although this disclosure includes a detailed description of cloud computing, it should be understood that practice of the teachings described herein is not limited to cloud computing environments. Rather, embodiments of the present invention may be practiced in conjunction with any other type of computing environment now known or later developed.
[0063] Cloud computing is a service delivery model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) that can be rapidly provisioned and released with minimal management effort or interaction with the service provider. This cloud model may include at least five characteristics, at least three service models, and at least four deployment models.
[0064] The characteristics are as follows:
[0065] On-demand self-service. Cloud consumers can unilaterally provision computing capabilities, such as server time and network storage, as needed automatically and without human interaction with the service provider. Pervasive network access. Capabilities are available over the network and accessed through standard mechanisms that facilitate use by a variety of thin or thick client platforms (e.g., mobile phones, laptops, and PDAs).
[0066] Resource Pooling. To serve multiple consumers using a multi-tenant model, a provider's computing resources are pooled, with different physical and virtual resources dynamically allocated and reallocated according to demand. Consumers generally have no control or knowledge over the exact location of the resources provided, although there is a sense of location independence in that they may be able to identify a location at a higher level of abstraction (e.g., country, state, or data center).
[0067] Rapid Elasticity. Capabilities can be rapidly and elastically provisioned, sometimes automatically, to quickly scale out, and rapidly released to quickly scale in. To the consumer, the capabilities available for provisioning often appear unlimited, and any amount can be purchased at any time.
[0068] Metered services. Cloud systems automatically control and optimize resource usage by utilizing metering capabilities at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency to both providers and consumers of the services used.
[0069] The service model is as follows:
[0070] Software as a Service (SaaS). The functionality offered to the consumer is the use of the provider's applications running on a cloud infrastructure. The applications are accessible from a variety of client devices through thin-client interfaces, such as web browsers (e.g., web-based email). The consumer does not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, storage, or even individual application functions, except possibly for limited user-specific application configuration settings.
[0071] Platform as a Service (PaaS). The functionality offered to the consumer is the deployment of consumer-created or acquired applications, written using programming languages and tools supported by the provider, onto a cloud infrastructure. The consumer does not manage or control the underlying cloud infrastructure, including the network, servers, operating systems, or storage, but does have control over the deployed applications and possibly the application hosting environment configuration.
[0072] Infrastructure as a Service (IaaS). The functionality provided to the consumer is the provisioning of processing, storage, network, and other basic computing resources onto which the consumer can deploy and run any software, which may include operating systems and applications. The consumer does not manage or control the underlying cloud infrastructure, but does have control over the operating system, storage, deployed applications, and perhaps limited control over the selection of networking components (e.g., host firewalls).
[0073] The deployment model is as follows:
[0074] Private cloud: This cloud infrastructure is operated exclusively for one organization. It may be managed by that organization or a third party and may reside on-premises or off-premises. Community cloud: This cloud infrastructure is shared by multiple organizations to support a specific community with common concerns (e.g., mission, security requirements, policy, and compliance considerations). It may be managed by those organizations or a third party and may reside on-premises or off-premises.
[0075] Public cloud: This cloud infrastructure is made available to the general public or large industry groups and is owned by an organization that sells cloud services.
[0076] Hybrid cloud: This cloud infrastructure is a composite of two or more clouds (private, community, or public) that remain their own entities but are bound together by standard or proprietary technologies that enable data and application portability (e.g., cloud bursting for load balancing between clouds).
[0077] Cloud computing environments are service-oriented and focus on statelessness, low coupling, modularity, and semantic interoperability. At the heart of cloud computing is an infrastructure that includes a network of interconnected nodes.
[0078] Referring now to FIG. 6 , an exemplary cloud computing environment 50 is shown. As shown, the cloud computing environment 50 includes one or more cloud computing nodes 10 with which local computing devices used by cloud consumers, such as a personal digital assistant (PDA) or mobile phone 54A, a desktop computer 54B, a laptop computer 54C, or an automotive computer system 54N, or any combination thereof, may communicate. The nodes 10 may also communicate with each other. These nodes may be physically or virtually grouped (not shown) in one or more networks, such as the private, community, public, or hybrid clouds described above, or any combination thereof. This enables the cloud computing environment 50 to provide infrastructure, platform, or software, or any combination thereof, as a service for which cloud consumers are not required to maintain resources on their local computing devices. It will be understood that the types of computing devices 54A-N shown in FIG. 6 are intended to be exemplary only, and that computing node 10 and cloud computing environment 50 can communicate with any type of computing device through any type of network or network-addressable connection (e.g., using a web browser) or both.
[0079] Referring now to Figure 7, a set of functional abstraction layers provided by cloud computing environment 50 (Figure 6) is shown. It should be understood in advance that the components, layers, and functions shown in Figure 7 are intended to be merely exemplary, and embodiments of the present invention are not limited thereto. As shown, the following layers and corresponding functions are provided:
[0080] Hardware and software layer 60 includes hardware and software components. Examples of hardware components include mainframe 61, RISC (Reduced Instruction Set Computer) architecture-based servers 62, servers 63, blade servers 64, storage devices 65, and network and network forming components 66. In some embodiments, software components include network application server software 67 and database software 68.
[0081] The virtualization layer 70 provides an abstraction layer from which the following examples of virtual entities may be provided: virtual servers 71, virtual storage 72, virtual networks including virtual private networks 73, virtual applications and operating systems 74, and virtual clients 75.
[0082] In one example, the management layer 80 may provide the following functions: Resource provisioning 81 provides dynamic procurement of computing and other resources used to perform tasks within the cloud computing environment. Metering and pricing 82 provides cost tracking as resources are used within the cloud computing environment and billing or invoicing for the consumption of these resources. In one example, these resources may include application software licenses. Security provides identity verification for cloud consumers and tasks, as well as protection of data and other resources. User portal 83 provides access to the cloud computing environment for consumers and system administrators. Service level management 84 provides allocation and management of cloud computing resources to ensure required service levels are met. Service level agreement (SLA) planning and fulfillment 85 provides advance arrangements for and procurement of cloud computing resources where future demand is predicted by SLAs.
[0083] Workload layer 90 provides examples of functions for which a cloud computing environment may be used. Examples of workloads and functions that may be provided from this layer include mapping and navigation 91, software development and lifecycle management 92, virtual classroom instruction delivery 93, data analytics processing 94, transaction processing 95, and software 96. In various embodiments of the invention, software 96 represents a query optimization system, such as query optimization system 400 of FIG. 4.
[0084] The programs described herein are identified based on the application for which they are implemented in particular embodiments of the invention, but it should be understood that any particular program organization herein is used merely for convenience, and thus the invention should not be limited to use in any particular application identified and / or implied by such organization.
[0085] The present invention may be a system, method, or computer program product, or combination thereof, integrated at any possible level of technical detail. The computer program product may include a computer-readable storage medium (or media) having computer-readable program instructions for causing a processor to perform aspects of the present invention.
[0086] A computer-readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes: Portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanically encoded devices such as punch cards or raised structures in grooves with recorded instructions, and any suitable combination of the foregoing. As used herein, computer-readable storage medium should not be construed as referring to transitory signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., light pulses passing through fiber optic cable), or electrical signals transmitted through wires.
[0087] The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium into each computing / processing device, or may be downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof. The network may include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, or edge servers, or a combination thereof. A network adapter card or network interface within each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to a computer-readable storage medium within the respective computing / processing device for storage.
[0088] Computer-readable program instructions for carrying out the operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, configuration data for an integrated circuit, or source or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk or C++, and procedural programming languages such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., over the Internet using an Internet Service Provider). In some embodiments, electronic circuitry, including, for example, programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may execute computer-readable program instructions by using state information of the computer-readable program instructions to personalize the electronic circuitry to perform aspects of the present invention.
[0089] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0090] These computer-readable program instructions may be provided to a processor of a computer or other programmable data processing apparatus to produce a machine, such that the instructions, executed by the processor of the computer or other programmable data processing apparatus, cause the computer to implement the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams. These computer-readable program instructions may also be stored on a computer-readable storage medium that can instruct a computer, programmable data processing apparatus, or other device, or combination thereof, to function in a particular manner, such that the computer-readable storage medium on which the instructions are stored includes instructions that implement aspects of the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams.
[0091] The computer-readable program instructions may also be loaded into a computer, other programmable data processing apparatus, or other device to cause the computer, other programmable apparatus, or other device to perform a series of operational steps to create a computer-implemented process, such that the instructions executed on the computer, other programmable apparatus, or other device implement the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams.
[0092] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowcharts or block diagrams may represent a module, segment, or portion of instructions, which includes one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions shown in the blocks may occur in a different order than that shown in the figures. For example, two blocks shown in succession may actually be accomplished as a single step, may be executed concurrently, may be executed substantially concurrently in a partially or fully overlapping manner, or the blocks may sometimes be executed in the reverse order, depending on the functionality involved. In addition, it will be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a special-purpose hardware-based system that performs the specified functions or operations or executes a combination of special-purpose hardware and computer instructions.
[0093] The description of various embodiments of the present invention has been provided for illustrative purposes and is not intended to be exhaustive or limiting to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the present invention. The terms used herein have been selected to best explain the principles of the embodiments, practical applications or technical improvements to technology found in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. 1. A computer-implemented method for query execution in a multi-tenant cloud service by computer information processing, the computer-implemented method comprising: determining, by one or more processors, a category class for the service query; sending, by one or more processors, a selected number of service queries from one of the determined category classes to a shadow query engine for execution, wherein each service query of the categorized service queries includes a different set of configuration parameter values for the shadow query engine; recording, by one or more processors, metadata for the selected number of service queries of a category class executed by the shadow query engine, the metadata including performance data, query category class, and at least one value of an associated configuration parameter value; determining, by one or more processors, a correlation between the performance data, the query category class, and at least one value of the associated configuration parameter value; determining, by one or more processors, optimal configuration parameter values from the determined correlations, the optimal configuration parameters including optimal configuration parameters for executing the selected number of service queries of the one category class; 11. A computer-implemented method comprising:
2. applying, by one or more processors, a configuration based on the optimal configuration parameter values to an expanded set of service queries of the same category class in the shadow query engine; verifying, by one or more processors, the applied configuration; and responsive to a positive validation result, executing, by one or more processors, future queries of the same category class on a query engine having the same characteristics as the shadow query engine using the configuration having the optimal configuration parameter values; The computer-implemented method of claim 1 , further comprising:
3. 3. The computer-implemented method of claim 1, wherein the optimal configuration parameter values include at least one selected from the group consisting of memory size, buffer size, serialization option, compression parameter value, networking parameter value, scheduling specific value, and execution option value.
4. The computer-implemented method of any one of claims 1 to 3, wherein each of the service queries relates to a database query.
5. The computer-implemented method of any one of claims 1 to 4, wherein the selected number of service queries of the one category class originate from one group of users.
6. The computer-implemented method of claim 2 , wherein the expanded set of service queries originates from two or more groups of users.
7. The computer-implemented method of any one of claims 1 to 6, wherein the category classes relate to data definition operations.
8. 8. The computer-implemented method of claim 7, further comprising selecting, by one or more processors, the shadow query engine from a set of spare query engines in an over-provisioned cloud computing environment.
9. The computer-implemented method of any one of claims 1 to 8, wherein the optimal configuration parameter values reflect at least one operational constraint selected from the group consisting of latency, throughput, and resource usage.
10. 10. The computer-implemented method of claim 1, further comprising: determining, by one or more processors, the category classes by applying a machine learning based system to a set of historical queries to the query engine.
11. 11. A computer program for query execution in a multi-tenant cloud service, the computer program causing a computer system to perform the computer-implemented method of any one of claims 1 to 10.
12. 1. A computer system for query execution in a multi-tenant cloud service, the computer system comprising: determining a category class for the service query; program instructions for submitting a selected number of service queries from one of the determined category classes to a shadow query engine for execution, wherein each service query of the categorized service queries includes a different set of configuration parameter values for the shadow query engine; recording metadata for the selected number of service queries of a category class executed by the shadow query engine, the metadata including performance data, query category class, and at least one value of an associated configuration parameter value; determining a correlation between the performance data, the query category class, and at least one value of the associated configuration parameter value; determining optimal configuration parameter values, including optimal configuration parameters, for executing the selected number of service queries of the one category class from the determined correlations; A computer system that performs operations including:
13. applying the configuration based on the optimal configuration parameter values to an expanded set of service queries of the same category class in the shadow query engine; verifying the applied configuration; and responsive to a positive validation result, using the configuration having the optimal configuration parameter values to execute future queries of the same category class on a query engine having identical characteristics as the shadow query engine; 13. The computer system of claim 12, further comprising:
14. 14. The computer system of claim 12 or 13, wherein the optimal configuration parameter values include at least one selected from the group consisting of memory size, buffer size, serialization option, compression parameter value, networking parameter value, scheduling specific value, and execution option value.
15. The computer system of any one of claims 12 to 14, wherein each of the service queries relates to a database query.
16. The computer system according to any one of claims 12 to 15, wherein the selected number of service queries of the one category class originate from one group of users.
17. The computer system of any one of claims 12 to 16, wherein the optimal configuration parameter values reflect at least one operational constraint selected from the group consisting of latency, throughput, and resource usage.
18. A computer-readable storage medium having the computer program of claim 11 recorded thereon.
Citation Information
Patent Citations
Method and system for optimizing database parameters
CN103853786A
Performance tuning method of data base management system
JP1995244675A
Data processor
JP1998214213A
Data base server, program, recording medium, and control method
JP2005327138A
Automated configuration parameter tuning for database performance
US20200125545A1