UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Increase swap size?

    Scheduled Pinned Locked Moved Support
    7 Posts 6 Posters 592 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • R Offline
        RandomUser
        last edited by

        A week ago, user @Giiba made a comment about increasing the swap size. They never followed up to the question how to do this, so I'm asking here.

        Is it possible to increase the swap size? If yes, how to do this? Currently it's only 31mb on my Nexus5 and almost permanently full while having apps like the browser and uReadIt crash/slow down when viewing lots of pictures for example.

        1 Reply Last reply Reply Quote 0
        • flohackF Offline
          flohack
          last edited by

          Yeah but swapping will kill your SD card sooner or later, so its highly discouraged. I wonder what Apps you have open so that you run out of RAM on N5...

          My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

          1 Reply Last reply Reply Quote 0
          • dobeyD Offline
            dobey
            last edited by

            Rather than changing swap size, there is another open issue about enabling zRAM on Nexus devices (as it is not currently enabled there in the kernel).

            D 1 Reply Last reply Reply Quote 0
            • D Offline
              doniks @dobey
              last edited by

              @dobey said in Increase swap size?:

              Rather than changing swap size, there is another open issue about enabling zRAM on Nexus devices (as it is not currently enabled there in the kernel).

              Interesting. got a link? Might be relevant for my nexus 7 halium port

              dobeyD 1 Reply Last reply Reply Quote 0
              • dobeyD Offline
                dobey @doniks
                last edited by

                @doniks https://github.com/ubports/ubuntu-touch/issues/1212

                1 Reply Last reply Reply Quote 0
                • G Offline
                  Giiba
                  last edited by

                  Sorry, I never did see your question.

                  If I recall this is how it goes:

                  $ sudo bash
                  $ cd /userdata
                  $ swapoff
                  $ fallocate -l 64000000 SWAP.img
                  $ mkswap SWAP.img
                  $ swapon SWAP.img
                  $ exit
                  

                  That will increase the swap to 64mb, as a note the '-l' is a lower case L.

                  I found the N5 unstable until I had 128mb'ish. However the primary app I use is Morph and that has been improved since the last I tried UT on my N5. Depending on how much you care to risk you device's storage you can go as much as you want. I used it for 2 months as a daily driver with 512mb of swap and it is still running fine (but as an Android device atm).

                  1 Reply Last reply Reply Quote 0
                  • mihaelM Offline
                    mihael
                    last edited by

                    For almost three years now I have 2GB swap on my Pro 5.

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post