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

Koumajutsu

Android Expert
Aug 26, 2011
1,434
1,092
Needles, CA
www.paypal.com
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:
 
Upvote 0
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
 
  • Like
Reactions: cwhatever
Upvote 0
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
 
Upvote 0
: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
 
Upvote 0
Can Kouma confirm this, he hasn't said anything about it yet...

thats typically what ram does..

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


sorry a little late on post already answered
think of it as plugging a thumb drive into windoze 7 and the autoplay menu pops up. Theres one for speed boost. It uses your memory stick in a similar way
 
  • Like
Reactions: cwhatever
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones