Content-Aware Node Selection for Container Creation

Through the content-aware node selection method, selecting the appropriate computing node to create containers based on the container image list and mapping index, solving the problem of low container image delivery and storage efficiency and realizing more efficient container image management.

CN114528065BActive Publication Date: 2025-08-01INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111313205.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-11-09
Filing Date
2021-11-08
Publication Date
2025-08-01
Estimated Expiration
2041-11-08

AI Technical Summary

Technical Problem

The delivery and storage procedures of existing container images are slow and I/O-intensive, resulting in high network utilization and storage load, and are costly.

Method used

By receiving a list of container images, identifying the mapping index of the computing node cluster, and selecting the computing node to create a container based on the comparison of the inventory and mapping index, realizing content-aware node selection.

Benefits of technology

It reduces network traffic and storage requirements during container creation, improves the delivery efficiency of container mirroring, and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114528065B_ABST
    Figure CN114528065B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to content-aware node selection for container creation. According to one embodiment, a computer-implemented method includes: receiving a manifest of a container image for a container to be created; identifying a mapping index for a cluster of compute nodes; and selecting a compute node within the cluster of compute nodes for creating the container based on a comparison of the manifest and the mapping index.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] The present invention relates to hardware virtualization, and more particularly, to creating and deploying container images.

[0002] Modern application deployment typically relies on the use of containers. For example, container images are distributed via a central registry, and in order to start a container, a host pulls the container image and uses the container image to create a root file system for the container. The number of container images and the speed of container deployment are increasing rapidly.

[0003] However, there are several problems with the current implementation of container images. For example, containers currently start up slowly and are I / O intensive because they need to download and store large container images, resulting in high utilization of local memory and / or storage devices. Transferring large container images over a communication network also results in high network utilization and high load on the registry service storage subsystem. Therefore, the current transfer and storage of container images are bulky and expensive.

[0004] Therefore, there is a need for a faster and more efficient way to store and distribute container images. Summary of the Invention

[0005] According to one embodiment, a computer-implemented method includes: receiving a manifest of a container image for a container to be created; identifying a mapping index for a cluster of computing nodes; and selecting, based on a comparison of the manifest and the mapping index, a computing node within the cluster of computing nodes for creating the container.

[0006] According to another embodiment, a computer program product for performing content-aware node selection for container creation, the computer program product including a computer-readable storage medium having program instructions embodied thereon, wherein the computer-readable storage medium itself is not a transient signal, and the program instructions are executable by a processor to cause the processor to perform a method, the method including: receiving, by the processor, a manifest of a container image for a container to be created; identifying, by the processor, a mapping index for a cluster of computing nodes; and selecting, by the processor, a computing node within the cluster of computing nodes for creating the container based on a comparison of the manifest and the mapping index.

[0007] According to another embodiment, a system includes: a processor; and logic integrated with the processor, the logic being executable by the processor or integrated with and executable by the processor, the logic being configured to: receive a manifest of a container image for a container to be created; identify a mapping index for a cluster of computing nodes; and select, based on a comparison of the manifest and the mapping index, a computing node within the cluster of computing nodes for creating the container.

[0008] Other aspects and embodiments of the present invention will become apparent from the following detailed description, which illustrates the principles of the invention by way of example when taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 A cloud computing environment is depicted in accordance with one embodiment of the present invention.

[0010] Figure 2 An abstract model layer is depicted in accordance with one embodiment of the present invention.

[0011] Figure 3 A cloud computing node is depicted in accordance with one embodiment of the present invention.

[0012] Figure 4 A flowchart illustrating a method for performing content-aware node selection for container creation in accordance with one embodiment of the present invention is shown.

[0013] Figure 5 An exemplary system architecture is shown in accordance with one embodiment of the present invention. DETAILED DESCRIPTION

[0014] The following description is made for the purpose of illustrating the general principles of the present invention and is not meant to limit the inventive concept claimed herein. Further, the specific features described herein may be used in combination with each of the other described features in different possible combinations and permutations.

[0015] Unless otherwise expressly defined herein, all terms will be given their broadest possible interpretation, including meanings implied from the specification and understood by those skilled in the art and / or as defined in dictionaries, treatises, etc.

[0016] It must also be noted that, as used in this specification and the appended claims, the singular forms "a", "an" and "the" include plural referents unless otherwise specified. It will be further understood that when the terms "comprises" and / or "comprising" are used in this specification, they specify the presence of the stated features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0017] The following description discloses several embodiments for performing content-aware node selection for container creation.

[0018] In one general embodiment, a computer-implemented method includes: receiving a manifest of a container image for a container to be created; identifying a mapping index for a cluster of computing nodes; and selecting a computing node within the cluster of computing nodes for creating the container based on a comparison of the manifest and the mapping index.

