SWAP - enable or not

Are you going to enable SWAP on your Pandora ?

  • Yes - will have swap partition on NAND

    Votes: 0 0.0%
  • Yes - will have swapfiles/partitions everywhere

    Votes: 0 0.0%

  • Total voters
    25

well, you could put swappiness to near 0 (say 10), and maybe I could write a script which makes a popup when swap actually increases. I don't think you'd be able to do a hold on the memory though. Some applications can be time sensitive without meaning to be: firefox goes to load a new page, request some memory, and pauses for 10 seconds while you fumble for the OK button, and suddenly you've lost all connections you had.


Better to just have a pop up saying "Out of memory: extended into swap space. Performance may be hindered. Please close some things soon." or something. 's'my opinion anyway.
No popup please. Just a red flashing bulb on the bottom panel next to a displayed amount of used swap e.g.: 20MB, or such a thing.
 
Well, the pop-up itself may be the case of a system halt. Suppose your system starts swapping heavily in an instant, then all of a sudden a nice good looking GUI window comes up, saying " You are using 437 MB of SWAP " ............. and the system no longer responds.
 
I'm thinking I should host personal swap space on the cloud. Good idea or bad idea?


My tower doesn't use all that much ram. I don't know why a handheld would need it (except for compiling. I tried to install Gentoo on a system with 64M of ram. Not fun.)
 
assuming he has a 1 Gbps pci network connection, "cloud swap" should provide a nice speed boost for a EDO RAM powered pentium


:lol:
 
Last edited by a moderator:
Considering I once got my system with 4GB to swap once (by typing something stupid in the terminal), I'll make a small swap partition.


When the system starts swapping heavily, you usually know what's causing it, so you can close it before swap gets filled up, and before OOM Killer goes on a rampage killing random processes (which by luck might be something that you really don't want closed like the X-Server). OOM Killer out of the blue is not fun.
 
Considering I once got my system with 4GB to swap once (by typing something stupid in the terminal), I'll make a small swap partition.
This is actually why I no longer have swap. I've got 4GB RAM and used to have a further 4GB of swap "just in case". Then one day I did something stupid and RAM filled up fast. And then it started swapping. You do not know pain until you've experienced gigabytes of RAM trying to be swapped to the hard disk. I tried to kill the process, but it was too late: it was in disk i/o and couldn't be stopped until it finished! I didn't know how long that was going to be (it had already been 5 minutes!) so I took the risk and restarted the system. And promptly disabled swap, since before that time I'd never used it anyway.


Of course the Pandora has 256MB of RAM, not 4GB, so you're not likely to experience quite the same problem ;)
 
Yep, with Linux you should use less swap the more RAM you have. Quite different from e.g. some older Unix systems out there, where the opposite would be the way to go.
 
I'm still trying to figure out how to use 4 gigabytes of memory. So last night, I started opening random programs. I had Black Shades, OpenOffice Writer, Battle of Wesnoth, Neverball, Neverputt, the task manager, and Chromium B.S.U. running. On 262MB of ram. Granted, loading a map in Wesnoth bumped it up to 300 something. Throughout the process, my CPU was very upset, but the music coming out of my speakers sounded pretty cool. Long story short, I don't see myself needing swap.


By the way, I can't tell if people took the first part of my previous post seriously.
 
Add



Code:
while (true) int* foo = new int;
somewhere to your code and be amazed at how quickly your program will eat memory!
:lol:


Very very bad line in one's source code ! ( Just like a line of for loop that will calculate i = i+1 forever and make your CPU work rather hard. )


But I honestly don't know why would you want 4GB of RAM when >256 MB would be like flying to me. ( Of course if you don't have loads of garbage there. :rolleyes: ) Not running server, so I can not guess.
 
Last edited by a moderator:
By the way, I can't tell if people took the first part of my previous post seriously.

it's a bad idea because of latency, hence my pentium 1 remark, SD card or nand would always be superior on the pandora


if however, you have extremely fast networking, 10Gbps fiber / multiple 1GBps then your are touching the realm of clusters/super computers.


There are alot better linux geeks then me you should talk too


Stupid idea warning:


you should try:


use usb networking with a laptop/pc


creating a ramdrive on the pc


mount it (over ssh) on the pandora


create a looopback device on the mount


create swap partition on that loopbackdevice


benchmark it!!!


then humor me with the results :p


every step should be obvious with google's help


that's the craziest pandora-networked-swap i can think about! :)
 
Sorry. What I should have said was, "I was kidding. I hope you were too."

a Link to this PND please ?(or sources not depending on GL)
Sorry, that was on my PC. I haven't even received my unit yet.



Code:
int recurse(int foo) { return recurse(foo-1) * 2.4;}

^I don't even know if that would compile.
 
As a programmer i know it would *work* (EDIT: rember, in programmereese, working means "doesn't segfault")


now i want to grab a couple of beers and try it.
 
Last edited by a moderator:
Add



Code:
while (true) int* foo = new int;
somewhere to your code and be amazed at how quickly your program will eat memory!

Meh, let's not pretend to be doing something we aren't and just go with


while(true) new int;


;D
 
I'm still trying to figure out how to use 4 gigabytes of memory. So last night, I started opening random programs. I had Black Shades, OpenOffice Writer, Battle of Wesnoth, Neverball, Neverputt, the task manager, and Chromium B.S.U. running. On 262MB of ram. Granted, loading a map in Wesnoth bumped it up to 300 something. Throughout the process, my CPU was very upset, but the music coming out of my speakers sounded pretty cool. Long story short, I don't see myself needing swap.


By the way, I can't tell if people took the first part of my previous post seriously.
On Linux you'll put that RAM to use simply by reading, writing, or executing files. All file access go through RAM. So, the next time an application reads a file which has been read before, or even just written after last reboot, it'll get that data directly from RAM and the disk won't be touched. The data will stay in RAM until an application needs RAM for something the operating system considers more important than buffer cache. So, the more RAM the better. On my 8GB box it takes one second to start Firefox, or any other large application, as long as it's been started at least once during the last uptime (which could be hundreds of days). Right at the moment there seems to be nearly 5 gigs of cached files in RAM on my box.
 
^Ok, I can see that. I tend to turn my computer off when I'm not using it, so I haven't experienced that. Maybe I should leave it on for an extended period and see what happens.

Whoops, I did.


My sarcasm radar is getting a lot of interference lately, it's hard to get a good S/N on it.

Are you sure the correct ports are open?



Code:
while(new int);

I love C++!
 
Back
Top