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
34
votes
2 answers

docker-compose tmpfs not working

I have a docker-compose file that I'm trying to secure by making the root volumes of the containers it creates read-only. Relevant parts of docker-compose.yml: version: '2' services: mysql: image: mariadb:10.1 read_only: true tmpfs: …
koehn
  • 744
  • 1
  • 8
  • 20
10
votes
2 answers

Build a Docker image using docker build and a tmpfs?

Question: How do you specify in a Dockerfile, or on the docker build command line, that you would like to have a tmpfs mounted in the build container? This is in the context of a split build - the first container, which would use the RAM disk,…
fdmillion
  • 4,823
  • 7
  • 45
  • 82
7
votes
1 answer

docker tmpfs seems to have no effect on postgresql

I have a Postgres database inside a docker container against which I run django tests. I want to improve the speed of the tests. The easiest way to do this (it seems to me) is to move postgres data into tmpfs volume. Here's what I did: docker run…
Vladimir S.
  • 483
  • 6
  • 16
6
votes
1 answer

scala-io, moving file from tmpfs too slow

I faced up with a strange scala-io moveTo method issue. Here is my filesystem, tmp directory resides in ram. ~ % df -Th ~/ :) Filesystem Type Size Used Avail Use% Mounted…
4e6
  • 10,696
  • 4
  • 52
  • 62
6
votes
1 answer

docker/docker-compose tmpfs - pgsql_tmp directory

Has anyone tried running a postgresql container with a tmpfs volume mount to pgsql_tmp? (any database with a temp files directory i would imagine) Has it caused any problem? Is this a bad idea? Additional helpful info? docker tmpfs - "As opposed to…
silentpete
  • 350
  • 2
  • 7
6
votes
2 answers

write(2)/read(2) atomicity between processes in linux

I have a case where there are two processes which act on the same file - one as a writer and one as a reader. The file is a one line text file and the writer re-writes the line in a loop. reader reads the line. The pseudo code looks like…
Vineeth Pillai
  • 148
  • 1
  • 6
6
votes
4 answers

Time complexity of finding duplicate files in bash

I had to write a Bash script to delete duplicate files today, using their md5 hashes. I stored those hashes as files in a temporary directory: for i in * ; do hash=$(md5sum /tmp/msg | cut -d " " -f1) ; if [ -f /tmp/hashes/$hash ] ; then …
Ted
  • 972
  • 2
  • 11
  • 20
6
votes
2 answers

dd fail to write to tmpfs

I'd like to measure tmpfs performance by using dd. But it fail, like below: # dd if=/dev/zero of=/tmp/128M bs=4M count=32 oflag=direct dd: failed to open ‘/tmp/128M’: Invalid argument Any help?
user3170177
  • 61
  • 1
  • 4
5
votes
1 answer

SSD vs. tmpfs speed

I made a tmpfs filesystem in my home directory on Ubuntu using this command: $ mount -t tmpfs -o size=1G,nr_inodes=10k,mode=0777 tmpfs space $ df -h space . File system Size Used Avail. Avail% Mounted at tmpfs …
Green绿色
  • 1,620
  • 1
  • 16
  • 43
5
votes
1 answer

Run entire docker container with volumes mounted in memory

I would like to run entire docker container in memory without mapping volumes to host's hard drive. TMPFS described here helps to mount volumes as "memory volumes", but I'm looking a way how to start entire container mapped to…
Victor Perov
  • 1,697
  • 18
  • 37
5
votes
2 answers

GitLab: Mount /builds in build image as tmpfs

In our GitLab CI environment we have a build server with lots of RAM but mechanical disks, running npm install takes a long time (I have added cache but it still needs to chew through existing packages so cache cannot solve all of this alone). I…
tirithen
  • 3,219
  • 11
  • 41
  • 65
5
votes
2 answers

There is not enough space available in tmpfs docker container

I'm running a docker container that seems to have insufficient memory and I'm not sure how to solve this problem. I'm essentially running a program on this docker container that downloads an image into tmpfs, performs some operations, deletes the…
Peter Dolan
  • 1,393
  • 1
  • 12
  • 26
5
votes
1 answer

Bind tmpfs or ramfs to a specific memory node

I'm working on a NUMA server which has two memory nodes. I want to create a file system which will be loaded in main memory like tmpfs or ramfs and I want to bind it to a specific memory node. In other words I don't want the ramfs contents to be…
user3761809
  • 111
  • 6
4
votes
0 answers

tmpfs mount for dockerfile

I want to mount a tmpfs filesystem in docker container. For this I am passing mount command like this: docker run --mount type=tmpfs,destination=/tempdisk,tmpfs-mode=770,tmpfs-size=4m --name projectname projectname:latest The above command is…
abc def
  • 55
  • 6
4
votes
2 answers

Different sql explains on two servers. "Copying to tmp table" is extremely slow

I have a query that executes less time on dev server than on prod (database is the same). Prod server is much more efficient (64gb ram, 12 cores, etc). Here's the query: SELECT `u`.`id`, `u`.`user_login`, `u`.`last_name`, …
Satevg
  • 1,601
  • 2
  • 16
  • 23
1
2 3 4 5 6 7