[0019] In another general embodiment, a computer program product for performing content-aware node selection for container creation, the computer program product including a computer-readable storage medium having program instructions embodied therewith, wherein the computer-readable storage medium itself is not a transient signal, the program instructions being executable by a processor to cause the processor to perform a method, the method including: receiving, by the processor, a manifest of a container image for a container to be created; identifying, by the processor, a mapping index for a cluster of compute nodes; and selecting, by the processor, a compute node within the cluster of compute nodes for creating the container based on a comparison of the manifest and the mapping index.

[0020] In another general embodiment, a system includes: a processor; and logic integrated with or integrated with and executable by the processor, the logic being configured to: receive a manifest of a container image for a container to be created; identify a mapping index for a cluster of compute nodes; and select a compute node within the cluster of compute nodes for creating the container based on a comparison of the manifest and the mapping index.

[0021] It should be understood that although this disclosure includes a detailed description of cloud computing, the implementation of the teachings recited herein is not limited to a cloud computing environment. Instead, embodiments of the present invention are capable of being implemented in conjunction with any other type of computing environment now known or later developed.

[0022] 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 devices, applications, virtual machines, and services), which can be rapidly provisioned and released with minimal management effort or interaction with the service provider. The cloud model can include at least five characteristics, at least three service models, and at least four deployment models.

[0023] The characteristics are as follows:

[0024] On-demand self-service: Cloud consumers can unilaterally and automatically provision computing capabilities, such as server time and network storage, as needed without human interaction with the service provider.

[0025] Broad network access: The capabilities are available over a network and accessed through standard mechanisms that facilitate use by heterogeneous thin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

[0026] Resource pooling: The provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, where different physical and virtual resources are dynamically assigned and reassigned as needed. There is a sense of location independence because consumers typically have no control or knowledge of the exact location of the provided resources, but may be able to specify a location at a higher level of abstraction (e.g., country, state, or data center).

[0027] Rapid elasticity: Capabilities can be provided quickly and elastically (in some cases, automatically) to quickly scale down and quickly release to quickly scale up. To the consumer, the capabilities available for provisioning generally appear unlimited and can be purchased in any quantity at any time.

[0028] Measured service: The cloud system automatically controls and optimizes resource use by leveraging metering capabilities at some level of abstraction appropriate to the service type (e.g., storage, processing, bandwidth, and active user accounts). Resource use can be monitored, controlled, and reported, providing transparency for both the provider and consumer of the utilized services.

[0029] The service models are as follows:

[0030] Software as a Service (SaaS): The capabilities provided to the consumer are to use the provider's applications running on the cloud infrastructure. The applications can be accessed from different client devices via a thin client interface such as a web browser (e.g., web-based email). The consumer does not manage or control the underlying cloud infrastructure, including the network, servers, operating systems, storage, or even individual application capabilities, with the possible exception of limited user-specific application configuration settings.

[0031] Platform as a Service (PaaS): The capabilities provided to the consumer are to deploy on the cloud infrastructure the applications created or acquired by the consumer, where the applications are created using programming languages and tools supported by the provider. The consumer does not manage or control the underlying cloud infrastructure, including the network, servers, operating systems, or storage, but has control over the deployed applications and possibly the application hosting environment configuration.

[0032] Infrastructure as a Service (IaaS): The capabilities provided to the consumer are to provide the processing, storage, networking, and other fundamental computing resources that the consumer can deploy and run any software that can include operating systems and applications. The consumer does not manage or control the underlying cloud infrastructure, but has control over the operating systems, storage, deployed applications, and possibly limited control over the selected networking components (e.g., host firewall).

[0033] The deployment models are as follows:

[0034] Private Cloud: The cloud infrastructure is for an organization's operations only. It can be managed by the organization or a third party and can exist on - premise or off - premise.

[0035] Community Cloud: The cloud infrastructure is shared by several organizations and supports a specific community with shared concerns (e.g., missions, security requirements, policies, and compliance considerations). It can be managed by the organization or a third party and can exist on - premise or off - premise.

[0036] Public Cloud: Makes cloud infrastructure available to the general public or a large industry group and is owned by an organization that sells cloud services.

[0037] Hybrid Cloud: The cloud infrastructure is a composition of two or more clouds (private, community, or public) that remain unique entities but are bound together by standardized or proprietary technologies that enable data and application portability (e.g., cloud bursting for load balancing between clouds).

[0038] The cloud computing environment is service - oriented, focusing on statelessness, low coupling, modularity, and semantic interoperability. The core of cloud computing is the infrastructure that includes a network of interconnected nodes.

