compcache issue - kernel variable not being set, and other issue

Discussion in 'Liquid' started by rehack, Aug 18, 2011.

  1. rehack
    Offline

    rehack New Member

    Joined:
    Aug 18, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    enabling compcache actually hurts you right now, since in /etc/sysctl.conf we have swappiness set to 0. in that case, the kernel will almost never use the compcache disk and we'll end up with less usable memory overall. perhaps enabling compcache in the rom settings can set swappiness to 100 at the same time?

    at any rate, regardless of compcache disk size i've been unable to get the kernel to use it all - it will get up to around 50% used (MemUsedTotal/DiskSize from running compcache stats) but never higher - since the compression ratio is rarely above 50%, this means compcache itself is netting us nothing apart from the overhead of compressing and decompressing pages.

    i've tried tweaking vfs_cache_pressure, but i can never get MemUsedTotal anywhere near DiskSize. are there any linux vm tweakers that know how to fix this?
  2. rehack
    Offline

    rehack New Member

    Joined:
    Aug 18, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    okay, after reading StatsExplained - compcache - Interpreting ramzswap stats - Compressed Caching for Linux - Google Project Hosting it makes sense - compcache reports itself as an X megabyte swap device, but it doesn't actually reserve any memory up front (at least it shouldn't!! that would be a very huge bug). when the kernel sends it pages to swap out, compcache compresses them and then allocates only enough ram to store the compressed version. that means it's not wasting memory, as long as it's working by design (i.e. specifying a 200mb compcache disk wouldn't leave us with only 50mb free). definitely going to check on that.

    also the compcache script in /system/bin does set swappiness to 30, but that's being overridden by /etc/sysctl.conf so it's not much use to us.
  3. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
    Its really easy to change the swappiness setting in the sysctl.config...just open sysctl.config and change the swappiness line to 30, save and reboot...btw having a swappiness setting without compcache on doesn't do anything so it wouldn't hurt even if you turn compcache off, at least I'm pretty sure it doesn't lol

    Sent from my Droid using DroidForums
  4. rehack
    Offline

    rehack New Member

    Joined:
    Aug 18, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    yep that's the case, however as of right now compcache is broken for most users (stock sysctl.conf swappiness of 0 is overriding the 30 that compcache's helper script tries to set). it just seems better that a future release really sets the variable if someone wants to enable compcache, or runs the compcache helper after sysctl.conf has been loaded.

    so far it's working very well for me, even in extreme situations (50% compcache size, swappiness 100). android does appear to flush old tasks for some reason though. i can swap between browser, gmail, messages, wordfeud, ebay and facebook without anything having to be restarted, but then if i leave the phone alone for a half hour many apps have to be reloaded. weird.
  5. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
    I'm not sure its compcache that keeps apps open other than allowing for the ram to be used more efficiently. Compcache and swap store a compressed part of the ram needed to run an app
    For example say an app needed 10mb of ram to run, compcache (or swap) would take maybe 4mb of it and compress it even after the app is closed so that if you run the app later that 4mb is easily uncompressed quickly and only 6mb would need to be used from the regular free ram

    At least I'm pretty sure that's how it works...androids built in task killer (min free values) are more responsible for keeping apps open completely

    Anyone who knows better, feel free to correct me lol

    Sent from my Droid using DroidForums
Search tags for this page

android kernel sysctl

,

compcache franco kernel

,

disable compcache ics

,

disable compcache in ics

,

kernel+swappiness+galaxy sii

,

what does compcache do