• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Virtual Memory

Koumajutsu

Android Expert
So I've got virtual memory (aka linux swap) working on our beloved prevail. I want to know if you guys want it. If so, what is the preferred method for swapspace? I can hard code for a swap partition on the sdcard, a swapfile on the vfat, swap file in /data, all of the above, or I can add a text field to koumamod.apk so you can point to wherever you put it yourself. :)
 
So I've got virtual memory (aka linux swap) working on our beloved prevail. I want to know if you guys want it. If so, what is the preferred method for swapspace? I can hard code for a swap partition on the sdcard, a swapfile on the vfat, swap file in /data, all of the above, or I can add a text field to koumamod.apk so you can point to wherever you put it yourself. :)

huh? lol too much technical words for ma haha:eek:
 
Is this like a swap for ram?
That'd be awesome.

Yes

well i'm not afraid to ask! what would it be used for? hopefully not a stupid question?
:thumbup::thumbup:
Virtual RAM, (like paging files/virtual memory in windows)

Very interesting... i don't care how you release it :D if it functions as intended, this is big (and when have you ever spoken up, without knowing your sh** works? Not that I've seen :) )
To bad cm7 doesn't like your tinkering... :banghead::banghead:

Edit- did you test gps?:D:D:D lmao
 
I'm with you man, I'd like to know what the virtual memory is used for, and if it would be useful I'd like it to be put into KoumaMod for a selection to pick for use... :D

Basically, instead of your low memory killer killing an app in a out of memory situation, it would move the app to the swap location (partition, etc) and allow it to be recalled instead of having to open it again.

@kouma would you be able to mount the real /data partition as swap? (for /data 2ext mod) seems like a good use of the 160mb or so of unused space... And being internal, would probably provide the most performance/least lag
 
:thumbup::thumbup:
Virtual RAM, (like paging files/virtual memory in windows)

Very interesting... i don't care how you release it :D if it functions as intended, this is big (and when have you ever spoken up, without knowing your sh** works? Not that I've seen :) )
To bad cm7 doesn't like your tinkering... :banghead::banghead:

Edit- did you test gps?:D:D:D lmao

i think i understand, maybe a little more on it though?


sorry a little late on post already answered
 
If /data is mounted to /sd-ext... could you posiblly use the normal space that /data uses for swap?

Edit: I may be wrong but /data usually mounts to flash memory.. that would make it faster than trying to swap pages to an from by class 2 sd card...
 
So I've got virtual memory (aka linux swap) working on our beloved prevail. I want to know if you guys want it. If so, what is the preferred method for swapspace? I can hard code for a swap partition on the sdcard, a swapfile on the vfat, swap file in /data, all of the above, or I can add a text field to koumamod.apk so you can point to wherever you put it yourself. :)

data would be great, also us to point where would be good too:D
 
idk too lazy to re install all the apps and stuff lol. then i have to add all the scripts and build.prop tweaks. i will probably update tomorrow since i dont have school.:captain:
to reinstall apps just use sdext from advanced restore, quick and easy!!:D
 
OK, so for those that don't know Virtual Memory/Swap is like adding in more RAM for the processor to use. You can get away with running larger programs or work with bigger files typically for a slight performance hit.

What I've done so far is got swap support in the kernel and added a setting in koumamod.apk to adjust the "Swappiness" setting, which is a number from 0 to 100 representing how often the system will move things in and out of the swap ram.
Linux defaults to 60 for this, Android defaults to 0 (because there isn't any swap by default and Android likes to kill processes that aren't active if memory gets low)

I've been using a partition on my sdcard for swap so far. It caused my phone to be a hair slower at times, but barely noticeable. However, I was able to open a flash game on facebook in Dolphin HD and it didn't lock my phone up like usual :D

I'll give the storage that is usually /data a try and see how it does. The nice thing about the swap system is you can use a bunch of swap partitions/files at once and assign them each a priority.

It seems like there is a lot of interest in this, so I'll roll out KoumaKernel 2.5 tomorrow, and work on adding more features to the koumamod menu.

BTW, the koumamod menu is not CTMod exclusive, only the version that hides it's icon from the app drawer is. :D I think I put a version for all other mods that use KoumaKernel in the KoumaKernel thread
 
OK, so /dev/slt13 (the internal /data partition) is actually about half the size of RAM

Code:
# free
free
              total         used         free       shared      buffers
  Mem:       290264       195296        94968            0         1896
 Swap:       166396       100228        66168
Total:       456660       295524       161136
# cat /proc/swaps
cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/stl13                              partition       166396  100228  100
#

The system is quite snappy on this though
 
OK, so /dev/slt13 (the internal /data partition) is actually about half the size of RAM

Code:
# free
free
              total         used         free       shared      buffers
  Mem:       290264       195296        94968            0         1896
 Swap:       166396       100228        66168
Total:       456660       295524       161136
# cat /proc/swaps
cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/stl13                              partition       166396  100228  100
#

The system is quite snappy on this though

figured it would be better than sd
 
Kouma u stay in rubidoux? Dude I just moved out here! Is there anything good to do? It seems mad desolate.. maybe we can both go cherry picking or somethin lmao. Nah but that swap sounds good I think the unused internal would make a good function considering that its just there
 
Back
Top Bottom