[Q] About swap space, this device and cyanogenmod

Search This thread
Jan 18, 2014
25
17
This may be a general question for all android devices or not but I was curious about adding swap space to this device. It has 1 gig of ram and many may consider that to be enough, and it might be. I have cyanogenmod 10.2 installed and tried to enable zram, 10% seems to be the best setting as anthing higher caused a game to pop up a notice saying something about low memory and defaulting to lower values. When I checked to see if zram was used however it turns out it was, about 25mb - 34mb after booting. The issue with zram is when multitasking with lecturenotes and moonreader, The tablet would reboot and my notebook that was open in lecturenotes would be missing notes I took or the settings would be greatly messed up, or both. This was with 10%.

I am thinking since it was used, it might be helpful to have an sd card for this reason, to aid in multitasking. This is important to me because I run several apps at once (I wish cyanogenmod had multi windows, and google wouldn't threaten over it). So the question is will there be a benifit to buying an sd card on ebay (class 10 of course) and using it as swap space. It seems this tablet might be on the cusp of the memory being enough. Also I am thinking this might help to future proof it a bit when updating to newer releases of gyanogenmod. The sd card I was thinking of is 4 gigs and may plan on having 1gb swap space (this tablet is for school and other work). The tablet has 32gb storage and that is more than enough for me (I am only using 3gb of space) so I wont need to add anymore storage.

I should also add that when multitasking without zram enabled, the tablet reboots less but still has done it, and so far nothing has been lost in my notebooks. I am thinking that the memory of 1gb is starting to reach its limit, with no apps running I am consuming about 600mbs of it.
 
Last edited:

JoinTheRealms

Senior Member
Apr 7, 2012
1,931
1,297
This may be a general question for all android devices or not but I was curious about adding swap space to this device. It has 1 gig of ram and many may consider that to be enough, and it might be. I have cyanogenmod 10.2 installed and tried to enable zram, 10% seems to be the best setting as anthing higher caused a game to pop up a notice saying something about low memory and defaulting to lower values. When I checked to see if zram was used however it turns out it was, about 25mb - 34mb after booting. The issue with zram is when multitasking with lecturenotes and moonreader, The tablet would reboot and my notebook that was open in lecturenotes would be missing notes I took or the settings would be greatly messed up, or both. This was with 10%.

I am thinking since it was used, it might be helpful to have an sd card for this reason, to aid in multitasking. This is important to me because I run several apps at once (I wish cyanogenmod had multi windows, and google wouldn't threaten over it). So the question is will there be a benifit to buying an sd card on ebay (class 10 of course) and using it as swap space. It seems this tablet might be on the cusp of the memory being enough. Also I am thinking this might help to future proof it a bit when updating to newer releases of gyanogenmod. The sd card I was thinking of is 4 gigs and may plan on having 1gb swap space (this tablet is for school and other work). The tablet has 32gb storage and that is more than enough for me (I am only using 3gb of space) so I wont need to add anymore storage.

I should also add that when multitasking without zram enabled, the tablet reboots less but still has done it, and so far nothing has been lost in my notebooks. I am thinking that the memory of 1gb is starting to reach its limit, with no apps running I am consuming about 600mbs of it.

Well in my own personal testing i could not see any benefit while extracting 700mb archives under android with 4gb swap space on a 40mbs microsd card, while under full linux desktop with a same workload, swap differently helps keep the system smooth under heavy io load. The conclusion i drew was the android platform deals to memory management differently than the typical desktop os, due to slower emmc chips used as a boot disk for the majority of android devices using this slow, already bottlenecked memory as swap space doesn't make sense (not to mention the use of 2gb swap space on a limited 16gb storage etc), so android runs almost completely in ram, with stricter memory management and allocation allows android to run fine without swap space, although because of this, androids memory management makes little uses of available swap space
 
  • Like
Reactions: vanquishedangel

_that

Recognized Developer / Inactive RC
Oct 2, 2012
4,821
4,211
Well in my own personal testing i could not see any benefit while extracting 700mb archives under android with 4gb swap space on a 40mbs microsd card, while under full linux desktop with a same workload, swap differently helps keep the system smooth under heavy io load.

I've been running my desktop without swap for the last 10 years, and as long as you have enough RAM for all your running programs, there will be no problem at all.

Extracting an archive is a mostly sequential operation (single read stream, single write stream), so it also doesn't benefit from caching, which could use the memory that is freed by swapping.
 

JoinTheRealms

Senior Member
Apr 7, 2012
1,931
1,297
I've been running my desktop without swap for the last 10 years, and as long as you have enough RAM for all your running programs, there will be no problem at all.

Extracting an archive is a mostly sequential operation (single read stream, single write stream), so it also doesn't benefit from caching, which could use the memory that is freed by swapping.

Ahh that makes sense. I wasnt sure if swap had an effect directly on the extraction, but seem keeped the rest system more stable/ smooth duing the process in the case of GNU/Linux, with swap off similar operations such as installing packages would more oftern lock the tablet up. Might be a placebo though:)

I also dont set swap on my Linux desktop, as it has plenty of ram but the benitfit of swap space is somewhat more noticable due to the lack of ram on the tf700.
 
Jan 18, 2014
25
17
Thanks for all the useful posts

Thanks for all the posts, I have my sd card on the way. I will post my experience when I get my sd card but I am sure it is safe to say there will be a benefit. I use linux to at home and have 8 gigs of ram on that computer, I lessen the swap after install to about 512mb because 8 gigs is more then enough. I leave some however just incase of any issues like ram going bad. On another computer in the house that has limited ram (1.5 gigs) I have enabled zram (384 mb) and added two old flash cards (1 gig each) to a pci raid card and those were converted to swap. I then altered the fstab to reflect the order of priority I wanted them used in. The reason is that when the swap is used from the hard drive, and the hard drive is being written to, can cause a slow down. So with the 2 flash cards at 1 gig each (the swap seen as 2 gigs) it seemed to speed it up. I just posted that because of the nix users and it seemed like a good plan to run it that way.
 
Jan 18, 2014
25
17
Ok, got the sd card

So I recieved the sd card today and applied the swap space to it using root swapper (max setting is 256mb, I figured i can find a way to increase it later if I need to). The defaut location in many of the swap applications will not work on this device however, the sd card mounts at /storage/sdcard1 in my case. So it has to be entered manually (might just be cyanogenmod). Also the device was picky when insalling the card, it would only say blank sd card or cannot read filesystem. I had to install the card in the dock, format it from cwm recovery, (vfat if I remember correct, ext2 and ntfs had issues, avoided ext3 and ext4 cause journaling will cause more wear and tear).

The sd card is a scandisk ultra sdhc uhs-1 8 gigs. From my research that is the fastest this tab can handle. I also use optimising programs like greenify (epic save everything app), pimp my rom (almost every tweak applied), and some pretty efficient tweaks in the settings as well. I also have HALO))) installed and working (epic multiwindow app that works with native programs and almost any rom).

The resuts:

I tested it many ways, I rebooted to see use (none was used because swap starts after boot), I opened apps normally (browsers and things), and it showed 9kb's was used. I then put it to the tests, I open four windows in halo, these were youtube, moonreader pro with a pdf ebook, lecturenotes (awsome note and handwriting app with tons of functions), and Supernote pro (not the best note app). Constantly switched between the apps and messed with settings with them open. The max of swap used was around 10mb(keeping in mind that when I switch windows the app(s) I leave get paused making it hard to tell actual usage because I had to swith the terminal and type "free". I then ran antutu bechmark and gpubench (my tab stills score pretty well) and got a little higher swap usage but not much.

As for the feel of it, it seemed to help when opening many windows in halo, this is the primary reason for my doing this. As for other more normal uses I really didnt see too much of a difference, I did test games however and they did seem a little better (could be placebo) but I am not really sure why they would except android cached other apps to free memory. Reopening apps seemed faster. Also because of apps like greenify my memory usage is decreased so I am sure typically swap would have seen more use.

The conclusion is that at this point I really didn't notice much of a boost for any normal use, but I will definately keep the swap space on due to the boost when using halo and not to mention that I will be updating to android 4.4 soon and it might need more memory. Swap at this point seems more like a pre emptive strike, but it does help with multitasking.
 
