1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice

Will Pyra get benefits from zram?

Discussion in 'General Discussions' started by Ted, May 15, 2018.

  1. Ted

    Ted Member

    Joined:
    May 2, 2016
    Messages:
    93
    Location:
    Beijing, China
    On old laptop with only 2GB memory, enable the zram can slightly improve the experience, slighy better than swap, as the mechanical hard drive caused slow swap.
    For Pyra, which is better, zram or swap?

    Sent from my SM-G900F using Tapatalk
     
    Tags:
  2. Elw3

    Elw3 ƐʍlƎ

    Joined:
    Jul 21, 2013
    Messages:
    751
    Trading of cpu power against more ram is probably the last thing you want to do on a mobile device.
    Zram is nice for a few mb more or when the program is shitty coded, eg. saving uncompressed bmp files to ram, but once you have real world data it can slow things down to a point where crashing is the better solution.
    Besides, you should not have swap unless you really know what you need it for, so if it does not crash, dont bother about it.
     
  3. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    9,049
    Location:
    Somewhere off the coast of the EU
    IIRC the Pandora was set up to use half of the RAM as zram swap at one point in its history, but the benefit obtained wasn't obvious - well written stuff will limit its RAM usage, and heavy stuff is just better off using proper SWAP to flash storage most of the time.
     
    FBnil likes this.
  4. Grench

    Grench Forum Addict!

    Joined:
    Oct 3, 2008
    Messages:
    5,485
    Using compression on items stored in RAM has advantages when the CPU is relatively fast, the RAM size is relatively small and the storage is relatively slow. Think 80286 with 1MB of RAM running 1.2MB worth of software on/from a 1.44 MB floppy drive.

    The Pyra has a relatively slow CPU, relatively large RAM size and the storage is relatively fast. So, not a great fit for RAM compression.
     
    FBnil likes this.
  5. Letalis Sonus

    Letalis Sonus Very Active Member

    Joined:
    Mar 5, 2009
    Messages:
    946
    You're blowing things out of proportion. The kind of algorithms used for this are way too simple and fast to really cause a noticeable impact, even on the Pandora. The same kind of compression is a common trick used by SSD controllers to make the drive even faster as you save more bandwidth than you lose time through compression - those controllers are commonly implemented using Cortex-M cores. Works really well with filesystem-provided compression on HDDs as well - compressing SSD controllers don't like compressing compressed data, though.
     
    FBnil and levi like this.
  6. ashdjones

    ashdjones o_O

    Joined:
    Mar 13, 2008
    Messages:
    821
    This thread reminds me of an old fantasy that i could run Wolfenstein off a floppy drive. It would stop and buffer stream loads of data on turning particular corners or when bosses appeared. Probably the most masochistic way to play an fps, but i'm fairly sure other people were obsessed with this; the engine for GTA San Andread streams masses of data without lagging, at floppy type rates. Xbox port uses brute force perhaps, but the Android version was like playing floppy Wolfenstein again, ha.
     
    levi likes this.
  7. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    9,049
    Location:
    Somewhere off the coast of the EU
    Thanfully, our experiences of using zram on Pandora were nowhere near as dramatic as that. Most of us didn't even notice it has changed, but Notaz did some testing and I think discovered that performance was slightly worse in letting apps use that extra ram, so he switched if off again for the next update.
     
    TeDaDeS likes this.
  8. daveshah

    daveshah Still Fresh

    Joined:
    Aug 17, 2008
    Messages:
    22
    There might be a benefit for single-threaded stuff, where the second core otherwise idles, but I don't know whether or not it would be worth the extra thermal load then.
     

Share This Page

Loading...