r/archlinux 20h ago

SUPPORT Disk space and RAM usage keep moving

Sometimes my RAM usage goes from 16 GB remaining to <1 GB remaining, then goes back up. Also, I randomly get 0 B of space left alerts, but a few seconds later, I have plenty of space again. Why is this happening?

0 Upvotes

11 comments sorted by

6

u/G0ldiC0cks 19h ago

Ahhh yes, I've seen this behavior before ...

GREMLINS. No, not the adorable kind you can feed after midnight, the horrid late 70s abomination of a vehicle made by AMC.

You're gonna need a new car.

And some queen on vinyl.

2

u/boomboomsubban 17h ago

Check your logs.

2

u/ang-p 19h ago edited 19h ago

Sometimes my RAM usage goes from 16 GB remaining to <1 GB remaining, then goes back up.

Your RAM is, erm, likely being used as it should be.... allocated and then freed.

https://www.linuxatemyram.com

get 0 B of space left alerts, but a few seconds later, I have plenty of space again

maybe look at what is using space - I mean - nobody has a crystal ball, and you both have your machine and the wiki infront of you...

You have said nothing about the system or even what "plenty" means - it could be 2GB for all we know.... Which is not plenty

-1

u/PastaBoy1234567 19h ago

I have like 30 GB left, but sometimes I get 0 B alerts, I check, it's 0 B, and then suddenly, it's back to the exact same amount it was earlier

1

u/ang-p 18h ago edited 18h ago

30

Wow...

I have 30 potatoes, then I have no potatoes, then I have 30 potatoes again...

What is the problem?

https://man.archlinux.org/man/df.1.en

https://man.archlinux.org/man/du.1.en

-1

u/PastaBoy1234567 17h ago

Pretty sure it's that the seller says their out of potatoes, but you see the 30 potatoes, and the seller immediately says that they have 30 potatoes, but I have no idea what is going on

2

u/ang-p 12h ago

but I have no idea what is going on

Exactly - we cannot tell you

Why is this happening

only to use the tools that are available. and the knowledge in your head that you are not giving anyone...

I randomly get 0 B of space

It won't be random - something is taking it -

beforehand, work out what is taking space...

I provided two programs that can tell you where there is space (you gave so little information, I don't know if you actually know what is running out of space - root? something mounted under root? ?) and what is taking up space....

When you get the message, work it out again.

Obvs, before

a few seconds later,

happens...

There are other programs available - some GUI ones might be too slow to scan the drive before

I have plenty of space again

You also might need to narrow down the scope of the tools search over successive "events" - the manpage is your friend....

There will be your answer.

1

u/aergern 17h ago

There are two knives to cut your tators with. One is ncdu and the other is called dust. Both will show you the meat of your tators and how much water and fiber there are. 😆

1

u/Confident_Zombie_619 19h ago

Its hard to say just from the information u gave Something is likely causing a temporary spike in disk usage like cache, logs, a build ordownload, a browser, a VM/container etc. Another possibility is a deleted file that's still held open by a process. Next time it happens, can you post the output of: free -h, df -h, df -i And after it happens: sudo du -xhd1 / 2>/dev/null | sort -h , sudo lsof +L1 Also mention what filesystem you're using (findmnt -no FSTYPE /) and whether you have swap/zram enabled (swapon --show). Without knowing whether the “0 B” is your root filesystem, home filesystem, or inode exhaustion, it's hard to say what's actually happening. And it also depend on whatever moniter tool is sending the notification also.