Last edited:
Jan 18, 2014
25
17
about swap

://androidforums.com/boost-mobile-warp-all-things-root/610449-ram-swapping-without-swapper2.html I actually followed a guide on android central and redid the swap file to 1 gig to swap instead of using a program, this worked better. (add http in front), when i disabled swap it was noticeable that there was a boost. then reenabled it this method.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Well in my own personal testing i could not see any benefit while extracting 700mb archives under android with 4gb swap space on a 40mbs microsd card, while under full linux desktop with a same workload, swap differently helps keep the system smooth under heavy io load.

    I've been running my desktop without swap for the last 10 years, and as long as you have enough RAM for all your running programs, there will be no problem at all.

    Extracting an archive is a mostly sequential operation (single read stream, single write stream), so it also doesn't benefit from caching, which could use the memory that is freed by swapping.
    2
    I've been running my desktop without swap for the last 10 years, and as long as you have enough RAM for all your running programs, there will be no problem at all.

    Extracting an archive is a mostly sequential operation (single read stream, single write stream), so it also doesn't benefit from caching, which could use the memory that is freed by swapping.

    Ahh that makes sense. I wasnt sure if swap had an effect directly on the extraction, but seem keeped the rest system more stable/ smooth duing the process in the case of GNU/Linux, with swap off similar operations such as installing packages would more oftern lock the tablet up. Might be a placebo though:)

    I also dont set swap on my Linux desktop, as it has plenty of ram but the benitfit of swap space is somewhat more noticable due to the lack of ram on the tf700.
    1
    This may be a general question for all android devices or not but I was curious about adding swap space to this device. It has 1 gig of ram and many may consider that to be enough, and it might be. I have cyanogenmod 10.2 installed and tried to enable zram, 10% seems to be the best setting as anthing higher caused a game to pop up a notice saying something about low memory and defaulting to lower values. When I checked to see if zram was used however it turns out it was, about 25mb - 34mb after booting. The issue with zram is when multitasking with lecturenotes and moonreader, The tablet would reboot and my notebook that was open in lecturenotes would be missing notes I took or the settings would be greatly messed up, or both. This was with 10%.

    I am thinking since it was used, it might be helpful to have an sd card for this reason, to aid in multitasking. This is important to me because I run several apps at once (I wish cyanogenmod had multi windows, and google wouldn't threaten over it). So the question is will there be a benifit to buying an sd card on ebay (class 10 of course) and using it as swap space. It seems this tablet might be on the cusp of the memory being enough. Also I am thinking this might help to future proof it a bit when updating to newer releases of gyanogenmod. The sd card I was thinking of is 4 gigs and may plan on having 1gb swap space (this tablet is for school and other work). The tablet has 32gb storage and that is more than enough for me (I am only using 3gb of space) so I wont need to add anymore storage.

    I should also add that when multitasking without zram enabled, the tablet reboots less but still has done it, and so far nothing has been lost in my notebooks. I am thinking that the memory of 1gb is starting to reach its limit, with no apps running I am consuming about 600mbs of it.

    Well in my own personal testing i could not see any benefit while extracting 700mb archives under android with 4gb swap space on a 40mbs microsd card, while under full linux desktop with a same workload, swap differently helps keep the system smooth under heavy io load. The conclusion i drew was the android platform deals to memory management differently than the typical desktop os, due to slower emmc chips used as a boot disk for the majority of android devices using this slow, already bottlenecked memory as swap space doesn't make sense (not to mention the use of 2gb swap space on a limited 16gb storage etc), so android runs almost completely in ram, with stricter memory management and allocation allows android to run fine without swap space, although because of this, androids memory management makes little uses of available swap space
    1
    I also dont set swap on my Linux desktop, as it has plenty of ram but the benitfit of swap space is somewhat more noticable due to the lack of ram on the tf700.

    I just want to share my user experiences on the swap space...:) It does seem to improve the tf700 with swap space due to the lack of RAM (1GB)..;)