Add ZRAM kernel module #230
Labels
No labels
CI enhacement
CS10 (chromestick)
HIGH PRIOROITY
Low Priority
Solved
TODO
arm64
armhf
bug
c100 (veyron minnie)
duplicate
enhancement
good first issue
help wanted
invalid
minor bug
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ev4/PrawnOS#230
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Module or flag. This is pretty standard on ChromeOS as well as most Linux distros now (it has been added to Mobian for Pine devices too)
Seems like it would give us some nice performance improvements on these low-ram systems. Could users with ChromeOS report how large of zram partitions are used on 2GB and 4GB models?
I dont use ChromeOS but on Mobian (Debian for Pine) we generally set it to 50% and all cores (4), and it works very well
CONFIG_ZRAM was actually already enabled on the armhf kernel. Now enabled on the arm64 kernel as well. Next is to setup the userspace config to take advantage of it.
It isnt on my install and I installed v1.1... to enable in userspace install zramswap and edit /etc/defaults/zramswap
SolidHal/PrawnOS@f845964360/kernel/resources/armhf/config (L1478)shows it is built in to the kernel. Its not a module, so it won't show up in lsmod. Actually, nothing is a module right now. on my veyron-speedy, I see/dev/zram0which further confirms it is enabled.By "on all cores (4)" are you saying there is a zram device per core?
Yes, it utilizes all cores which is optimal, otherwise you only get 1/4 the swap capacity/processing.
Ill have to double check the exact error Im getting because when I started it it screamed about the module not existing...
ah, so you are talking about
cat /sys/block/zram0/max_comp_streamsnot the number of zram devices to create? From https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html it looks like it automagically creates the right amount of compression streamsIm not sure about how it translates to the /sys blocks, but as far as the config itself those are the variables/values we found to work best. (Im not a dev, Im a linux admin who tries to help as much as he can lol, so sorry if Im missing an obvious link here)
Zram takes a parameter to set the number of devices it creates, the default is 1 which is why you only see
/dev/zram0created.So you'd either need to build it as a module and load it with:
modprobe zram num_devices=4or add the parameter to the kernel parameters when you build the kernel.
@graves thanks but my confusion is around if we want a zram device per cpu or if
max_comp_streamsis what we want per cpu.I'm leaning towards
max_comp_streamssince the documentation mentions it now automatically setsmax_comp_streamsbased on the number of cpus