Live data from Hacker News

All my servers have an 8 GB empty file on disk

brianschrader.com

311–320 of 715 posts

Re: All my servers have an 8 GB empty file on disk

#312
post #228

Earlier quoted context omitted.

The meat situation was kind of interesting actually. At the beginning of the lockdown I remember going shopping for lots of shelf-stable foods. Very perishable stuff like meat or fresh veggies were out or hard to find (and yes freezing meat works fine I know). However, lots of stores had tons of shelf stable boxed and canned goods and for meat jerky and other dried meats which are simple to boil and turn into simple…

I bought a bunch of rice, and all that happened was little rice bugs started living in it, so I had to throw it all away. But if there were a rice shortage, I would probably have eaten it.

If you freeze it for 24 hours it will kill them off. Can be a good idea to do that when it comes into the house anyway as they might be in there already.

Easy enough to separate them out of the rice after freezing too.

Re: All my servers have an 8 GB empty file on disk

#313

Earlier quoted context omitted.

I still know people that pre-emptively buy toilet paper "because hoarders might buy the rest of it" with absolutely no introspection.

The trick is to do exactly what they tell you not too immediately. Masks don't protect against covid - jump on Alibaba and buy some. Don't buy extra toiled paper, there will be no limits on its sale - immediately do a order on amazon prime. Because within a few days there will be price caps on the sale of TP (increased prices would deter hoarding) so everything will sell out right away. I think people have really lea…

To rationalize this phenomenon... They don't warn you about it until they think you'd be worried about it, and they don't think you'd be worried about it until they start thinking about doing it. ;)

Re: All my servers have an 8 GB empty file on disk

#314

> On Linux servers it can be incredibly difficult for any process to succeed if the disk is full. Copy commands and even deletions can fail or take forever as memory tries to swap to a full disk and there's very little you can do to free up large chunks of space. This reasoning doesn't make sense. On Linux, swap is preallocated. This is true regardless of whether you're using a swap partition or a swap file. See man…

IIRC, swap is actually needed for some memory operations. And when you run out of memory, the behaviour is often worse without swap. These days I always at least configure an in-memory compressed swap (zram).

Depends if you want things to gracefully degrade because you know you don't have enough RAM or if you'd rather things just straight up die. E.g. for the things I work on my laptop with if whatever I do isn't going to work with 128 GB of RAM (80% of which was meant to be cached data not actually used) then it's because it went horribly wrong and needs to be halted not because I needed some swap which is just going to try to hide that things have gone horribly wrong for a minute and then die anyways. Now if I were doing the same things on a machine with 8 GB or 16 GB of RAM then yeah I want to gracefully handle running out of physical memory because things are probably working correctly it's just a heavier load and it can be better to swap pages to disk than drop them from a small amount of cache completely.

Re: All my servers have an 8 GB empty file on disk

#315
post #207

It's interesting to me that linux doesn't natively reserve a little space to allow basic commands like directory listing and file deletion to function even with a full disk. Because really the biggest problem when I've had a partition get full, is I sometimes can't even delete the offending log file.

It still boggles my mind that the act of deleting a file can fail because it requires space to perform the act. If y'ask me, that's a fundamental design flaw. Of course nobody asked me...

Depends entirely on the design of the file system. In copy-on-write file systems, it's a necessity: you need to at least allocate a new metadata block that doesn't record the existence of some file... and that's assuming you don't have snapshots keeping it allocated anyway.

You can run into real trouble on btrfs if you fill it, it has no reserve space to protected from this scenario. ZFS at least reserves a fraction of the total space so that deletes are allowed to work even when the pool reaches 100% capacity.

Re: All my servers have an 8 GB empty file on disk

#316
This reminds me of a similar story in a classic Gamasutra article[1] (the section is "The Programming Antihero", and I'd recommend the other pages of the article for a few good chuckles). Apocryphal or not, it makes for a good story.

> I can see how sometimes, when you're up against the wall, having a bit of memory tucked away for a rainy day can really make a difference. Funny how time and experience changes everything.

[1] https://www.gamasutra.com/view/feature/132500/dirty_coding_t...

Re: All my servers have an 8 GB empty file on disk

#317

I always thought that database files should be on a different drive from the os. If the db fills up the HD, the os is still running smoothly.

Yep, ideally you'd have seperate partitons for /var, /tmp, /home, root, any application/db data ..

Re: All my servers have an 8 GB empty file on disk

#318
post #113

How is this better than sounding alarms when free disk space drops below 8GB? If you’re going to ignore the alarms, then you’re going to have the same problem after you remove your spacer file and the disk fills up again!

Compare the rate an haywire process can fill up disk to your response time to alarms, and you got your answer right there.

I don't understand. You will still have an alarm when the disk fills up, and you will need to respond and delete the spacer file. Your response time latency will be the same, right?

Re: All my servers have an 8 GB empty file on disk

#319

Earlier quoted context omitted.

Most motorcycles are surprisingly manual. This was originally a necessity (like in cars), but remains aesthetically preferable for many riders. OTOH, Honda Goldwings have stereo systems. They might grow an automatic fuel reserve switcher-backer someday too. :)

Fuel injected motorcycles don’t have reserve (at least, none that I’ve seen.) instead they have low fuel lights or full fuel gauges. I’m guessing it’s because the fuel pumps are in the tank and the fuel injection system needs high pressure.

Fuel injectors require filtered gas because even small particles can clog them, and said filter is more likely to be clogged or even compromised by sucking up the last drops of fuel (and scale and debris) in the tank, so the low-fuel warning is required.

Carb jets can get clogged, too, but are wider since they're not under as much pressure. Also, since they're a wear item they're a lot easier to clean and/or replace.

Post reply on HN