Live data from Hacker News

All my servers have an 8 GB empty file on disk

brianschrader.com

591–600 of 715 posts

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

#591
Reminds me of the cron task I set up once, long time ago, on a bare metal server. It would kill and relaunch a web service every 4 hours.

The service in question didn't require high availability (it was a mailing list processing/interface thing, if I remember correctly) but it had some memory leak which would eventually devour all the memory in the server, in about 2 days.

This hack served its purpose well, until the service was eventually replaced by something else.

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

#593

Earlier quoted context omitted.

I noticed a weird thing here. All the regular pasta rapidly disappeared. Rice also was gone. But "Gluten Free"(I am a GFer) pasta - in this case, pasta made from rice - was fine! I amused myself with the idea that people:"would rather starve to death than eat that GF crap." :-)

Out of curiosity: did people really experience empty grocery shelves or are phrases such as "rapidly disappeared" meant more as hyperbole? I live in a Chicago suburb, and while variety did decrease (I still can't get Coke Zero Cherry) the basics were always in stock throughout the pandemic time.

In the UK flour and yeast disappeared from the shelves for quite a while during the first lockdown baking boom.

The issue wasn't a shortage, but a shortage of flour in small bags.

Interestingly I saw some supermarkets fill up bags they usually use for bakery items to just sell the flour which seemed like a smart solution!

Also in March/April last year hand soap and toilet roll was hard to come by.

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

#594
post #395

Earlier quoted context omitted.

I'm surprised that the swap implementation (or distros swap configuration) is so bad on Linux. I have a fresh Ubuntu 20.10 desktop installation and a few times it has come to slow crawl where you can't do anything, can't escape to tty or ssh, reboot is basically the only option. I recently learned searching the internets that it was the swapfile configuration. My 16GB RAM machine got a 2GB swapfile from the default i…

I had zero problems without swap-files for a long time, thinking that 16gb was a lot of ram, and that i could manage. it wasn't and i couldn't. Now I run two swap partitions the size of physical memory on all machines. Turns out that after some weeks a good third of allocated ram lives in swap proving its usefulness .. and that its quick to turn the aux-swap partition into one for lvm snapshots and i suppose to act a…

That explains it, I noticed that if my machine was on for a while a degradation in performance happened, it was probably the swapfile then too, especially when it only has 2GB to work with.

Yes, I probably need to set my swapfile to 16GB, I'm also investigating the swappiness setting, default 60 for desktop.

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

#595

Earlier quoted context omitted.

> This is similar to how some government agencies retain their budgets. The non-government sector isn’t immune to this.

If whatever actions turn a non government entity into something inefficient, then the entity wont survive for long and will go out of business (or at least that's the hope of a competitive free market economy)

Banks get to privatize the profits and socialize the loses often.

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

#596

Earlier quoted context omitted.

Surprised there isn't a mechanism that mechanically switches the petcock over when you put a fuel nozzle up to the port

Typically there aren't two separate tanks - In one tank there are two tubes at different heights. As the fuel level falls below the height of the "main" tube the engine sputters, then turning the petcock engages the lower down "reserve" tube which is still below the fuel level. It's more of a warning than a true reserve, and most bikes with an actual fuel gauge don't have a reserve.

On bikes like that, there's a reserve-reserve trick sometimes. Sometimes, the tank is an inverted U shape so when the pickup runs dry there's still a little more fuel on the other side of the U. If the bike is light enough, you can stop the bike and lean it way over to pour that last bit over to the pickup side. Might get you another couple miles.

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

#597
post #383

Earlier quoted context omitted.

I think the problem is that you do not need 100% of your budget every year, but getting it back when you do need it is much harder than keeping it in the first place. Definite case of misaligned incentives.

Yep! The problem happens when you divide the safety buffer up in the first place. Safety buffers demand to be shared, when one part does not use all of its safety margin you want to transfer that to another system. Another surprising place where this happens is project scheduling. We budget time for each individual step of a project based on our guess of a 90% or 95% success rate, then our "old-timers' experience" ki…

Have you ever thought of just accepting that you can't predict how long a project will take to complete?

It's a revelation. You get to have some hard conversations with other managers. But in the end everyone finds it easier to deal with "it'll be ready when it's ready" rather than endless missed deadlines and overruns.

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

#598

A lot of tips in this thread are about how to better alert when you get low on disk space, how to recover, etc. but I'd like to highlight the statement: "The disk filled up, and that's one thing you don't want on a Linux server—or a Mac for that matter. When the disk is full nothing good happens." As developers, we need to be better at handling edge cases like out of disk space, out of memory, pegged bandwidth and pe…

> As developers, we need to be better at handling edge cases like out of disk space, out of memory, pegged bandwidth and pegged CPU

In what situation though? Let's consider disk space. This certainly does not apply to all developers or all programs. Making your program understand the fact that the system has no space left does not seem like something that would be very productive in the vast majority of cases. Like running out of memory, it is not something the program can recover from all by itself unless it knows it created temporary files somewhere that it could go and delete. If that scenario does in fact apply to your program, then it's not even an edge case: the program should be deleting temporary files if it doesn't need them anymore. If the P3 was created to add support for that exact function, then I agree that it should be acted upon. A P3 is fine as long as it's reached. If you don't reach your P3s ever, then there are different issues that need addressing. I'd even say for something littering users' disks it should be higher than a P3, but the point is it's a specific case where it makes sense to handle that error. In every other case, your best bet is a _generic_ exception handler for write operations that will catch any failure and inform the user (e.g. "[Errno 28] No space left on device"), but that's something that should already be a habit.

There are cases when you want to try to avoid running out of disk space because your program might know that it needs to consume a lot of it (e.g. installers) so it will be checked preemptively. Even then you probably do want to try to handle running out of disk space (e.g. in the unfortunate event that something else consumed the rest of your disk _after_ you preemptively calculated how much was required) so you can attempt a rollback and inform the user to try again.

Other than that, when else is that _specific_ error more important than knowing that the data just couldn't be written in general? Let's say you have a camera app that tries to save an image. Surely you'd have a generic exception handler for not being able to save the image, rather than a specific handler for "out of space", which seems oddly specific considering there are literally hundreds of specific errnos you could be encountering that would prohibit you from writing. I'm sure the user doesn't want to see something like "Looks like you're out of disk space. Do you want to try save this image in lower quality instead?"

So my point in all of this is I agree that we should _consider_ the impact of disk space but it doesn't need to be prioritized by developers unless it's actually important like in the first few examples I gave.

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

#599
post #548

Earlier quoted context omitted.

If whatever actions turn a non government entity into something inefficient, then the entity wont survive for long and will go out of business (or at least that's the hope of a competitive free market economy)

> competitive free market economy It was not even believed by Adam Smith. He writes that it only works that way in a controlled environment. That’s why European countries usually rank higher in market freedom than the US, because we don’t have companies getting so cancerously big that they have very real effects on law making (how lobbying is legal is still beyond me)

You need to take another look at how the EU makes laws, and who gets to propose them, and who they talk to.

It's less blatant, but just as pernicious.

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

#600

Earlier quoted context omitted.

Perfect example of the tragedy of the commons. If individuals don't create these balloon files then they won't be able to use the file server when they need it, yet by creating these balloon files the collective action depletes the shared resource of its main function.

Tragedy of the Commons is the libertarian "private property is essential" interpretation. It's a cynical take, assuming that human selfishness is the deepest of truths and that there is no use fighting it, that the best solution is to organize society around it. The conventional Game Theory take is that this is a prisoners dilemma, and everyone creating balloon.txt files are defecting. They are making the most ration…

This is self conflicting. You take "human selfishness is the deepest of truths" as a mere assumption, then you say "we need to transcend our base natures".

Human selfishness IS nature. It is not just about humans either, all evolution is guided by environment (resource availability).

For anything else you need ALL people to NOT be selfish, only some being altruistic does not cut it. Your only other option is to punish selfishness, but then you will ban progress.

If most people don't create the balloon.txt file, BUT, there is no punishment for creating one, then if I believe I have a good idea and that I DESERVE more resources to pursue it, I'll create a nice big balloon.txt file. Your only option is to punish me for doing so. I would not want to live in a world where people are punished for trying to gather resources to make things that most other people won't. Some people have bright ideas, and they need resources to pursue them. Most people don't have many ideas and they don't want to do anything. If you prevent the means of passionate people to gather big resources to do big things, and want to live in a zero entropy world where everything is equal (made sure through the use of force / punishment, which will eventually be corrupt, because by definition punishers can't be equals to others) and nothing moves because of it, keep dreaming. It is not even scary because that literally cannot happen.

Post reply on HN