[0039] Now refer to Figure 1 , which depicts an illustrative cloud computing environment 50. As shown, the cloud computing environment 50 includes one or more cloud computing nodes 10, and local computing devices used by cloud consumers (such as a personal digital assistant (PDA) or mobile phone 54A, desktop computer 54B, laptop computer 54C, and / or in - vehicle computer system 54N) can communicate with the cloud computing nodes 10. The nodes 10 can communicate with each other. They can be physically or virtually grouped (not shown) in one or more networks, such as the private cloud, community cloud, public cloud, or hybrid cloud or a combination thereof described above. This allows the cloud computing environment 50 to provide infrastructure, platform, and / or software as services where the cloud consumer does not need to maintain resources on a local computing device. It should be understood that Figure 1 the types of computing devices 54A - 54N shown in

[0040] Now refer to Figure 2 , which shows a set of functional abstraction layers provided by the cloud computing environment 50 ( Figure 1 ). It should be understood in advance that Figure 2 the components, layers, and functions shown in

[0041] The hardware and software layer 60 includes hardware and software components. Examples of hardware components include: mainframe 61; servers 62 based on RISC (Reduced Instruction Set Computer) architecture; servers 63; blade servers 64; storage devices 65; and network and networking components 66. In some embodiments, the software components include network application server software 67 and database software 68.

[0042] The virtualization layer 70 provides an abstraction layer from which the following examples of virtual entities can be provided: virtual servers 71; virtual storage devices 72; virtual networks 73, including virtual private networks; virtual applications and operating systems 74; and virtual clients 75.

[0043] In one example, the management layer 80 can provide the functions described below. Resource provisioning 81 provides for the dynamic acquisition of computing resources and other resources for performing tasks within the cloud computing environment. Metering and pricing 82 provides cost tracking as resources are utilized within the cloud computing environment and bills or invoices for consumption of these resources. In one example, these resources can include application software licenses. Security provides authentication for cloud consumers and tasks, as well as protection of data and other resources. The user portal 83 provides access to the cloud computing environment for consumers and system administrators. Service level management 84 provides cloud computing resource allocation and management such that the required service levels are met. Service level agreement (SLA) planning and fulfillment 85 provides for the pre-arrangement and acquisition of cloud computing resources in accordance with future requirements of the cloud computing resources as expected by the SLA.

[0044] The workload layer 90 provides examples of functions that can utilize the cloud computing environment. Examples of workloads and functions that can be provided from this layer include: maps and navigation 91; software development and lifecycle management 92; virtual classroom education delivery 93; data analysis processing 94; transaction processing 95; and container image creation and deployment 96.

[0045] Now referring to Figure 3 , a schematic diagram of an example of a cloud computing node is shown. The cloud computing node 10 is only one example of a suitable cloud computing node and is not intended to impose any limitation on the scope of use or functionality of the embodiments of the invention described herein. In any event, the cloud computing node 10 is capable of implementing and / or performing any of the functions set forth above.

[0046] In the cloud computing node 10, there is a computer system / server 12, which can operate with many other general-purpose or special-purpose computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations suitable for use with the computer system / server 12 include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems or devices, and so on.

[0047] The computer system / server 12 can be described in the general context of computer system-executable instructions, such as program modules, executed by a computer system. Generally speaking, program modules can include routines, programs, objects, components, logic, data structures, etc. that perform specific tasks or implement specific abstract data types. The computer system / server 12 can be implemented in a distributed cloud computing environment, where tasks are executed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located in both local and remote computer system storage media including memory storage devices.

[0048] As Figure 3 shown, the computer system / server 12 in the cloud computing node 10 is shown in the form of a general-purpose computing device. The components of the computer system / server 12 can include, but are not limited to, one or more processors or processing units 16, a system memory 28, and a bus 18 that couples different system components including the system memory 28 to the processor 16.

[0049] The bus 18 represents one or more of any 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 various bus architectures. By way of example and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

[0050] The computer system / server 12 generally includes various computer system-readable media. Such media can be any available media accessible by the computer system / server 12, and it includes volatile and non-volatile media, removable and non-removable media.

[0051] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer system / server 12 may also include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 34 may be provided for reading from and writing to an non-removable, non-volatile magnetic media (not shown and typically referred to as a "hard disk drive"). Although not shown, a disk drive for reading from and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading from and writing to a removable non-volatile optical disk such as a CD-ROM, DVD-ROM or other optical media may be provided. In such instances, each may be connected to the bus 18 by one or more data media interfaces. As will be further depicted and described below, memory 28 may include at least one program product having a set (at least one) of program modules configured to carry out the functions of embodiments of the present invention.

[0052] A program / utility 40 having a set (at least one) of program modules 42, as well as an operating system, one or more application programs, other program modules, and program data may be stored in memory 28 by way of example and not limitation. Each or some combination of the operating system, one or more application programs, other program modules, and program data may include an implementation of a networking environment. The program modules 42 generally carry out the functions and / or methods of the embodiments described herein.

