Readit News logoReadit News
barchar commented on IBM Plunges After Anthropic's Latest Update Takes on COBOL   zerohedge.com/markets/ibm... · Posted by u/gradus_ad
UncleOxidant · 20 days ago
This makes no sense. If IBM supposedly gets a significant amount of revenue from COBOL (a dubious proposition) then wouldn't this actually help them as COBOL programmers are getting rarer and rarer?
barchar · 20 days ago
Plus it's not like there aren't cobol environments for more commodity hardware. Hell GCC just got a new cobol frontend last year!
barchar commented on Vm.overcommit_memory=2 is the right setting for servers   ariadne.space/2025/12/16/... · Posted by u/signa11
minitech · 3 months ago
> This is largely not true for most processes.

> In most scenarios, forking a process has a negligible effect on the overall memory consumption in the system.

Yes, that’s what they’re getting at. It’s good overcommitment. It’s still overcommitment, because the OS has no way of knowing whether the process has the kind of rare path you’re talking about for the purposes of memory accounting. They said that disabling overcommit is wasteful, not that fork is wasteful.

barchar · 3 months ago
Yep. If you aren't overcommitting on fork it's quite wasteful, and if you are overcommitting on fork then you've already given up on not having to handle oom conditions after malloc has returned.
barchar commented on Vm.overcommit_memory=2 is the right setting for servers   ariadne.space/2025/12/16/... · Posted by u/signa11
inkyoto · 3 months ago
Also,

> Thread stacks come up because reserving them completely ahead of time would incur large amounts of memory usage. Typically they start small and grow when you touch the guards. This is a form of overcommit.

Ahead of the time memory reservation entails a page entry being allocated in the process’s page catalogue («logical» allocation), and the page «sits» dormant until it is accessed and causes a memory access fault – that is the moment when the physical allocation takes place. So copying reserved but not accessed yet pages has zero effect on the physical memory consumption of the process.

What actually happens to the thread stacks depends on the actual number of active threads. In modern designs, threads are consumed from thread pools that implement some sort of a run queue where the threads sit idle until they get assigned a unit of work. So if a thread is idle, it does not use its own stack thread and, consequently, there is no side effect on the child's COW address space.

Granted, if the child was copied with a large number of active threads, the impact will be very different.

> Even windows dynamically grows stacks like this

Windows employs a distinct process/thread design, making the UNIX concept of a process foreign. Threads are the primary construct in Windows and the kernel is highly optimised for thread management rather than processes. Cygwin has outlined significant challenges in supporting fork(2) semantics on Windows and has extensively documented the associated difficulties. However, I am veering off-topic.

barchar · 3 months ago
I am aware reserving excess memory doesn't commit said memory. But it does reserve memory, which is what we were talking about. The point was that because you can have a lot of threads and restricting reserved stacks to some small value is annoying all systems overcommit stack. Windows initially commits some memory (reserving space in the page file/ram) for each but will dynamically commit more when you touch the guard. This is overcommit. Linux does similarly.

Idle threads do increase the amount of committed stack. Once their stack grows it stays grown, it's not common to unmap the end and shrink the stacks. In a system without overcommit these stacks will contribute to total reserved phys/swap in the child, though ofc the pages will be cow.

> Windows employs a distinct process/thread design, making the UNIX concept of a process foreign. Threads are the primary construct in Windows and the kernel is highly optimised for thread management rather than processes. Cygwin has outlined significant challenges in supporting fork(2) semantics on Windows and has extensively documented the associated difficulties. However, I am veering off-topic.

The nt kernel actually works similarly to Linux w.r.t. processes and threads. Internally they are the same thing. The userspace is what makes process creation slow. Actually thread creation is also much slower than on Linux, but it's better than processes. Defender also contributes to the problems here.

Windows can do cow mappings, fork might even be implementable with undocumented APIs. Exec is essentially impossible though. You can't change the identity of a process like that without changing the PID and handles.

Fun fact: the clone syscall will let you create a new task that both shares VM and keeps the same stack as the parent. Chaos results, but it is fun. You used to be able to share your PID with the parent too, which also caused much destruction.

barchar commented on Performance Hints   abseil.io/fast/hints.html... · Posted by u/danlark1
yvdriess · 3 months ago
In cpu uarch design, sure, but that's outside the context of the discussion. There's nothing you can do to that C++ library you are optimizing that will impact performance due to register allocation/renaming.
barchar · 3 months ago
This is not always true. Compilers are quite good at register allocation but sometimes they get it wrong and sometimes you can make small changes to code that improve register allocation and thus performance.

Usually the problem is an unfortunately placed spill, so the operation is actually l1d$ traffic, but still.

barchar commented on Vm.overcommit_memory=2 is the right setting for servers   ariadne.space/2025/12/16/... · Posted by u/signa11
inkyoto · 3 months ago
Without going into a discussion about whether this is right or wrong, how is fork(2) wasteful?

