Questions tagged [tmpfs]

tmpfs is a common name for a temporary file storage facility on many Unix-like operating systems.

It is intended to appear as a mounted file system, but stored in volatile memory instead of a persistent storage device. A similar construction is a RAM disk, which appears as a virtual disk drive and hosts a disk file system.

94 questions
3
votes
1 answer

Can I use docker tmpfs in WSL2 for running docker containers on RAM?

Is docker tmpfs working on wsl2. If I run this in WSL2: docker run -it --rm -e POSTGRES_PASSWORD=secret --tmpfs /var/lib/postgresql/data postgres:13-alpine sh The whole container will run in the RAM?
Michael
  • 896
  • 10
  • 28
3
votes
1 answer

Kubernetes: in-memory volume shared between pods

I need a shared volume accessible from multiple pods for caching files in RAM on each node. The problem is that the emptyDir volume provisioner (which supports Memory as its medium) is available in Volume spec but not in PersistentVolume spec. Is…
Adam
  • 2,897
  • 2
  • 23
  • 23
3
votes
1 answer

Treat tmpfs as a device for grep

I have to test my program, that it completely removes files with their contents from disk. To test that I do the following: Create a file with some known string inside. My program deletes the file. I search the string on the disk where the file was…
Alexey
  • 1,198
  • 1
  • 15
  • 35
3
votes
1 answer

Do all tmpfs instances on Linux share same memory pool?

I have embedded Linux system and it has several tmpfs mounts defined in the fstab. Some of these mounts are involved in systemd. The customer asks why there is not just one mount for all the volatile "RAM FS" stuff. Questions: Is physical memory…
ddbug
  • 1,392
  • 1
  • 11
  • 25
3
votes
0 answers

shared memory read/write is slow for certain files

Recently we have seen some shared memory read/write performance issue with our application. In our application, we copy data from shared memory /run/shm to pinned memory, so as to achieve higher GPU transfer throughput. We observed that the copy…
3
votes
2 answers

Is there a reliable, cross-platform (on *nix anyway) way to create a temporary file on another device?

I'm trying to write a test case for some code that should iterates over a filesystem tree, but should stop if a file is on another device. In writing tests for it, I considered creating a file in /dev/shm, symlinking to it from my test directory,…
Brennan Vincent
  • 10,736
  • 9
  • 32
  • 54
3
votes
1 answer

Is executable code stored uniquely in tmpfs copied to another part of RAM when run?

An executable on disk needs to first have it's code and data sections loaded into RAM before it can be executed. When an executable is stored in tmpfs, it's already in RAM, so does the kernel bypass the step of loading the executable into RAM by…
cmtm
  • 162
  • 1
  • 7
2
votes
0 answers

PostgreSQL in Memory (with docker compose) - validate if its working?

I tried this approach from here: https://stackoverflow.com/a/42239760/1455384 So I have this kind of db setup: db: # 15.1-alpine3.16 image: postgres@sha256:44b4073d487d0f9baf82bc95d10e2b1f161b18dcc52cfbd0eb2a894b5e2cd513 environment: …
Andrius
  • 19,658
  • 37
  • 143
  • 243
2
votes
1 answer

Kubernetes: in-memory shared cache between pods

I am looking for any existing implementation of sharing a read only in-memory cache across pods on the same node. This setup would allow fast access without the need to load the entire cache into each pods memory. Example: 1GB lookup dictionary is…
maximbr
  • 401
  • 6
  • 7
2
votes
0 answers

docker tmpfs with world writable permission

I am trying to start a container with read only filesystem, but a specific folder (/app) needs to be world writable. # docker create -it --name=test \ --read-only \ --mount type=tmpfs,destination=/app,tmpfs-mode=1777 \ --entrypoint…
m.divya.mohan
  • 2,261
  • 4
  • 24
  • 34
2
votes
2 answers

Docker --mount type=tmpfs with 'exec' permission

I'm trying to start multiple service and mount tmpfs but cant find any way to pass "exec" permission to this command. docker run -d \ -it \ --name tmptest \ --mount type=tmpfs,destination=/app \ nginx:latest Its working perfectly with…
2
votes
1 answer

Faster Dockerfile build using ramdisk

We run a build process that compiles multiple artifacts from a large codebase. On a decent spec i7 with SSDs this takes ~20 minutes, however when I shift to using tmpfs time drops to ~3 minutes. We are packaging the build process using…
user1016765
  • 2,935
  • 2
  • 32
  • 48
2
votes
0 answers

Can't mount tmpfs to container

I'm trying to start kubernetes worker on CentOS 6.8 with docker 1.12.6. There is no success when weave container starting, it cannot get token from mounted tmpfs volume. I tried to start container in console with that same volume and don't see files…
ekorn
  • 21
  • 2
2
votes
1 answer

Docker: is it possible to use overlayed backing filesystem?

I'd like to control whether docker operates on a persistent storage or on a persistent storage overlayed with a volatile one. It is because I have the filesystem on an SD card (Raspberry Pi) and it needs to last long. I mostly want to operate on a…
pallly
  • 629
  • 5
  • 13
2
votes
1 answer

python: IOError: [Errno 36] File name too long:

I want to create a file within tmpfs (under CentOS 6.5) like this: fpath = '/tmpfs_mounted/with/long/file/name' with open(fpath, 'w') as fd: write(somedata) ... But I got the IOError: [Errno 36] File name too long: ... error, How to fix it?
coanor
  • 3,746
  • 4
  • 50
  • 67