0
As occasionally happens, my computer locked up today. The screen was frozen, the mouse unresponsive, and there was no response when I pressed Ctrl+Alt+Del and Shift+Ctrl+Esc.
In this case it was the direct result of overloading the memory -- I started a program which requested a huge amount of memory, spilling everything onto the hard drive. I gave it 10 minutes to respond to the keystrokes but it did not.
I've had the same problem on Linux systems, where I also don't have a solution beyond REISUB. Is there anything else I can do?
why do you need to allocate a large amount of mem? – magicandre1981 – 2016-06-10T05:01:41.207
@magicandre1981: Complex mathematical calculations. Sometimes they take more RAM than I realize. In this case it was probably trying to allocate > 20 GB. – Charles – 2016-06-10T05:50:35.340
The machine was probably locked up paging data out to the hard disk. Your choices are to keep a better eye on your program, get an SSD, get more RAM or to disable the page file. The latter option will probably cause your program to die when you run out of RAM. – Mokubai – 2016-06-10T06:05:32.963
>
@surfasb That doesn't solve the underlying problem, though. No matter how much I have there will be some process that wants more. I'm looking for something to handle those cases. – Charles – 2016-06-10T12:30:28.203
if you really need so much RAM, build a workstation/Server with 128GB RAM – magicandre1981 – 2016-06-10T15:31:05.113
@magicandre1981: I'd love to, but it's a bit out of my pricerange. But even that wouldn't solve my problem of occasionally overshooting. Is there any way to crash the program to recover? – Charles – 2016-06-10T15:36:02.547
@Mokubai: I agree, it was almost certainly paging when it locked up. Do you think paging to an SSD would solve the problem? In my experience it's hard because whatever you do to free up memory just lets the program fill a bit more and you're back where you started. It's a pity because all I need is just enough time to kill the program but I don't even get that in these cases. – Charles – 2016-06-10T15:38:44.170
You can try to buy a PCIe based SSD which has over 2GB/s write/read perf and put the pagefile there. maybe it helps – magicandre1981 – 2016-06-10T15:39:38.180
@Charles While an SSD is still not as good as getting more RAM, it is better than a spinning rust HDD for responsiveness during heavy paging. I've had a couple of heavy programs eat all my RAM but still leave the system okay-ish, enough to kill the program at least. Might be your program is too hostile though. – Mokubai – 2016-06-10T16:00:54.473
If you definitely never want it to use that much memory then disable the pagefile entirely, the program will eat all memory then die once you've run out. – Mokubai – 2016-06-10T16:01:58.507
It will still page, without a pagefile, because there are many other files in the system that act as pagefiles. – Jamie Hanrahan – 2016-06-10T21:57:42.463