fork(2) has been copy-on-write for decades and does not copy the entire process address space. Thread stacks are a non-sequitur either as stack uses the data pages, the thread stacks are rather small in size in most scanarios, hence the thread stacks are also subject to copy-on-write.

The only overhead that the use of fork(2) incurs is an extra copy of process' memory descriptior pages, which is a drop in the ocean for modern systems for large amounts of RAM.

barchar · 3 months ago
Unless you reserve on fork you're still over committing because after the fork writes to basically any page in either process will trigger memory commitment.

Thread stacks come up because reserving them completely ahead of time would incur large amounts of memory usage. Typically they start small and grow when you touch the guards. This is a form of overcommit. Even windows dynamically grows stacks like this

barchar commented on Vm.overcommit_memory=2 is the right setting for servers   ariadne.space/2025/12/16/... · Posted by u/signa11
barchar · 3 months ago
Fwiw you can use pressure stall information to load shed. This is superior to disabling overcommit and then praying the first allocation to fail is in the process you want to actually respond to the resource starvation.

Fact is that by the time small allocations are failing you are almost no better off handling the null than you would be handling segfaults and the sigterms from the killer.

Often for servers performance will fall off a cliff long before the oom killer is needed, too.

barchar commented on Vm.overcommit_memory=2 is the right setting for servers   ariadne.space/2025/12/16/... · Posted by u/signa11
renehsz · 3 months ago
Strongly agree with this article. It highlights really well why overcommit is so harmful.

Memory overcommit means that once you run out of physical memory, the OOM killer will forcefully terminate your processes with no way to handle the error. This is fundamentally incompatible with the goal of writing robust and stable software which should handle out-of-memory situations gracefully.

But it feels like a lost cause these days...

So much software breaks once you turn off overcommit, even in situations where you're nowhere close to running out of physical memory.

What's not helping the situation is the fact that the kernel has no good page allocation API that differentiates between reserving and committing memory. Large virtual memory buffers that aren't fully committed can be very useful in certain situations. But it should be something a program has to ask for, not the default behavior.

barchar · 3 months ago
Even besides the aforementioned fork problems not having overcommit doesn't mean you can handle oom correctly by just handling errors from malloc!
barchar commented on Why are 38 percent of Stanford students saying they're disabled?   reason.com/2025/12/04/why... · Posted by u/delichon
vl · 3 months ago
Have you tried Adderall? It gives extreme competitive edge. Just to get legal and easy access to performance-enhancing drugs in elite educational (aka competitive) setting it makes sense to get "disability".

And given how loosely these conditions are defined, it's not even cheating in the true sense of the word.

barchar · 3 months ago
They really don't, and if they did then would it be so bad if people who didn't "need" them took them?

Obviously if there's safety issues but for stimulants unsafe doses will 100% always decrease performance, because they'll affect sleep.

barchar commented on Why are 38 percent of Stanford students saying they're disabled?   reason.com/2025/12/04/why... · Posted by u/delichon
qazxcvbnmlp · 3 months ago
Well put.

> A lot of modern, aspiring-middle-class and online culture

Theres also a pernicious way of identifying with the struggle. Instead of I have trouble focusing in certain situations, so maybe I should find ways to spend my time (careers, hobbies) that work well with that. We instead go to 'I have ADHD' and my 'job' should make special accommodations for me.

Regardless of whether a job should or should not make accommodations. It's not a very helpful construct to think they should. It removes agency from the person experiencing the struggle. Which in turn puts them farther from finding a place that they would fit in well.

For the vast majority of behaviors (ADHD, attachment issues, autism, etc) they exist on a continuum and are adaptive/helpful in certain situations. By pathologizing them, we(society) loose touch for what they mean in our life. It also makes discourse hard because the (this is causing me to truly not be able to function) gets mixed in with the (this is a way that my brain behaves, but I can mostly live a life).

barchar · 3 months ago
I don't see how you spending time in ways that work well with your challenges is different from your job providing accomodations, except that if your employer is willing to work with you then you don't have to randomly roll the dice until you come up with an employer where things happen to work in whatever way you wanted.

It's not like one of the accomodations on the table is "not doing your job"

barchar commented on The 'S&P 493' reveals a different U.S. economy   msn.com/en-us/money/marke... · Posted by u/MilnerRoute
blue1 · 4 months ago
So a viable strategy would be to only buy the best 7 stocks? Like the Dogs of the Dow, but reversed? (The Gods of the Dow?)
barchar · 3 months ago
This is probably ok if you consistently sell stuff that exits the top7 and buy stuff that enters, but I kinda doubt it's all that much better. Same as the s&p500 and the Russell 5000 have really similar returns.

You'll be more exposed to screwing things up when companies enter/leave.

u/barchar

KarmaCake day111March 12, 2014View Original