Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us $3,400 per month for bandwidth bills alone, and since we don't believe in shoving popup ads to our registered users, we try to make the money back through forum registrations.
«2 »
  • Post
  • Reply
DuckConference
May 27, 2004



well-meaning, naive user: do I have enough memory to run my program?

unhelpful kernel: i dunno, i guess just try running it and see if your computer gets too slow

Adbot
ADBOT LOVES YOU

The Management
Jan 2, 2010

sup, bitch?


alright letís do this. without overcommit your app that ran yesterday wonít run today because you have an open browser tab that has too many images that you havenít looked at in six hours.

r u ready to WALK
Sep 29, 2001



the stupid part about overcommit is that it conditions programmers to always assume that memory allocation requests succeed and never implement any error handling
programs that gracefully handle an out of memory condition are a rarity nowadays

autogrowing page files is also really stupid since a leaky application can grind the whole system to a halt with 100gb of garbage paged out to disk. There should never be a reason to have more than maybe 8gb swap total.

iOS having APIs to tell an application "hey clean up your poo poo or i'm going to terminate you" is one of the few things they did better on mobile platforms, the iphone 4 got by on 512mb ram and adding more memory just seems to make developers more wasteful.

DuckConference
May 27, 2004



The Management posted:

alright letís do this. without overcommit your app that ran yesterday wonít run today because you have an open browser tab that has too many images that you havenít looked at in six hours.

if that browser was developed in a world without overcommit, it wouldn't have been made to hold on to large amounts of memory like that in the first place.

Jonny 290
May 5, 2005

[A]sk me about OS/2 WARP


hmm, OP. Many questions raised here

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'


Clever Betty

640K really ought to have been enough

Suspicious
Apr 30, 2005
You know he's the villain, because he's got shifty eyes.


os/2 is the operating system of the 90's

Pardot
Jul 25, 2001


i turn it off for postgres servers because pg is written to notice when memory is out and kill poo poo intelligently, unlike the oomkiller

Ploft-shell crab
Dec 9, 2010


DuckConference posted:

well-meaning, naive user: do I have enough memory to run my program?

unhelpful kernel: i dunno, i guess just try running it and see if your computer gets too slow

swap.avi

Ploft-shell crab
Dec 9, 2010


back in my day your memory addresses were real, none of this virtual poo poo

echinopsis
Apr 13, 2004



College Slice

quite bullshit that peek and poke arent modern tools

Perplx
Jun 26, 2004


Best viewed on Orgasma Plasma

Lipstick Apathy

itís good because it mirrors the behaviour of actual users that buy a gym memberships and go once

carry on then
Jul 10, 2010

donut gravy boat


big "we wouldn't need processors faster than a pentium 3 if software developers weren't morons" energy itt

Displeased Moo Cow
Jun 15, 2009

Office Worker



ďjust jam it in there and see how it goesĒ is a legitimate process step

DuckConference
May 27, 2004



carry on then posted:

big "we wouldn't need processors faster than a pentium 3 if software developers weren't morons" energy itt

i don't feel any shame about it

rotor
Jun 11, 2001

Official Carrier
of the Neil Bush Torch

 
 
 
 
teh butts


you, impetuous and foolish: "my elaborate calculations show that this task will result in an out of memory condition"

me, patient and sagacious: "only one way to find out"

rotor
Jun 11, 2001

Official Carrier
of the Neil Bush Torch

 
 
 
 
teh butts


carry on then posted:

"we wouldn't need processors faster than a pentium 3 if software developers weren't morons"


and if froggy had wings he wouldn't bump his rear end a-hoppin

The Management
Jan 2, 2010

sup, bitch?


letís clarify what it means to run without overcommit. it can be one of several things.

1. every process gets a fixed size memory segment. it does not grow or shrink.

2. every process gets a fixed size memory segment, but libraries are loaded in a shared region.

3. processes can grow their memory allocation. if a process tries to grow and there is not enough available memory, its request is denied and it needs to deal with the consequences.

4. processes can grow. if there is not enough memory, the OS asks other processes to release some memory. if processes donít release memory, too bad.

5. same but if processes donít release memory, the os kills them.


numbers 1 and 2 require processes to know their maximum memory requirement, and temporally waste a large amount of memory. it is also very restrictive because processes need to avoid temporary ballooning of memory allocations because they will either need to request a larger segment or they will hit the ceiling of their allocation.

number 3 is anarchy. an unfortunate combination of processes that happen to hit a memory peak at the same time can exclude each other and deadlock the system. programmers must be able to handle allocation failures everywhere. most code thinks itís doing it, but rarely are those paths all tested and correct.

