Virtual RAM on Pandora for faster emulation


Mikelle02

Still Fresh
Joined
Apr 3, 2015
Messages
12
Age
27
I was wondering , if I add a swap file on a USB drive is it possible to have more framerate on emulation?
The idea is like ReadyBoost to speed up Windows but with the "mkswap" and "swapon" utilities on linux.
 
Thats not how it works....

A computer does not get faster with more ram...

Actually since the swap is on the pretty slow SD card it would even slow it down. It will massively slow down, IF it is used. 
 
Last edited by a moderator:
To bring in a picture description: Imagine RAM is gas in a car, its easy to see that the car wont drive faster if you fill in more gas. 

On the other end it will simply stop if its empty, that is in Linux the most RAM using program simply crashes. 
 
The only benefit of Swap is the program will have enough RAM to run and not crash out when it runs out.
 
I know that it depends by the clockspeed of the processor and the gpu rather the ram.
I was only thinking if the swap would improve something or not.

Thanks however
 
Last edited by a moderator:
No. And readyboost is a really misleading name for what it really does.


It could only speed up swapping as USB is flash memory that is faster accessable than slow hdds.


If you have a ssd it will slow down your system tremendously.
 
No, I think adding swap can actually speed up a machine. The idea is that you can swap out areas of memory that aren't actively used in order to free up space for actively running processes. 

Since people usually use very light window managers and mini-menu, this does not help that much, but in theory could.

Note: of course this would not normally increase the framerate on a game!

So, currently my pandora is using ~50MB. I start a game. I could, in theory, reclaim those 50MB by swapping them out, if those memory areas are not accessed while playing the game, for example in order to increase disk buffers, or have the game use more memory in general. Both could have the pandora work faster.

That is why people often add swap to devices that don't seem to need them. 

All that is in theory. 

I just tried to add a swap file to my pandora by doing

# dd if=/dev/zero of=myswap.swp bs=1k count=500000

# mkswap myswap.swp

# sudo swapon myswap.swp

I then tried to play with "spawiness" by doing

# sudo sysctl vm.swappiness=90

But I didn't manage to get my pandora to swap. Partly it is because I don't have programs that are memory hungry enough...
 
Last edited by a moderator:
Bear in mind the Pandora already has virtual RAM - or ZRAM at least.  I forget the finer points, but the idea is as memory fills up it compresses unusued chunks in place.  Anything trying to claim over twice the actual RAM the Pandora has should kick it into needing to swap out though.
 
Back
Top