Table of Contents
What is the difference between jvm and docker
Home Operation and Maintenance Docker What is the difference between jvm and docker

What is the difference between jvm and docker

Jan 28, 2022 am 11:01 AM
docker

Difference: 1. Docker runs with almost no additional performance loss, while jvm will have additional CPU and memory losses; 2. Docker is portable, flexible, and can be used with Linux, while jvm is bulky and virtual. The degree of machine coupling is high; 3. The image stored by docker is small, while the image stored by jvm is huge.

What is the difference between jvm and docker

The operating environment of this tutorial: linux7.3 system, docker-1.13.1 version, Dell G3 computer.

What is the difference between jvm and docker

Docker has fewer abstraction layers than a virtual machine. Docker does not require a hypervisor to virtualize hardware resources. Programs running in docker containers directly use the hardware resources of the actual physical machine. Therefore, docker will have obvious advantages in efficiency in terms of CPU and memory utilization.

Docker uses the host's kernel and does not require Guest OS. Therefore, when creating a container, there is no need to reload an operating system kernel like a virtual machine. This avoids the time-consuming and resource-consuming process of booting, loading the operating system kernel and returning. When a new virtual machine is created, the virtual machine software needs to load the Guest OS, and the return to the new creation process takes minutes. It only takes a few seconds to create a new docker container.

Compared between Docker and JVM:

  • Docker runs with almost no additional performance loss, while the JVM operating system consumes additional CPU and memory

  • Docker is portable, flexible, and adaptable to Linux, while the JVM is bulky and highly coupled to the virtual machine

  • The image stored by Docker is small and easy to store and transfer. The JVM image is huge.

"Container" technology such as docker simulates an entire operating system. It exists statically and can support the execution of applications on the same platform, and the container itself is process-independent.

JVM is an execution platform for specific code. It exists when running. It can only support the execution of specific code and must be within the JVM process.

Containers are usually platform-related. , Containers such as Docker for the Linux kernel cannot be directly compatible with Windows; and virtual machines such as jvm are platform-independent and almost all platforms are consistent containers that execute native code, which is the so-called "machine code";

jvm executes specific standard pseudocode (i.e. jvm bytecode). The container is isolated from the host. Without host mapping, the program cannot directly access host resources;

jvm is not isolated from the host and can be mapped by itself. And using the host resource container is static, self-contained, has a file system, and an executable program. It does not necessarily have to start a process;

jvm only makes sense when it is started as a process, it is independent , does not have its own file system, and does not contain applications. It just interprets specific codes from files or other sources as required from the entry point

Generally speaking, virtual machines such as JVM and Docker have some technical origins Yes, they are all virtualized host environments

It’s just that JVM is a higher-level, application-oriented, and specific virtual execution environment. Docker is biased towards the operating system level and is a universal execution environment

Recommended learning: "docker video tutorial"

The above is the detailed content of What is the difference between jvm and docker. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to exit the container by docker How to exit the container by docker Apr 15, 2025 pm 12:15 PM

Four ways to exit Docker container: Use Ctrl D in the container terminal Enter exit command in the container terminal Use docker stop <container_name> Command Use docker kill <container_name> command in the host terminal (force exit)

How to copy files in docker to outside How to copy files in docker to outside Apr 15, 2025 pm 12:12 PM

Methods for copying files to external hosts in Docker: Use the docker cp command: Execute docker cp [Options] <Container Path> <Host Path>. Using data volumes: Create a directory on the host, and use the -v parameter to mount the directory into the container when creating the container to achieve bidirectional file synchronization.

How to restart docker How to restart docker Apr 15, 2025 pm 12:06 PM

How to restart the Docker container: get the container ID (docker ps); stop the container (docker stop <container_id>); start the container (docker start <container_id>); verify that the restart is successful (docker ps). Other methods: Docker Compose (docker-compose restart) or Docker API (see Docker documentation).

How to check the name of the docker container How to check the name of the docker container Apr 15, 2025 pm 12:21 PM

You can query the Docker container name by following the steps: List all containers (docker ps). Filter the container list (using the grep command). Gets the container name (located in the "NAMES" column).

How to start mysql by docker How to start mysql by docker Apr 15, 2025 pm 12:09 PM

The process of starting MySQL in Docker consists of the following steps: Pull the MySQL image to create and start the container, set the root user password, and map the port verification connection Create the database and the user grants all permissions to the database

How to start containers by docker How to start containers by docker Apr 15, 2025 pm 12:27 PM

Docker container startup steps: Pull the container image: Run "docker pull [mirror name]". Create a container: Use "docker create [options] [mirror name] [commands and parameters]". Start the container: Execute "docker start [Container name or ID]". Check container status: Verify that the container is running with "docker ps".

How to update the image of docker How to update the image of docker Apr 15, 2025 pm 12:03 PM

The steps to update a Docker image are as follows: Pull the latest image tag New image Delete the old image for a specific tag (optional) Restart the container (if needed)

How to create containers for docker How to create containers for docker Apr 15, 2025 pm 12:18 PM

Create a container in Docker: 1. Pull the image: docker pull [mirror name] 2. Create a container: docker run [Options] [mirror name] [Command] 3. Start the container: docker start [Container name]

See all articles