number 4 is the same as 3. many processes cannot reasonably halt what they are doing and release memory at request time. memory becomes a contended resource with processes repeatedly trying to acquire more to get their work done, and ignoring release requests. the system ends in memory deadlock again when memory high tide hits.

number 5 is the out of memory killer. it sucks. and killing processes that have other processes depending on them can be catastrophic and unrecoverable, requiring a userland reboot

Cybernetic Vermin
Apr 18, 2005



that's a lot of cases to consider when really the choice is between

a) have your computer infrequently run at degraded performance until you, or the system, kills off a few resource hogs,

or,

b) make all software more fragile and hard to write while making your computer and software quite frequently unstable even with the best possible effort applied.

DuckConference
May 27, 2004



The Management posted:

number 5 is the out of memory killer. it sucks. and killing processes that have other processes depending on them can be catastrophic and unrecoverable, requiring a userland reboot

this is where I live right now, embedded devices that have effectively no swap (some use ZRAM) and run a bunch of javascript in 512MB of RAM. it is not good.

anyway my ex-girlfriend wants to get back together and I've got some unrelated some poo poo happening in the next few days so it will be a bit before I can properly argue for this gimmick position that I kind of also believe for real. namaste

The Management
Jan 2, 2010

sup, bitch?


DuckConference posted:

ex-girlfriend wants to get back together

donít

DuckConference posted:

embedded javascript

donít

The Management
Jan 2, 2010

sup, bitch?


also, no overcommit in an embedded system where thereís no paging and no user-installed apps is perfectly reasonable.

Cybernetic Vermin
Apr 18, 2005



in general whenever one can define a single task as the primary function of the system it is plenty doable. e.g. ipados has a very easy time freeing up memory since it is low-impact to kill things (with tombstoning), and up until the focused app (and the system itself) is using all the memory themselves you can just go wild if you want.

but even there i think overcommit is good practice, it is a really convenient feature and great optimization, and doing anything more than trivial attempts to recover from oom becomes incredibly messy very quickly. not least software would almost necessarily allocate defensively (e.g. allocate all the memory you could need at the start of a transaction rather than risk having to deal with an oom partway through), and i don't see any reason to believe that they'd do a better job of not allocating memory they then don't use (i.e. every single buffer being larger than is used in 99% of cases), so a system without overcommit would start killing stuff way way before a system with overcommit would degrade in any way.

e: i guess if we had the halting problem solved and could have the oom killed just slay the process with the most pages allocated which it will turn out to not use we'd have the right incentives in place and the outcomes would be what the op is likely imagining. but really i think this captured this angle:

carry on then posted:

big "we wouldn't need processors faster than a pentium 3 if software developers weren't morons" energy itt

Cybernetic Vermin fucked around with this message at 08:20 on Aug 3, 2020

echinopsis
Apr 13, 2004



College Slice

serious question time



is your ex gf freaky in the sack 🤔

animist
Aug 28, 2018

yeet



having spent time attempting to run jobs on shared GPUs that don't have virtual memory, i love returning to the land of overcommit

Cybernetic Vermin posted:

but even there i think overcommit is good practice, it is a really convenient feature and great optimization, and doing anything more than trivial attempts to recover from oom becomes incredibly messy very quickly. not least software would almost necessarily allocate defensively (e.g. allocate all the memory you could need at the start of a transaction rather than risk having to deal with an oom partway through)

tensorflow does this, it always reserves all available GPU memory at process boot. this means you're SOL if you're trying to run a job on a shared node. wanna run some intensive physical simulations on this cluster? too bad, somebody is doing Machine Learning and that is more important than whatever you're trying to do

of course if you try to reserve more memory than available on a GPU, your CUDA program will immediately segfault. that's also annoying

overcommit is fine

suffix
Jul 27, 2013

Wheeee!


it should be last commit wins

echinopsis
Apr 13, 2004



College Slice

paper rock scissors???

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'


Clever Betty

we should just call the doomkiller and let our hell programs be slain as is right

DuckConference
May 27, 2004



echinopsis posted:

serious question time



is your ex gf freaky in the sack 🤔

we had good chemistry and got along well a lot of the time, because any anger or frustration she had with me was suppressed and compressed into a tiny little landmine that I would eventually trip over and lead to a fight that she would continue until I hated her and myself. then repeat.

r u ready to WALK
Sep 29, 2001



https://github.com/orsonteodoro/psdoom-ng1

https://www.youtube.com/watch?v=xc4pIvD0uHk#t=120s

DuckConference
May 27, 2004