[0053] The computer system / server 12 may also communicate with one or more external devices 14, such as a keyboard, a pointing device, a display 24, etc.; one or more devices that enable a user to interact with the computer system / server 12; and / or any devices (e.g., network card, modem, etc.) that enable the computer system / server 12 to communicate with one or more other computing devices. Such communication may occur via an input / output (I / O) interface 22. Further, the computer system / server 12 may communicate via a network adapter 20 with one or more networks, such as a local area network (LAN), a general wide area network (WAN), and / or a public network (e.g., the Internet). As described, the network adapter 20 communicates with other components of the computer system / server 12 via the bus 18. It should be understood that although not shown, other hardware and / or software components may be used in conjunction with the computer system / server 12. 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, etc.

[0054] Now refer to Figure 4, which shows a flowchart of a method 400 according to an embodiment. In different embodiments, the method 400 may be performed in any environment depicted in Figures 1 to 3 and Figure 5 . Of course, as those skilled in the art will understand after reading this specification, the method 400 may include more or fewer operations than those specifically described in Figure 4 .

[0055] Each step of the method 400 may be performed by any suitable component of the operating environment. For example, in different embodiments, the method 400 may be performed partially or completely by one or more servers, computers, or some other device having one or more processors therein. A processor (e.g., a processing circuit, chip, and / or module implemented in hardware and / or software and preferably having at least one hardware component) may be used in any device to perform one or more steps of the method 400. Illustrative processors include but are not limited to a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), etc., combinations thereof, or any other suitable computing device known in the art.

[0056] As Figure 4 shown, the method 400 may begin at operation 402, where a manifest of a container image for a container to be created is received. In one embodiment, the manifest may be retrieved in response to a request to create a container within a cluster of computing nodes.

[0057] For example, a request may be received from a user, an application, etc. In another example, a request may be received at the cluster of computing nodes. In yet another example, the cluster of computing nodes may include a distributed computing network, a cloud-based computing environment, etc. In yet another example, a container may include a self - contained software package that implements operating system (OS) - level virtualization.

[0058] Additionally, in one embodiment, creating a container may include mounting a file system for the container at one of the multiple computing nodes within the cluster, loading one or more libraries within the container, and / or running one or more applications within the container, utilizing the mounted file system, etc.

[0059] Further, in one embodiment, a container image may include all the files required to create a container at one of the computing nodes in the cluster of computing nodes. In another embodiment, a container image may include multiple files (e.g., an executable package including code, runtime, system tools, system libraries, and settings, etc.). In yet another embodiment, the manifest of the container image may include metadata describing the multiple files within the container image.

[0060] For example, the manifest can include a list of file names (e.g., content identifiers), ownership and / or permission data associated with those files, etc. In another example, the manifest can include a content-based address for a file (e.g., a file hash, a pointer to a location where multiple files are stored, etc.). In yet another example, the manifest can store multiple file stubs, each containing a pointer to the location where the file is stored.

[0061] Furthermore, in one embodiment, the manifest can include metadata that describes multiple files within a container image rather than the multiple files themselves. For example, the files can be stored remotely at a content repository (e.g., a centralized object store). In another example, one or more of the files can be stored locally (e.g., at a node of a container to be created, etc.).

[0062] In another embodiment, once a container is created, the container can use the manifest to retrieve individual files from the container image as needed (e.g., in a "lazy" manner when requested by an application running within the container, etc.)

[0063] Moreover, in one embodiment, the manifest can be retrieved by a scheduler module that is separate from the nodes within a cluster. In another embodiment, the manifest can be retrieved from a repository (e.g., a registry, etc.). For example, a scheduler module that is separate from the nodes within a cluster can retrieve the manifest for a container image of a container from a manifest repository (e.g., a database, etc.) that is physically separate from the scheduler module. In yet another embodiment, the manifest can be received from the scheduler at an overlap computing module.

[0064] In addition, method 400 can perform operation 404, where a mapping index for a cluster of computing nodes is identified. In one embodiment, the mapping index can be identified at a repository. In another embodiment, the mapping index can be stored locally at the scheduler module. In one embodiment, the mapping index can be stored remotely (e.g., as a separate database, etc.). In yet another embodiment, the mapping index can store identifiers for each node within a cluster of computing nodes.

[0065] In addition, in one embodiment, the mapping index can store identifiers (e.g., content identifiers, etc.) of all container image files that are currently stored within each node of a cluster of computing nodes. For example, each node within a cluster of computing nodes can store one or more parts of one or more container images. In another example, these parts include container image files. In yet another example, these parts can be stored within a cache of each of the nodes. In yet another example, each node within a cluster of computing nodes can store different parts of one or more container images (e.g., different container image files) compared to other nodes of the cluster.

[0066] Further, in one embodiment, the content identifier for each container image file within a node of a cluster of compute nodes currently being stored can be linked (e.g., mapped, etc.) to an identifier for the node (e.g., node identifier, etc.) within a mapping index. In this way, the mapping index can store an indication of all container image files stored within each node of the cluster.

