INSANE Speed inhancement by using a swap file!

Discussion in 'iPod touch Firmware 3.0 Jailbreak' started by Retro349, Sep 29, 2009.

  1. Retro349

    Retro349 New Member

    Joined:
    Jan 18, 2009
    Messages:
    355
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    INSANE Speed enhancement by using a swap file!

    Credit for Chinese version goes here
    Credit for .plist version goes here

    The creator of the Chinese version has updated theirs with new features since I created this thread. Please update, if you prefer that version

    UPDATE: We have numbers! I can't read German, but ZhiZhi says that the NAND chip should last about 50 million write cycles, totaling to 7-10 years with constant read-write until it dies.

    Recently, developers have created a way to create a virtual swap file on your iDevice's disk drive, to store memory that would normally be in RAM, so your iDevice will have heaps of RAM left to deal with. There are two of these, referred to as the "Chinese" and "plist" versions. The Chinese version has one user-defined-static-sized file. The plist version creates and deletes 64mb files as needed.

    Here are some screenshots of my results:

    Chinese

    Please Register or Log in to view images



    plist (edited)

    Please Register or Log in to view images


    (Ignore battery, these were taken days apart)

    I've been told that this will decrease the life of the drive on your device. I'm assuming (correct me if I'm wrong) that using more memory at a time will decrease the life of the drive faster. Use with caution.

    On the Chinese version, I can run


    • Touchgrind
    • Safari
    • Bloons
    • Terminal
    • Minigore
    • App Store
    • Mail
    • Gangstar
    • and iPod

    (With the idea of drive damage floating around, you should NEVER run this many apps at once. This is just a proof-of-concept.)

    with SBSettings reporting between 30 and 40 megs, more than what I could get after a reboot. SpringBoard is laggy like is has 8, however apps run like a charm once open.

    If it doesn't work, did you:

    • Install it correctly?
    Chinese version, if the deb is installed correctly, should create a file called "com.apple.fm+vm.plist in the /System/Launchdaemons/ folder.

    The plist version's file should be put in the launchdaemon folder manually.

    • Make sure the launchdaemons folder's permissions were 755?
    • Change the file's owner to root and group to wheel?


    I'm currently investigating this. There's a thread with most information you need on another forum, but it's that one forum we're not allowed to talk about (sorry, just followin' the rules!). Like in the removing launchdaemons thread. Here's what I've found so far:​

    • Most other forum users agree it will wear it out, but in a matter of years. Not anytime soon.
    • The Nokia N900 uses the same method to get increased speed.
    • Most users also agree that the .plist version works better.
      (More information will be added as it is found)
    A user of that forum has also modified the .plist version to periodically clean like the Chinese one, and has also turned off encryption to make it work faster. It should look like this:

    It will not show up correctly in notepad. Edit it with iFile.

    SpringBoard will also crash the first time after using the edited file. Use Springback to back up your app locations if you need to.

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.apple.dynamic_pager</string>
    <key>KeepAlive</key>
    <true/>
    <key>OnDemand</key>
    <false/>
    <key>ProgramArguments</key>
    <array>
    <string>/sbin/dynamic_pager</string>
    <string>-F</string>
    <string>/private/var/vm/iphone_swap</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>UseEncryptedSwap</key>
    <false/>
    </dict>
    </plist>
    Note to mods: The (assumed) publishers say nothing about redistribution and copyright, so I'm assuming it's OK to post here. If not, just tell me and I'd be happy to remove the DL link.
  2. Bubalooshi

    Bubalooshi Active Member

    Joined:
    May 22, 2008
    Messages:
    2,432
    Likes Received:
    0
    Device:
    iPhone 3GS (Black)
    I never thought of using the storage as virtual RAM.
    That's pretty cool.

    256MB is plenty for my 3GS, though.

    Please Register or Log in to view images

  3. friedmannn

    friedmannn New Member

    Joined:
    Jan 14, 2009
    Messages:
    186
    Likes Received:
    0
    Device:
    2G iPod touch
    how do we install this?
  4. Retro349

    Retro349 New Member

    Joined:
    Jan 18, 2009
    Messages:
    355
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    put the .deb file in "/tmp/", then in terminal type "dpkg -i /tmp/iPhoneVM.deb"
    (sans quotes)

    Remember that iPhoneOS, like all unix-based OSes, are caps-sensitive.
  5. DeamonFish

    DeamonFish Banned

    Joined:
    Jul 22, 2009
    Messages:
    183
    Likes Received:
    0
    Device:
    2G iPod touch
    Looks like it requires a JBed iDevice

    Please Register or Log in to view images

  6. Retro349

    Retro349 New Member

    Joined:
    Jan 18, 2009
    Messages:
    355
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    It's been confirmed that it works for, and is even designed for 3.1. Now we just need a jailbreak!
  7. FailSafeIsntSafe

    FailSafeIsntSafe New Member

    Joined:
    Feb 2, 2009
    Messages:
    425
    Likes Received:
    1
    Device:
    2G iPod touch
    Just installed.now what?

    Edit:
    Cydia loads faster fer me now. I like this

    Please Register or Log in to view images

  8. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    The problem is writing/rewriting the ssd in your device. What you may gain in performance improvements, you're losing in device longevity.

    This is not as good of an idea as it first appears to be.

    EDIT: To the OP. Please remove the download link. If people want to download this, they can do it from the original page.
  9. dodgy

    dodgy Member

    Joined:
    Jul 14, 2008
    Messages:
    739
    Likes Received:
    6
    Device:
    iPhone 6 Plus
    I'm on 3.0.1, and I've noticed no changes.

    Does it work only on 3.1?

    EDIT: Ok, I actually clicked the link, lol. And it says for 3.0+ - but I notice no differences.
  10. Retro349

    Retro349 New Member

    Joined:
    Jan 18, 2009
    Messages:
    355
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    Hmm... Unfortunately that makes sense. But isn't the device already keeping logs, caches and other things? Also, how long would you think this shaves off?
    EDIT: Also, doesn't the device check for errors on startup? I think that's different from total reads/writes, but would it help at all?
    ------------------double post merged------------------
    Try rebooting. It didn't show me any results until after I rebooted.

Share This Page