No Swap?

lxskllr

No Lifer
Nov 30, 2004
60,926
11,259
126
I was having issues with crippling disk lock on my netbook, usually caused by YouTube videos. Turns out my swap partition wasn't active. I only have 1gb of ram, so I guess it was running out of memory. My question is wth was the computer doing if I didn't have an active swap? My disk light would be pinned on, and the machine would take forever to respond to input. What I'd usually do is hard reset the machine.

This is Ubuntu 10.04 on a Eee900 16gb ssd(glorified flash drive)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I'm surprised the OOM killer didn't kill your browser, Flash, etc but the kernel can still free memory by evicting other things like binaries, shared libraries, etc and then paging them back in when needed.
 

lxskllr

No Lifer
Nov 30, 2004
60,926
11,259
126
Interesting.. So it can move out processes that aren't needed immediately, like a fake swap? I guess if it runs out of things it can move, it then starts killing stuff. That probably works better on a real hd. It made this machine unusable.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Interesting.. So it can move out processes that aren't needed immediately, like a fake swap? I guess if it runs out of things it can move, it then starts killing stuff. That probably works better on a real hd. It made this machine unusable.

It doesn't move them anywhere, it just reuses the page for something else and when the original is needed for something a pagefault is triggered and it pages it back into memory from the original file. I wouldn't imagine it would work for much since binaries and such aren't that large, but maybe your drive is so slow it just hadn't reached the point where it realized it couldn't fulfill the allocation requests and was just playing a shell game with memory pages. From a performance standpoint it doesn't work well on regular disks either, but if you're using a slow USB disk then it will be a lot worse.
 

lxskllr

No Lifer
Nov 30, 2004
60,926
11,259
126
Thanks Vin. I'll finish reading up on that later. I'm not sure it'll do anything, but it won't hurt to try. My disk issues were fixed by enabling swap, but if I can get a performance boost, it would certainly be welcomed. A 900mhz CeleronM doesn't make the best Flash player :^D