Memory-Mapped Files for Container Packet Transfer
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Network Function Virtualization (NFV) and Software Defined Networking (SDN) face inefficiencies in inter-container communication due to CPU penalties and context switches, which hinder the speed and efficiency of packet transfer between virtual machines (VMs) and require innovative solutions to enhance communication processes.
Innovation Solution
Implementing memory-mapped files for inter-container communication, where a shared memory segment is allocated and mapped between containers, allowing for efficient packet transfer without overlapping read/write access, thereby avoiding access collisions and CPU penalties, and enabling direct communication channels without kernel involvement.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If traditional inter-container communication methods are used, then container isolation is maintained, but CPU penalties and context switches reduce communication speed
Solution Approach 1:
The patent merges the memory spaces of multiple containers by creating a shared memory segment that is mapped into the address spaces of multiple containers simultaneously. This allows containers to communicate directly through shared memory without kernel-mediated context switches, thereby improving packet transfer speed while maintaining container isolation through controlled access permissions.
Solution Approach 2:
The patent introduces a memory-mapped file as an intermediary mechanism that enables direct container-to-container communication. By mapping a shared file into the address spaces of multiple containers, the system eliminates the need for traditional kernel-calls and context switches, thus improving communication efficiency while preserving container isolation boundaries.
2Speed
If shared memory is used for inter-container communication, then communication speed improves, but access collisions may occur without proper management
Solution Approach 1:
The patent segments the shared memory space into distinct regions allocated to different containers. Each container is granted access to specific memory segments rather than the entire shared memory space, which prevents access collisions while maintaining the high-speed communication benefits of shared memory. The container-management system manages these segment allocations to ensure reliable concurrent access.
3Productivity
If kernel-calls are used for inter-container communication, then container isolation is maintained, but communication overhead increases
Solution Approach 1:
The patent extracts the communication mechanism from the kernel space by using user-space memory-mapped files. This allows containers to communicate directly through shared memory segments without requiring kernel-calls, thereby reducing communication overhead and improving efficiency. The container-management system handles the memory mapping and access control, eliminating kernel dependencies while maintaining container isolation.
Data Source
AI summary
Aspects of the subject technology relate to methods for inter-container communication in a virtual network environment. Steps for implementing an inter-container communication method can include: creating, using a container management system, a file-structure in a shared memory, generating, by the container management system, a first memory-mapping between the file-structure and a first network container, and generating, by the container management system, a second memory-mapping between the file-structure and a second network container. In some aspects, the method can further include steps for transferring at least one data packet from the first network container to the second network container via the file-structure in the shared memory. Systems and machine-readable media are also provided.