[0067] In addition, in one embodiment, the mapping index can store only a portion (e.g., prefix) of each content identifier to reduce the amount of data stored within the mapping index. In another embodiment, the mapping index can be retrieved from a repository (e.g., registry, etc.). For example, the mapping index can be retrieved from the same repository from which the manifest is retrieved. In yet another embodiment, the mapping index can be received from a scheduler at an overlap computing module.

[0068] Additionally, method 400 can perform operation 406, where a compute node is selected within a cluster of compute nodes for creating a container based on a comparison of the manifest and the mapping index. In one embodiment, the overlap computing module can compare a list of content identifiers within the manifest to the content identifiers that are linked to node identifiers within the mapping index.

[0069] Further, in one embodiment, for each node identifier within the mapping index, the overlap computing module can determine the number of content identifiers within the manifest that are linked to the node identifier. For example, the numbers of content identifiers within the manifest that are linked to the node identifier can be summed to create a score for the node identifier. In this way, the overlap computing module can determine the number of container image files for a container image currently stored within each node of the cluster.

[0070] Still further, in one embodiment, the node (e.g., when compared to other nodes within the cluster) that is linked to the largest number of content identifiers within the manifest can be selected for creating a container. For example, the node identifier with the highest score can be identified and returned. In another embodiment, a subset of node identifiers within the mapping index can be identified for comparison with the manifest.

[0071] For example, only the node identifiers of nodes that meet one or more additional resource requirements can be compared to the manifest. In another embodiment, the additional resource requirements can include a minimum amount of available cache memory for the node, a minimum amount of non-volatile storage device for the node, etc. For example, only the node identifiers associated with nodes having a current available cache memory amount higher than a predetermined threshold can be compared to the manifest.

[0072] In addition, in one embodiment, a subset of all content identifiers within a manifest can be identified for comparison with a mapping index. For example, each content identifier within the manifest can be assigned a weight value based on the historical access volume of the file represented by the content identifier. In another example, only content identifiers with a weight higher than a predetermined threshold can be compared with the mapping index. In this way, the node selection time can be reduced by restricting the number of node identifiers and content identifiers to be compared.

[0073] As a result, a node that currently stores the largest number of container image files for a container can be selected to create the container. This can minimize the amount of container image files that need to be retrieved by the node during the creation / run of the container on the node, which in turn can reduce the amount of bandwidth used to transfer such container image files. This can reduce the amount of network traffic between the node and the container image repository, thereby improving the performance of one or more hardware components implementing such network communication. This can also reduce the latency for the node to retrieve the container image files (by maximizing the number of local container image files), which can improve the performance of the computing hardware of the node during container implementation.

[0074] In addition, in one embodiment, the creation of a container can be scheduled at the selected node. In another embodiment, a file system for the container can be mounted at the selected node using a manifest. For example, the manifest can include sufficient data to create (e.g., mount) the file system for the container. In another example, the manifest can include one or more inode descriptors and file hashes.

[0075] In addition, in one example, the inode descriptor can include metadata for mounting the file system of the container. In another example, the file system can be mounted at a node in a cluster of computing nodes (e.g., a node assigned the task of creating a container, etc.).

[0076] Furthermore, in one embodiment, the file system mounted for a container can identify requests to access data within the container image of the container. For example, a request to access data can include a file read request. In another example, a request to access data can include a request from an application within the container to read data within the container image. In yet another example, the data can include container image files.

[0077] In addition, in one embodiment, a manifest can be used to determine the location of data. For example, the location of the data can be included in the metadata stored within the manifest. For example, the metadata can describe multiple files within the container image. In another example, the manifest can include a content-based address for the file (e.g., a file hash, a pointer to the location where multiple files are stored, etc.).

[0078] In addition, in one embodiment, the location of the data can be utilized to retrieve the data. For example, the data can be retrieved locally from the cache of the node or remotely from a content repository / repository / registry. For example, the cache can include high-speed, low-latency memory that is faster than the standard data storage device within the nodes of the cluster. In another embodiment, the cache can include volatile memory. In yet another embodiment, the content repository can be physically separated from the nodes of the cluster and can be accessed via a communication network. In yet another embodiment, the content store can also store the initially received manifest.

[0079] Further, in one embodiment, in response to determining that the manifest of the image indicates that the data is locally stored at the cache of the node, the data can be retrieved from the cache. In another embodiment, in response to determining that the manifest of the image indicates that the data is not locally stored at the cache, the data can be retrieved from the content repository using the communication network.

[0080] Still further, in one embodiment, the content repository can store the data in association with the container image. In another embodiment, the retrieved data can be used by the mounted file system. For example, the retrieved data can be presented to the applications running within the node using the mounted file system.

[0081] In addition, in one embodiment, the mapping index can be updated in response to retrieving a container image file and storing such a container image file at the node. For example, the content identifier of the retrieved container image file can be linked / mapped to the identifier of the node within the mapping index. In another embodiment, the mapping index can be updated in response to removing a container image file from the node. For example, after a predetermined time threshold has been exceeded, the node can evict the cached container image file.

[0082] In this way, the mapping index can be updated to accurately indicate all the container image files currently stored at all the nodes within the cluster.

[0083] Content-Aware Container Scheduling

[0084] In one embodiment, containers are scheduled such that the overlap of the existing content on the target node is maximized. The mapping of the content is done at the container host. The best target host is calculated based on the overlap and additional constraints. The mapping is updated online when content is retrieved / evicted from the host.

[0085] Additionally, less network traffic is required because less content needs to be retrieved (e.g., some policies typically repopulate the image each time a container is (re)run). Less storage and memory are required because existing content can be reused and does not need to be stored redundantly. Less input / output (I / O) bandwidth is required because cached content can be reused. Overall, higher container density can be achieved due to maximized data reuse.

[0086] Figure 5 An exemplary system architecture 500 in accordance with one embodiment is shown. As shown, a scheduler 502 receives a request to run a container. In response to receiving the request, the scheduler 502 retrieves a manifest 504 for the container from a registry 506.

[0087] The scheduler 502 then sends the retrieved manifest 504 to an overlap calculator 508. In one embodiment, the scheduler 502 and the overlap calculator 508 may be located within a single computing system. In another embodiment, the scheduler 502 and the overlap calculator 508 may be located within separate computing systems.

[0088] In response to receiving the retrieved manifest 504, the overlap calculator 508 identifies a mapping index 510 and compares the retrieved manifest 504 with the mapping index 510 to calculate the maximum overlap between the content identifiers within the mapping index 510 and the content identifiers within the retrieved manifest 504. For example, a node 514 within the mapping index 510 may be selected to create a container, where the node 514 is linked to the largest number of content identifiers found within the retrieved manifest 504 (e.g., when compared to other nodes within the cluster 512).

[0089] In response to identifying the node 514 with the maximum overlap, the scheduler 502 schedules the node 514 to run the container. The retrieved manifest 504 may be sent from the scheduler 502 to the node 514 and may be used to mount a file system for the container within the node 514.

[0090] After the file system is mounted within the node 514, the mounted file system may request additional container image data not found in the manifest. In response to the request, the node 514 may retrieve the requested content 516 from the registry 506 in an on-demand manner. The node 514 may then send an indication of this retrieved content 516 to the mapping index 510, and the mapping index 510 may be updated to reflect this newly retrieved content 516 at the node 514. The mapping index 510 may also be updated in response to the node 514 removing one or more instances of content, such that the mapping index 510 contains an up-to-date snapshot of all container data stored at each node within the cluster 512.

[0091] Identify the target node

[0092] In one embodiment, a mapping index can be stored. For example, the mapping index can include N sub - indexes, one for each node in the cluster. Each index can include a hash set that contains the content IDs of the files on that node. Constant - time lookups can be performed according to the index. The size of the index can be reduced by storing only the prefix of each content ID.

[0093] Calculation target

[0094] In one embodiment, a node with the largest overlap of existing files and the manifest can be identified, and this node also meets any other scheduling requirements (e.g., the number of nodes, the amount of available RAM, etc.). Exemplary steps are as follows:

[0095] 1. For each node in the mapping index, check how many files of the image already exist on that node (e.g., O(N*M)), where N is the number of nodes and M is the number of files in the manifest.

[0096] 2. Sort the nodes according to the overlap size

[0097] 3. Schedule the container on the node with the highest overlap size that also meets all other scheduling requirements

[0098] Reduce the scheduling decision time

[0099] In one embodiment, additional indexes can be added from the image to the nodes. Each entry can map the image to a list of nodes. For each node, the images that have started and their start times can be tracked. The node that last started an image can be selected to start a new instance of that image.

[0100] In another embodiment, nodes can be filtered first according to other resource requirements. For example, only the overlaps of the nodes that meet the other resource requirements can be checked (e.g., O(N*M) is reduced to O(N_R*M), where N_R = the set of remaining nodes that meet the resource requirements).

[0101] In yet another embodiment, the overlap can be calculated between the most frequently used subsets of the image. For example, each file entry in the image can be tagged with a priority based on its access pattern (e.g., the more a file is accessed, the higher its priority). When calculating the overlap (e.g., O(N_R*M)->O(N_R*M_p), where M_p = the number of files with priority > p), only the files with a priority higher than a threshold can be considered.

[0102] In yet another embodiment, the reverse index of a file can be used to list the nodes containing the file. For example, for each file i in the image, a list of nodes (N_Fi) containing the file can be identified. The list can be traversed to find the node with the most occurrences as the scheduling target (e.g., where O(N*M) -> O(M*N_Fi+N) has a worst-case O(M*N+N)).

[0103] Fault tolerance

[0104] In one embodiment, in response to an inode crash, the index can be periodically flushed to disk and can be restored on restart. Consistency may not be critical since small differences between the index and the actual cluster state will only affect the quality of scheduling decisions and not the operation itself. Logging, transactions, etc. are not required. In the case of complete index loss, the index can be rebuilt from worker nodes.

[0105] In another embodiment, a worker node may crash. The scheduler can automatically stop scheduling to that node, but can maintain the index for that node. When the node recovers, the file system can send the local index checksum to the scheduler. The scheduler can then compute the checksum of its own index entries. If the checksums diverge, the scheduler can request the entire node index from that node.

[0106] In one embodiment, a method for providing content-aware scheduling of container images in a containerized cluster is provided. Additionally, a method for maintaining a mapping index to track the location of files in the cluster is provided. Further, a method is provided that uses the mapping index to compute the best scheduling target node that maximizes the sharing of existing data for new containers to be run in the cluster. Still further, a method is provided that reduces the number of scheduling decisions by limiting the number of nodes and files to be examined in the mapping index.

[0107] In one embodiment, a method for performing content-aware container scheduling is provided, including: maintaining a mapping between cluster nodes identified by content IDs and their cached image content; updating the mapping whenever a cluster node retrieves or deletes image data; upon receiving a request to schedule a container, downloading an image manifest listing the (multiple) content IDs of the content in the image; comparing the (multiple) content IDs in the image manifest with the content IDs of the data stored on the cluster nodes by querying the nodes mapped to the content; and scheduling the container on a node that has the maximum overlap between its cached content and the container image data.

[0108] The present invention can be a system, method, and / or computer program product at any possible integrated technical detail level. The computer program product can include a computer-readable storage medium (or media) having computer-readable program instructions thereon for causing a processor to execute embodiments of the present invention.

[0109] A computer-readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. A computer-readable storage medium can be, by way of example and not limitation, 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 the computer-readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punch card or raised structures in a groove having instructions recorded thereon), and any suitable combination of the foregoing. As used herein, a computer-readable storage medium should not be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through an optical fiber cable), or an electrical signal transmitted through a wire.

[0110] The computer-readable program instructions herein can be downloaded from a computer-readable storage medium to a corresponding computing / processing device, or downloaded to an external computer or external storage device via a network (e.g., the Internet, a local area network, a wide area network, and / or a wireless network). The network can include copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium within the corresponding computing / processing device.

[0111] The computer-readable program instructions for performing the operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state-setting data, configuration data for integrated circuits, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and procedural programming languages such as the "C" programming language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed 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 case, 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., through the Internet using an Internet service provider). In some embodiments, an electronic circuit, including, for example, a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA), may execute the computer-readable program instructions by utilizing the state information of the computer-readable program instructions to personalize the electronic circuit so as to perform embodiments of the present invention.

[0112] Embodiments 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 should 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.

[0113] 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, when executed via the processor of the computer or other programmable data processing apparatus, create a means for implementing the functions / acts specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, a programmable data processing apparatus, and / or other devices to function in a particular manner, such that the computer-readable storage medium having instructions stored therein includes an article of manufacture that includes instructions for implementing embodiments of the functions / acts specified in one or more blocks of the flowchart and / or block diagram.

[0114] The computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device that causes a series of operational steps to be performed on the computer, other programmable apparatus, or other device to produce 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 flowchart and / or block diagram.

[0115] The flowcharts and block diagrams in the accompanying drawings 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 flowchart or block diagram may represent a module, segment, or portion of an instruction, which includes one or more executable instructions for implementing the specified logical function. In some alternative embodiments, the functions noted in the blocks may occur out of the order noted in the figures. For example, depending on the functionality involved, two blocks shown in succession may actually be completed as one step, executed simultaneously, substantially simultaneously, in a partially or fully time-overlapped manner, or the blocks may sometimes be executed in the reverse order. It will also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a system based on dedicated hardware that performs the specified functions or actions or a combination of dedicated hardware and computer instructions.

[0116] In addition, systems according to various embodiments may include a processor and logic integrated with and / or executable by the processor, the logic being configured to perform one or more of the process steps described herein. By integrated, it means that the processor has logic embedded therein as hardware logic, such as an application specific integrated circuit (ASIC), FPGA, etc. By processor executable, it means that the logic is hardware logic; software logic, such as firmware, a part of an operating system, a part of an application; a combination of hardware and software logic that the processor can access and is configured to cause the processor to perform a certain function when executed by the processor, etc. As is known in the art, software logic can be stored on any type of local and / or remote memory. Any processor known in the art can be used, such as a software processor module and / or a hardware processor, such as an ASIC, FPGA, central processing unit (CPU), integrated circuit (IC), graphics processing unit (GPU), etc.

[0117] It will be clear that the different features of the foregoing systems and / or methods can be combined in any manner, thereby creating multiple combinations from the description presented above.

[0118] It will be further understood that embodiments of the present invention may be provided in the form of a service deployed by a customer to provide services on demand.

[0119] The description of the different embodiments of the present invention has been presented for illustrative purposes, but is not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein are chosen to best explain the principles of the embodiments, the practical application, or technical improvements found in the marketplace, or to enable those of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A computer-implemented method, comprising: Receiving a manifest of a container image for a container to be created; Identifying a mapping index for a cluster of compute nodes; Based on a comparison of the manifest and the mapping index, selecting a compute node within the cluster of compute nodes for creating the container, wherein the compute node linked to the largest number of content identifiers within the manifest is selected for creating the container; And Creating the container on the selected compute node, wherein creating the container includes running an application within the container on the selected compute node.

2. The computer-implemented method according to claim 1, wherein the manifest for the container image includes metadata describing a plurality of files within the container image, the metadata including a list of content identifiers and content-based addresses.

3. The computer-implemented method according to claim 1, wherein the mapping index stores content identifiers of all container image files currently stored within each node of the cluster of compute nodes, wherein the content identifier for each container image file currently stored within a node of the cluster of compute nodes is linked to an identifier for the node.

4. The computer-implemented method according to claim 1, wherein the mapping index stores only a prefix of each content identifier of all container image files currently stored within each node of the cluster of compute nodes.

5. The computer-implemented method according to claim 1, wherein for each node identifier within the mapping index, the number of content identifiers within the manifest linked to the node identifier is determined.

6. The computer-implemented method according to claim 1, further comprising identifying a subset of node identifiers within the mapping index for comparison with the manifest.

7. The computer-implemented method according to claim 1, further comprising identifying a subset of all content identifiers within the manifest for comparison with the mapping index.

8. The computer-implemented method according to claim 1, further comprising: Updating the mapping index in response to retrieving a container image file and storing the container image file at a compute node of the cluster.

9. The computer-implemented method according to claim 1, further comprising: Updating the mapping index in response to removing a container image file from a compute node of the cluster.

10. The computer-implemented method according to claim 1, further comprising: Scheduling the creation of the container at the selected compute node.

11. The computer-implemented method according to claim 10, further comprising: Mounting a file system for the container at the selected compute node using the manifest.

12. The computer-implemented method according to claim 11, further comprising: Identifying, by the file system mounted for the container, a request to access data within the container image of the container; And Retrieving the data using the location of the data determined by using the manifest.

13. A computer program product for performing content-aware node selection for container creation, the computer program product comprising a computer-readable storage medium having program instructions embodied therewith, wherein the computer-readable storage medium itself is not a transient signal, the program instructions being executable by a processor to cause the processor to perform a method, the method comprising: Receiving, by the processor, a manifest of a container image for a container to be created; Identifying, by the processor, a mapping index for a cluster of compute nodes; Selecting, by the processor, a compute node within the cluster of compute nodes for creating the container based on a comparison of the manifest and the mapping index, wherein the compute node linked to the largest number of content identifiers within the manifest is selected for creating the container; And Creating the container on the selected compute node, wherein creating the container includes running an application within the container on the selected compute node.

14. The computer program product according to claim 13, wherein the manifest for the container image includes metadata describing a plurality of files within the container image, the metadata including a list of content identifiers and content-based addresses.

15. The computer program product according to claim 13, wherein the mapping index stores content identifiers of all container image files currently stored within each node of the cluster of compute nodes, wherein the content identifier for each container image file currently stored within a node of the cluster of compute nodes is linked to an identifier for the node.

16. The computer program product according to claim 13, wherein the mapping index stores only prefixes of each content identifier of all container image files currently stored within each node of the cluster of compute nodes.

17. The computer program product according to claim 14, wherein for each node identifier within the mapping index, a number of content identifiers within the manifest linked to the node identifier is determined.

18. A computer system, comprising: A processor; And Logic integrated with the processor and executable by the processor, the logic being configured to: Receive a manifest of a container image for a container to be created; Identify a mapping index for a cluster of compute nodes; Select a compute node within the cluster of compute nodes for creating the container based on a comparison of the manifest and the mapping index, wherein the compute node linked to the largest number of content identifiers within the manifest is selected for creating the container; And Create the container on the selected compute node, wherein creating the container includes running an application within the container on the selected compute node.

19. A computer system, comprising modules respectively for performing the steps of the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Method for improving web performance by adapting servers based on client cluster characterization

    US20030046343A1

  • Node selecting method

    US20050063337A1

  • Monitoring containerized applications

    US20170315795A1

  • Storage Systems for Containers

    US20180032258A1