this post was submitted on 08 Jan 2025
9 points (100.0% liked)

Lemmy Support

4693 readers
22 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

I made an instance following the tutorial for docker. Now i really want to track the storage space my instance is using (mostly out of curiosity), but i can't find any way to (quickly) check the storage used by pictrs. Checking the directory size takes way too long.

Maybe it's obvious and I just missed it but idk.

top 5 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 1 day ago (1 children)

I use ‘du -Lhs’ to check directory size. How long does it take for you to run that command? The only time I’ve ever run into a ‘du’ command taking a long time is when running it over the network to a slow-ass 2010-era system in California for a project I was doing at work with hundreds of terabytes of data and millions of files.

[–] [email protected] 1 points 12 hours ago (2 children)

last time i tried it took like 20 minutes, when it's just around 2GiB.

i thought it might be because the folder is on a hdd, so i tested moving the entire thing to an ssd and lo and behold, du only took 15 seconds there. too bad I don't have enough disk space on the ssd to keep the folder there, so i guess I'll just suffer. the files are probably fragmented over the entire drive or something, idk.

[–] [email protected] 2 points 1 hour ago* (last edited 8 minutes ago)

It depends on how your mounts are setup, but df might get you closer to what you need.

edit: This command shows the usage of mounted partitions. If your setup is on its own mount, that will probably get you the you need. If not, you might need to do some deductive work.

[–] [email protected] 2 points 2 hours ago

Ahh yep, that’ll do it. At least you figured out the issue!

[–] [email protected] 2 points 1 day ago* (last edited 1 day ago)

Depending on if you put its volume in the image or a directory you need to look there. Check size or whichever it is. I believe for directory it’s du -h and for docker you could docker ps to see all.

Oh I see you say taking the directory size takes too long… how could that take more than 10 seconds…?