News for hackers. Stuff that matters.

tawy12345

The rationale for disabling overcommit only really makes sense if physical and virtual memory consumption are in the same ballpark. That's true for some workloads but not generally true.

There are totally legitimate use cases for processes that use significantly more virtual memory than physical memory (since virtual memory is relatively cheap, but physical memory isn't). A lot of programs are going to touch and not release all virtual memory they allocate from the kernel, but there are plenty of important counterexamples.

fork()/exec() is one example (which I've been burned by personally), but there are plenty of others. Any program that uses TCMalloc and has fluctuating memory consumption will have a lot of virtual address space allocated but not backed by physical pages. Sophisticated programs like in-memory caches or databases can also safely exploit a larger virtual memory space while keeping the amount of physical memory bounded.

Re:Amazon's Anti-Union Training Video [video] on Sunday August 04, 2019 @12:24AM (#20604418)
Singapore has also really only existed in its current form for a bit more than a half century and has had three leaders, two of which were immediate family. It hasn't really shown that autocracy works over longer time scales - in history there are plenty of cases where benevolent autocratic governments (monarchies, empires, etc) had extended periods of stability and prosperity.
Re:The art of interrupting software engineers on Tuesday July 30, 2019 @01:04AM (#20562257)
It sounds like a low trust environment.

If you actually need to know whether something is falling behind schedule every few hours (which seems unusual), of course not everybody is going to provide updates that frequently of their own volition. But most good engineers, under the right circumstances, will have a sense for when something is not on track and can raise their concerns.

If you actually had a good level of trust on the team, you would work to get people to buy into it. Of course, it's probably hard to convince most engineers that you actually need an update twice a day, for good reason.

Re:How fast can a BufferedReader read lines in Java? on Saturday July 27, 2019 @12:10PM (#20542647)
I'm amazed at how upset some commenters are about a blog post that did a toy experiment and didn't actually make any strong claims.

I'm actually a stickler about good benchmarks - it riles me when people draw sweeping conclusions from poorly-designed experiments. Lemire is actually one of the good ones. If you want something more fully developed than a blog post, read one of his papers.

I personally really enjoy his blog because of this - he's good at picking interesting exploratory experiments that provide some insight, without trying to over-generalize from the results. If you read his conclusion, the point is that there is a good probability that even relatively simple programs are CPU-bound. His experiment supports that point. My experience also matches that - I've seen a lot of data processing code that could be I/O bound in theory (i.e. a perfect implementation could max out CPU or network) but is CPU bound in practice. Usually because of string manipulation, regexes, or any number of other things.

> This is not the best that Java can do: Java can ingest data much faster. However, my results suggest that on modern systems, Java file parsing might be frequently processor-bound, as opposed to system bound. That is, you can buy much better disks and network cards, and your system won’t go any faster. Unless, of course, you have really good Java engineers.

Re:Avoid Indirection in Code on Monday June 24, 2019 @11:39AM (#20264605)
I think some commenters don't understand the challenges of reviewing code contributions as an open source maintainer. Many people already feel like they're doing you a favour by contributing any code. This is amplified if they've followed "best practices" and broken it down into many tiny functions and objects. As a maintainer, having to review and maintain code that is abstracted in the wrong way is a major headache. Trying to tell someone that their code is over-abstracted risks starting a debate on the code review and generally derailing the process.

An article like this at least sets some precedent and gives you something to point to.