Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zram compressed ramdisk for swap #894

Closed
pssc opened this issue Mar 17, 2015 · 11 comments
Closed

zram compressed ramdisk for swap #894

pssc opened this issue Mar 17, 2015 · 11 comments

Comments

@pssc
Copy link

pssc commented Mar 17, 2015

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

@popcornmix
Copy link
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.

@pssc
Copy link
Author

pssc commented Mar 17, 2015

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

@pssc
Copy link
Author

pssc commented Mar 17, 2015

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.

@jbruchon
Copy link
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.

popcornmix added a commit to raspberrypi/firmware that referenced this issue Mar 22, 2015
firmware: dispmanx: Fix for locking with dispmanx_element_add with stereo object

firmware: video_decode: increase the number of userdatas

firmware: platform: Enable VCOS_RELEASE_ASSERTS
See: #377 (comment)

firmware: dispmanx: Fix for dispmanx_snapshot with more than one rotated layer
See: #377

kernel: config: Enable ZSMALLOC, ZRAM and PGTABLE_MAPPING
See: raspberrypi/linux#894

kernel: config: Enable CONFIG_FB_MODE_HELPERS and CONFIG_FB_UDL
See: #141

kernel: bcm2708: Make ioctl logging quieter
See: raspberrypi/linux#895

kernel: HiFiBerry Digi: set SPDIF status bits for sample rate
See: raspberrypi/linux#899

kernel: dts: overlay: add generic support for ads7846
See: raspberrypi/linux#896
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Mar 22, 2015
firmware: dispmanx: Fix for locking with dispmanx_element_add with stereo object

firmware: video_decode: increase the number of userdatas

firmware: platform: Enable VCOS_RELEASE_ASSERTS
See: raspberrypi/firmware#377 (comment)

firmware: dispmanx: Fix for dispmanx_snapshot with more than one rotated layer
See: raspberrypi/firmware#377

kernel: config: Enable ZSMALLOC, ZRAM and PGTABLE_MAPPING
See: raspberrypi/linux#894

kernel: config: Enable CONFIG_FB_MODE_HELPERS and CONFIG_FB_UDL
See: raspberrypi/firmware#141

kernel: bcm2708: Make ioctl logging quieter
See: raspberrypi/linux#895

kernel: HiFiBerry Digi: set SPDIF status bits for sample rate
See: raspberrypi/linux#899

kernel: dts: overlay: add generic support for ads7846
See: raspberrypi/linux#896
@popcornmix
Copy link
Collaborator

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

@jbruchon
Copy link
Contributor

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

@popcornmix
Copy link
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).

@pssc
Copy link
Author

pssc commented Mar 24, 2015

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

@popcornmix
Copy link
Collaborator

Okay to close?

@PeterPablo
Copy link

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.

ncopa pushed a commit to alpinelinux/aports that referenced this issue May 30, 2016
neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
firmware: dispmanx: Fix for locking with dispmanx_element_add with stereo object

firmware: video_decode: increase the number of userdatas

firmware: platform: Enable VCOS_RELEASE_ASSERTS
See: raspberrypi#377 (comment)

firmware: dispmanx: Fix for dispmanx_snapshot with more than one rotated layer
See: raspberrypi#377

kernel: config: Enable ZSMALLOC, ZRAM and PGTABLE_MAPPING
See: raspberrypi/linux#894

kernel: config: Enable CONFIG_FB_MODE_HELPERS and CONFIG_FB_UDL
See: raspberrypi#141

kernel: bcm2708: Make ioctl logging quieter
See: raspberrypi/linux#895

kernel: HiFiBerry Digi: set SPDIF status bits for sample rate
See: raspberrypi/linux#899

kernel: dts: overlay: add generic support for ads7846
See: raspberrypi/linux#896
@yutayu
Copy link

yutayu commented Dec 11, 2020

armbian/build#2377
armbian/build@e90a488

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

pfpacket pushed a commit to pfpacket/linux-rpi-rust that referenced this issue Apr 7, 2023
ci: update container to Ubuntu 22.04 and provide `libssl-dev`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants