TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Forgetting about the problem of memory

31 pointsby CyberRabbiabout 3 years ago

4 comments

karmakazeabout 3 years ago
&gt; The thing is, while the odd application crash due to memory exhaustion probably doesn’t bother some, it certainly bothers me. Do we really trust that applications will reliably save necessary state at all times prior to crashing due to a malloc failure? Are we really ok with important system processes occasionally dying, with system functionality accordingly affected? Wouldn’t it be better if this didn’t happen?<p>With virtual memory and paging, it&#x27;s really up to the user what&#x27;s too taxing on their system. And it&#x27;s not an either-or, I greatly value an application that reliably saves its state consistently and often. Sublime Text is fantastic, I don&#x27;t even have to press Save and can just pull the plug on the machine. This mitigates the allocation failure case as well as so many other failures.
评论 #31227472 未加载
hyperman1about 3 years ago
I had a tiny business web site running a few 100 maybe 1000 http requests per minute, either static or doing minimal php&#x2F;mysql work. So I hired a cloud machine of 512MB because shoestring budget. Resized a few memory pools.<p>It worked great, until the mysql dataset grew enough. There was a backup job running 7z and pulling the compressed DB to a storage machine. It turns out 7z crashed because of the OOM killer.<p>The http service itself just kept going on, OOM or not. Presumably because backup ran at 3AM and almost nobody was using it at that time.
whatever1about 3 years ago
The most annoying thing that apps do (even freaking vectors in c++) is that they do not return the memory to the system after they are done with a big task. Rather they will keep the memory just in case in the future they need it again.<p>No the unused memory is not yours to manage. Return it to the OS.
cameronh90about 3 years ago
One reason for overcommit is because of COW.<p>For example, you fork() then exec() from a process using 16GB of memory: without overcommit, you briefly need 32GB of memory.