The Management posted:

donít


donít

sadly I can do nothing to prevent or change the javascript, and the system is already way too short on memory to ever turn off overcommit.

Achmed Jones
Oct 16, 2004









Shredded Hen

sounds like you're the one short on memory if you're getting back with an ex!!!!!

i don't mean it I just wanted to make the joke. you do what you need to do

The Management
Jan 2, 2010

sup, bitch?



looks like we found the true calling of this thread. I donít know what itís like dating in the time of the plague, but I do know that getting back with your ex is a desperation move and it will be depressing from the minute the afterglow of the first boning wears off.

DuckConference posted:

sadly I can do nothing to prevent or change the javascript, and the system is already way too short on memory to ever turn off overcommit.

Iíve been there, with a super-slow storage device that made paging painful. the technical solution is none, itís hosed and itís going to be bad if it ever ships.

now is the time to cover your rear end. the long term solution is not to work with idiots and to get sign off on the specs of the system before it is made. the short term solution is to blame the people who got you into this. go to your management and tell them that theyíve put you in an impossible situation and they will have to eat this turd that they created. then you can try to put in a heroic effort and rescue it, but youíre setting yourself up for not getting blamed when itís still terrible.

DuckConference
May 27, 2004



quote:

sounds like you're the one short on memory if you're getting back with an ex!!!!!

i don't mean it I just wanted to make the joke. you do what you need to do

i legit wish she would watch Eternal Sunshine of the Spotless Mind and maybe internalize some of that

maybe I should watch that movie again

The Management posted:

looks like we found the true calling of this thread. I donít know what itís like dating in the time of the plague, but I do know that getting back with your ex is a desperation move and it will be depressing from the minute the afterglow of the first boning wears off.

i was sure that getting back together was a bad idea but when someone who cares a lot about you makes the argument that it's a good idea it messes with you

quote:

the technical solution is none, itís hosed and itís going to be bad if it ever ships.

Too late, it's shipped in the millions. Just trying to do what I can to help un-gently caress it.

echinopsis
Apr 13, 2004



College Slice

if people want to, they can change, and look inside themselves and make efforts to reduce their toxic behaviour

and ultimately no relationship or person is perfect, finding someone that loves and cares about you is precious.

communication can be hard.. so hunt down some mdma

DuckConference
May 27, 2004



echinopsis posted:

if people want to, they can change, and look inside themselves and make efforts to reduce their toxic behaviour

and ultimately no relationship or person is perfect, finding someone that loves and cares about you is precious.

communication can be hard.. so hunt down some mdma

i feel like two breakups and a year of couples counseling is enough to conclude it isn't a viable relationship

The Management
Jan 2, 2010

sup, bitch?


donít overcommit to doomed relationships

Kazinsal
Dec 13, 2011




OP be honest was this thread intended to just be a complex /r/relationships post? because this romance really does sound like the oomkiller

The Management posted:

alright let’s do this. without overcommit your app that ran yesterday won’t run today because you have an open browser tab that has too many images that you haven’t looked at in six hours.

browsers should be hibernating tabs you haven't used in ages / other tabs by last use time and memory consumption when memory constraints arise

echinopsis
Apr 13, 2004



College Slice

DuckConference posted:

i feel like two breakups and a year of couples counseling is enough to conclude it isn't a viable relationship

yeah but she likes him

Adbot
ADBOT LOVES YOU

Cybernetic Vermin
Apr 18, 2005



Kazinsal posted:

OP be honest was this thread intended to just be a complex /r/relationships post? because this romance really does sound like the oomkiller


browsers should be hibernating tabs you haven't used in ages / other tabs by last use time and memory consumption when memory constraints arise

and do you figure regular people will tend to prefer:
a) the browser which randomly crashes an important tab as it runs out of memory to revive it; or;
b) the browser which always runs perfectly (because on startup it runs malloc(0.8*TOTAL_PHYSICAL_MEMORY) on startup and then just runs jemalloc in that arena for its own use)

of course on b) they will have other apps which crash, but guess which piece of software gets blamed?

even among power users (or simple yosposters) i am quite sure you'd wind up running some utility where you statically assign like 30% of the total memory to the browser (telling it that that is the total physical memory) and handtweaking the percentages day to day. or possibly using a shareware bit of software which largely implements overcommit, compression, and dynamic limits in some way, getting all the enjoyment of macos-7-levels of system stability.

e: as in, again: saying what software *should* do does you very little good as reality will not resemble that at all.

Cybernetic Vermin fucked around with this message at 10:09 on Aug 6, 2020

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply
«2 »