How could I ever get by without a swapfile?


Thanks by the way for the tool, slaeshjag, I find it very useful and comfortable. Should be built in Pandora OS. ^^


It is actualy a good idea that SWAP is not always on, at least in my case it was more or less a quick test. But I would like to control when it is enabled and when it is disabled. I basicly only need it when browsing or watching youtube Videos and Music. There I noticed by the way that swap was deactivated, because Firefox just crashed during halfways through a simple Music file over Youtube. :D RAM full or whatever. Swap really works miracles here. I guess when this ZRAM thing is ready, we don't even need a real swapfile, flash memory based devices are not made for this. (I wonder how all the Smartphones and Tabletts manage this issue)
 
Last edited by a moderator:
I have my swap file come on at boot up - so that all applications can take advantage of it. See previous post. It's been working just fine.


Concerns about wearing out my card? I have it as it's own partition (not file - but dedicated partition). If I haven't replaced the 32GB card with something bigger/faster by the time it wears out that section of the card (@5+ years with moderate use?) then I'll definitely have a Pandora III or other by then.
 
I'd like to try this where do I find the pre and post scripts to edit.

What I did was created a 256MB swap file in the Firefox appdata directory and added "swapon" to the pre script. And swapoff to the post script, of course. That way, when I start Firefox I get swapfile, when I kill it the swapfile is closed, and I don't have to worry about whether I remembered to disable the swap manually before yanking the card. You could quite easily do the same for any other program (like Wesnoth) that you want or need to have a bit of a memory buffer for.
 
Last edited by a moderator:
Just tried that and it didn't work.


Does the swap file have to have a specific filename?
 
No error just no swap file loading when I type free into a terminal.
 
There's got to be some error. Check the /tmp/pndrun_firefox..whatever file. That's where any error would be.


You need to start swap as root, so you need "gksudo swapon /.../swapfile" and enter your password. I've been considering adding swapon and swapoff to the sudoers file as not needing passwords, but I've been too lazy to care.
 
Back
Top