diff --git a/main/postmarketos-zram/APKBUILD b/main/postmarketos-zram/APKBUILD index 01bf442a2..9e8457feb 100644 --- a/main/postmarketos-zram/APKBUILD +++ b/main/postmarketos-zram/APKBUILD @@ -1,6 +1,6 @@ maintainer="Clayton Craft " pkgname=postmarketos-zram -pkgver=1 +pkgver=2 pkgrel=0 pkgdesc="zram swap configuration for postmarketOS" url="https://postmarketos.org" @@ -27,6 +27,6 @@ package() { sha512sums=" ca91be78a47c00f40f3e645f79a72b2cd7ba3f080e2feb256998bb121f64c0394041f2ed822ad307ac36e86398b8175b3284dc5097a7017947e520a304b0a37d postmarketos-zram-swap.initd 5c1787bc2d597726113aaf3ea59229b5a56b8fc3446c78406a202e163a0b37ac564a87b2acc1c1f1a7dcdc18ff863c45e13aa687b93fa537c5ef000b9e8d6d19 postmarketos-zram-swap.service -798e162f0393621144bfef843fa2f21f9cdfaaa4cd07d4d8b63499f8c3db27d6b9cbb901b43459e5378bd2bb6905f1e371ff915b8e439908944e8030eee7b48e zramstart +cc8ae3a0a26aeac7015c5b66c08d76f7d7d4479f20b0876dc14368d6f4ff57a0132bac1f673c194d1b3e1df23660161486123f9691ee4d078a06f328d7246417 zramstart a70d2bcb26c1af42a71811a1c1cd2984808f5ce09d7af52b26824cf5c15c8a9c819691fc6290cf3028226fca39f6e7a495546c5573c582a14d5a8c7c65dbfe3e zramstop " diff --git a/main/postmarketos-zram/zramstart b/main/postmarketos-zram/zramstart index 55d5be6f1..34a15e80f 100644 --- a/main/postmarketos-zram/zramstart +++ b/main/postmarketos-zram/zramstart @@ -8,19 +8,16 @@ set -e get_size() { # Size defaults to: - # - 75% of RAM for devices with 2GB of RAM or less - # - 50% of RAM for devices with between 2GB and 6GB of RAM - # - 25% of RAM for devices with greater 6GB of RAM + # - 150% of RAM for devices with less than 32GB of RAM + # - 50% of RAM for devices with greater than 32GB of RAM # This is loosely based on some data here: - # https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/3752#note_1229631449 + # https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/4250 local mem_size_mb size_pct mem_size_mb="$(LC_ALL=C free -m | awk '/^Mem:/{print $2}')" - if [ "$mem_size_mb" -le 2048 ]; then - size_pct=75 - elif [ "$mem_size_mb" -gt 6144 ]; then - size_pct=25 + if [ "$mem_size_mb" -le 32768 ]; then + size_pct=150 else size_pct=50 fi