Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
This repository was archived by the owner on May 12, 2021. It is now read-only.

EmptyDir in k8s handled incorrectly #1341

@mcastelino

Description

@mcastelino

EmptyDir in k8s handled incorrectly

See #61 (comment)

EmptyDir defined in k8s supposed having three types of medium, default, tmpfs, hugepage. And the default medium should be node disk instead of memdisk, should it be better we consider mount option before pass ephemeral volumes into guest and back to use 9pfs when it was backed by default medium

https://kubernetes.io/docs/concepts/storage/volumes/#emptydir

By default, emptyDir volumes are stored on whatever medium is backing the node - that might be disk or SSD or network storage, depending on your environment. However, you can set the emptyDir.medium field to "Memory" to tell Kubernetes to mount a tmpfs (RAM-backed filesystem) for you instead. While tmpfs is very fast, be aware that unlike disks, tmpfs is cleared on node reboot and any files you write will count against your Container’s memory limit.

https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#enforcing-node-allocatable

@harche @amshinde @linxiulei

Expected result

When medium is not specified or default we should use 9p/virtio-fs

Actual result

We use tmpfs within the VM resulting in incorrect behaviour, scheduling and memory accounting'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behaviour

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions