COMP Cache

Discussion in 'Cyanogenmod' started by FcoT, Aug 31, 2010.

  1. FcoT
    Offline

    FcoT New Member

    Joined:
    Aug 11, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    0
    Isn't comp cache supposed to be a feature in CM6? Because I am having to manually start on every boot, and if the ROM is not built for it, I am afraid the ROM won't completely benefit from it.
  2. mjones73
    Offline

    mjones73 New Member

    Joined:
    Jul 10, 2010
    Messages:
    450
    Likes Received:
    0
    Trophy Points:
    0
    Add your start command to the bottom of /etc/init.d/20userinit and it will start on boot for you.
  3. Jboxen
    Offline

    Jboxen Premium Member Premium Member Developer

    Joined:
    Jun 15, 2010
    Messages:
    902
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Rochester, NY
    Any way you could explain this more for me? I'd like to see how much benefit it actually offers the rom.
  4. BoddhiC
    Offline

    BoddhiC New Member

    Joined:
    Feb 15, 2010
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    0
    Jboxen - from a post of mine on another forum:

    For those not familiar - what is it: compcache is a bit of code that creates a virtual swap drive in your RAM. The data that goes into it is compressed, this occurs very quickly. So, it essentially gives you the equivalent of virtual extra RAM to keep programs in memory.

    Why use it: I am finding that with compcache enabled I can run a number of large memory usage programs without slowdown. Furthermore, with compcache I am not having the issue with the slow redraw/ relaunch of the ADW launcher that I have without it. This is an issue that many people have reported. Between compcache and the interactive governor, my phone is running as smooth and well as I could hope for.

    The use compcache check box under Settings / CyanogenMod Settings/ Performance Settings does not seem to work.

    You need to have a kernel that has compcache enabled. The slayher 1.6 kernels work well.

    The easiest way to make compcache persistent after reboot is to use root file manager to open the file /etc/init.d/20userinit in its text editor and add /system/bin/compcache start at the bottom. You could also pull /edit /push the file with adb. I haven't used it in a while and don't want to give you the wrong commands.

    Good Luck
  5. drpaul07
    Offline

    drpaul07 Member

    Joined:
    Jul 25, 2010
    Messages:
    362
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Texas
    i don't see a compcache checkbox at all under my performance settings. Does that show up once there is a kernel that supports it? I'm just using the stock kernel that CM 6 came with, but i'm thinking of trying a slayher kernel soon.

    Also, how can you check if compcache is working after a reboot to make sure you entered the info in root file manager correctly?

    Will entering this compcache info have any ill effect on other kernels that don't make use of this? (like chevy or p3droid kernels)
  6. FcoT
    Offline

    FcoT New Member

    Joined:
    Aug 11, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    0
    on terminal, type:
    su [enter]
    /system/bin/compcache stats (to check if its on, if it is, you get a memory rading and some stats, if it is not, you will get an error)
    /system/bin/compcache start (to enable it)


    What program do I sue to open the 20userinit to change it?
    Last edited: Aug 31, 2010
  7. drpaul07
    Offline

    drpaul07 Member

    Joined:
    Jul 25, 2010
    Messages:
    362
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Texas
    I believe you can use Root explorer. That's what rooted users use to check the system, data, and cache files. I have actually never used it because i've never needed to modify anything in there but i may get it if i try this slayher kernel. It is a paid app but works great from what i hear. I'm probably one of the few rooted users that doesn't have it.
  8. furbearingmammal
    Offline

    furbearingmammal DF Super Moderator

    Joined:
    Jun 16, 2010
    Messages:
    10,354
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    So far north in NY I smell maple syrup when the wi
    I can't find the COMP Cache in CM 6.0 in settings>CyanogenMod Settings> Performance Settings. Just the JIT, dithering, lock home, and VM heap size.

    What version are you running? One of the RCs or a nightly?
  9. BoddhiC
    Offline

    BoddhiC New Member

    Joined:
    Feb 15, 2010
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    0
    You are correct, the check box only shows up if you are using a kernel that supports it.

    FcoT's method to check compcache stats works. You can also look under the info tab of setcpu at the swap cached/ total/ free numbers to see if it is running.

    The compcache info shouldn't cause problems with other kernels.

    FcoT, the easiest way to edit the 20userint file is with Root File Explorer. Navigate to the /etc/init.d directory, click the box at the top right of root explorer to make the directory read/write, long press on 20userinit, scroll down and choose "open in text editor", make your edit, click menu button, then choose save and exit. Reset the directory to read only for good measure and you should be all set.
  10. furbearingmammal
    Offline

    furbearingmammal DF Super Moderator

    Joined:
    Jun 16, 2010
    Messages:
    10,354
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    So far north in NY I smell maple syrup when the wi
    Thanks for the clarification. ChevyNo1 doesn't have it in his kernels at present. Hopefully soon, then, as this sounds like CM6 NEEDS it -- as do most FroYo ROMs, including stock!
  11. FcoT
    Offline

    FcoT New Member

    Joined:
    Aug 11, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    0
    just purchased root explorer, but it wont open the file

    edit* NM I needed to mount W/R able
    Last edited: Aug 31, 2010
  12. drpaul07
    Offline

    drpaul07 Member

    Joined:
    Jul 25, 2010
    Messages:
    362
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Texas
    Excellent! Thank you. I just downloaded root explorer from the market and found the file and opened it in text editor. Didn't change anything, but just wanted to check it out. Pretty cool! So, just to be sure, whenever i install the slayher kernel and want to enable compcache on boot up, i enter this at the bottom of the file:

    /system/bin/compcache start

    Yes? With the space between 'compcache' and start'? Thanks again.
  13. mjones73
    Offline

    mjones73 New Member

    Joined:
    Jul 10, 2010
    Messages:
    450
    Likes Received:
    0
    Trophy Points:
    0
    Yes, a space between compcache and start.
  14. FcoT
    Offline

    FcoT New Member

    Joined:
    Aug 11, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    0
    now is not working at all:-( before I was able to start it manual, but now, it all gives me an error
  15. furbearingmammal
    Offline

    furbearingmammal DF Super Moderator

    Joined:
    Jun 16, 2010
    Messages:
    10,354
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    So far north in NY I smell maple syrup when the wi
    Reboot the phone yet?
  16. FcoT
    Offline

    FcoT New Member

    Joined:
    Aug 11, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    0
    yes, double check the root file for spelling, but even manually is failing, tried a different slayer kernel,, but nothing works at all now,, about to restall
  17. furbearingmammal
    Offline

    furbearingmammal DF Super Moderator

    Joined:
    Jun 16, 2010
    Messages:
    10,354
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    So far north in NY I smell maple syrup when the wi
    Sounds like a wise choice.
  18. drpaul07
    Offline

    drpaul07 Member

    Joined:
    Jul 25, 2010
    Messages:
    362
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Texas
    This occurred after editing the 20userint file? Have you tried removing what you entered to see if you can at least manually start compcache?
  19. furbearingmammal
    Offline

    furbearingmammal DF Super Moderator

    Joined:
    Jun 16, 2010
    Messages:
    10,354
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    So far north in NY I smell maple syrup when the wi
    Oh, my bad. I thought restall meant you were removing the code you'd just added. Whoops!
    :redface:
  20. Jboxen
    Offline

    Jboxen Premium Member Premium Member Developer

    Joined:
    Jun 15, 2010
    Messages:
    902
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Rochester, NY
    Thank you! This helped me a lot, for those who were having issues, on slayhers kernel page he has a file for download that is to be flashed after flashing his kernel for use with compcache in CM. I feel like those having problems probably haven't flashed that yet. As for me I have yet to try any of this out but I will when I get home. Thank you again for the help.
Search tags for this page

comp cache

,
compcache rm cm option
,
cyanogenmod 9 compcache broken
,
how to check compcache
,

www.compechache.com