Skip to content

zram compressed ramdisk for swap #894

Closed

Description

@pssc

It makes checking out the kernel possible on my rev2 B pi and compilation somewhat quicker.
This has been requested before but wasn’t available as a module in 3.12 and had to be complied in.

CONFIG_ZSMALLOC=m
CONFIG_PGTABLE_MAPPING=y

CONFIG_ZRAM=m
CONFIG_ZRAM_LZ4_COMPRESS=y

CONFIG_LZ4_COMPRESS=m
CONFIG_LZ4_DECOMPRESS=m

Activity

  1. popcornmix commented on Mar 17, 2015

    @popcornmix
    Collaborator

    Do you have any benchmarks showing the improvement?
    (e.g. time to compile an app with and without compressed ramdisk?)

    I'll look into it. Enabling as a module on 3.18 should be possible.

  2. pssc commented on Mar 17, 2015

    @pssc
    Author

    I only properly benchmarked to see if it was worth enabling CONFIG_PGTABLE_MAPPING for this arch. it was a factor of ~two quicker.

  3. pssc commented on Mar 17, 2015

    @pssc
    Author

    my git pull for the kernel falls over with allocation error without the swap enabled , with this enabled I don't end up using up my SD card by swapping.

  4. jbruchon commented on Mar 22, 2015

    @jbruchon
    Contributor

    I am using Xbian and based on my experience, Xbian has some glitches and slowdowns because it swaps to and from the SD card occasionally. The swap is never more than about 105MB total. zram "I/O" performance is extremely high compared to even my Class 10 SD card. If I had access to the zram module, I'd be able to use it to eliminate my playback issues. There is no good reason to not have the zram module available, especially since the Pi is the type of system that needs zram swap the most.

    Regarding benchmarks, compilation performance is a poor benchmark because it is not a typical load for most users (if compilation performance matters, you are cross-compiling anyway) and hitting swap may not occur at all. A much better test would be running various tests using a web browser such as Firefox which often consumes all available RAM and gets OOM killed often if swap is disabled.

  5. popcornmix commented on Mar 22, 2015

    @popcornmix
    Collaborator

    Should be enabled now. Can you rpi-update and test?

  6. jbruchon commented on Mar 23, 2015

    @jbruchon
    Contributor

    I don't personally have rpi-update (xbian doesn't appear to have it.) Any alternative ways to obtain and test?

  7. popcornmix commented on Mar 23, 2015

    @popcornmix
    Collaborator

    @jbruchon You'll have to ask in xbian forums. I suspect they build their own kernel, so this change will have no effect (they can of course make a similar change themselves).

  8. pssc commented on Mar 24, 2015

    @pssc
    Author

    I have this ok and working on one of my rev 2 B's that's under heavy load.

  9. popcornmix commented on Mar 24, 2015

    @popcornmix
    Collaborator

    Okay to close?

  10. PeterPablo commented on Mar 24, 2015

    @PeterPablo

    I have also updated. Though not being able to give quantitative benchmark results, I have the impression that performance has improved (apache server, busy with owncloud). No problematic messages in syslog as far as I observed.

  11. added a commit that references this issue on May 30, 2016
  12. yutayu commented on Dec 11, 2020

    @yutayu

    armbian/build#2377
    armbian/build@e90a488

    CONFIG_PGTABLE_MAPPING=y
    It seems it causes error.
    Like this ,#3839.

  13. added a commit that references this issue on Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions