hey folks, quick survey: what does `df -h $(mktemp...
# development
w
hey folks, quick survey: what does
df -h $(mktemp)
report on your machine?
on a MacBook Air circa 2020:
Copy code
$ df -h $(mktemp)
Filesystem     Size   Used  Avail Capacity iused      ifree %iused  Mounted on
/dev/disk1s2  932Gi  499Gi  406Gi    56% 5976558 9762001602    0%   /System/Volumes/Data
c
Copy code
df -h $TMPDIR
Filesystem     Size   Used  Avail Capacity iused      ifree %iused  Mounted on
/dev/disk3s5  926Gi  229Gi  684Gi    26% 7771220 7167110440    0%   /System/Volumes/Data
w
on an ubuntu
18.04.5
EC2 node:
Copy code
$ df -h $(mktemp)
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p1  125G   76G   49G  62% /
c
what was TMPDIR on the ec2 node?
w
…doh. good question. it was undefined. let me update the instructions here.
c
on another EC2
t3a.large
node we have
Copy code
tmpfs            3.9G     0  3.9G   0% /dev/shm
tmpfs            788M  832K  787M   1% /run
tmpfs            5.0M     0  5.0M   0% /run/lock
tmpfs            3.9G     0  3.9G   0% /sys/fs/cgroup
no mount point for
/tmp
but it exists, so guess it belong to root
Copy code
/dev/root         12G  4.3G  7.2G  38% /
w
@curved-television-6568: updated the instructions
👀 1
b
Copy code
$ df -h $(mktemp)
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p2  1.9T  550G  1.3T  31% /
Not tempfs, huh
c
Copy code
ssm-user@ip-10-0-245-77:$ df -h $(mktemp)
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        12G  4.3G  7.2G  38% /
h
On my m2:
Copy code
$ df -h $(mktemp)
Filesystem     Size   Used  Avail Capacity iused      ifree %iused  Mounted on
/dev/disk3s5  926Gi  167Gi  728Gi    19% 3667175 7635004040    0%   /System/Volumes/Data
w
from playing with it,
tmpfs
will fail with
Os { code: 28, kind: StorageFull, message: "No space left on device" }
rather than overcommitting past its allocated size
w
2018 Mac Mini (x86)
Copy code
% df -h $(mktemp)
Filesystem     Size   Used  Avail Capacity iused      ifree %iused  Mounted on
/dev/disk1s2  466Gi  353Gi  100Gi    78% 5291240 1045388760    1%   /System/Volumes/Data
👍 1
p
On my Gentoo Linux box
Copy code
$ df -h $(mktemp)
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb1       688G  569G   85G  88% /tmp
👍 1
c
Copy code
$ df -h $(mktemp)
Filesystem        Size  Used Avail Use% Mounted on
tank/ROOT/gentoo   42G   26G   16G  62% /
w
thanks everyone! now i am interested in learning the history of moving away from
tmpfs
for `/tmp`… one hypothesis is that hard drives have gotten fast enough that the downsides of
tmpfs
(running out of space) outweigh the benefits?
but if anyone knows, please share with the class 😃
😄 1