# Compcache for Verizon Samsung Droid Charge?



## kynalvarus (Oct 26, 2011)

Did anyone ever build a SCH-I510 kernel with compcache enabled and the ramzswap.ko module? If so, did it work? I've been having more and more memory limitation issues with this device as it ages, and apps get bigger, and I am wondering if compcache might not be an acceptable tradeoff.


----------



## shrike1978 (Sep 2, 2011)

If you're talking about enabling swap, it's been available on the PBJ kernel. You have to create the empty file /data/local/useswap and reboot. It's not worth it, IMO. Forget about listening to music or anything like that...you'll get skips and jitters.


----------



## kynalvarus (Oct 26, 2011)

shrike1978 said:


> If you're talking about enabling swap, it's been available on the PBJ kernel. You have to create the empty file /data/local/useswap and reboot. It's not worth it, IMO. Forget about listening to music or anything like that...you'll get skips and jitters.


@shrike1978, I tried enabling swap through tweaktools. It was exactly as bad as you describe and I turned it back off. Compcache works in a different way. It creates a compressed swap file in main memory, not on the SD card. This means that if you have enough extra CPU to handle the compression/decompression, you can effectively increase the total RAM available to your device. It was helpful on my old Droid 1 from Motorola when I pushed it to Cyanogenmod 7, because that device was a little short on RAM for the newer OS. By the same token, I'm starting to run into memory contention problems with the Droid Charge, so I thought compcache might be a good stopgap until I upgrade devices again.


----------



## dwitherell (Jul 23, 2011)

kynalvarus said:


> @shrike1978, I tried enabling swap through tweaktools. It was exactly as bad as you describe and I turned it back off. Compcache works in a different way. It creates a compressed swap file in main memory, not on the SD card. This means that if you have enough extra CPU to handle the compression/decompression, you can effectively increase the total RAM available to your device. It was helpful on my old Droid 1 from Motorola when I pushed it to Cyanogenmod 7, because that device was a little short on RAM for the newer OS. By the same token, I'm starting to run into memory contention problems with the Droid Charge, so I thought compcache might be a good stopgap until I upgrade devices again.


I may be wrong, but I thought the swap option in imnuts kernel used the internal /preinstall partition. I know little else about how the two methods described here differ though.


----------



## kynalvarus (Oct 26, 2011)

dwitherell said:


> I may be wrong, but I thought the swap option in imnuts kernel used the internal /preinstall partition. I know little else about how the two methods described here differ though.


@dwitherell: Hmm. I didn't check which partition imnuts used for swap, but IMHO it's not super-important. The built-in SD RAM is not that much faster than a good SD card anyhow. The performance was still jerky and laggy, in any event, which suggests that it's not fast enough.


----------



## shrike1978 (Sep 2, 2011)

kynalvarus said:


> I may be wrong, but I thought the swap option in imnuts kernel used the internal /preinstall partition. I know little else about how the two methods described here differ though.


I'm not sure what it uses. I've never looked into it, but I do know that turning it on pretty effectively destroys performance of anything that streams.


----------



## kynalvarus (Oct 26, 2011)

shrike1978 said:


> imnuts' Charge kernel code is available, but I have no real insights into kernel development beyond some very basic initramfs tweaks...last time I actually took to modifying any kernel code at all was vanilla desktop Linux back in college, and that was 13 years ago.


@shrike1978, is this the kernel code? https://github.com/imnuts/sch-i510_kernel

I've done some kernel hacking a lot more recently than 13 years ago. Haven't yet tried to build an Android one, though. Maybe I'll give it a shot.


----------



## shrike1978 (Sep 2, 2011)

Yea, that's the code.

Sent from my SCH-I510 using Tapatalk 2


----------



## kynalvarus (Oct 26, 2011)

shrike1978 said:


> Yea, that's the code.
> 
> Sent from my SCH-I510 using Tapatalk 2


Meh. I found the instructions for building CM7's kernel from source, but they don't seem to port to this repo. Does anyone know what's needed to get a working kernel build environment started for PBJ? @imnuts? @tonsit?


----------



## kynalvarus (Oct 26, 2011)

kynalvarus said:


> Meh. I found the instructions for building CM7's kernel from source, but they don't seem to port to this repo. Does anyone know what's needed to get a working kernel build environment started for PBJ? @imnuts? @tonsit?


I followed (roughly) imnuts's directions to build a development VM. I downloaded his source from checkin 3e9d149c1ba21b741c6b0aa34aa434eae22fb157, which appears to be the last pre-FP5 commit. Customized the kernel Makefile to point to the ARM toolchain.

Used

```
<br />
make menuconfig<br />
```
to turn on swap and the staging ramzswap module. Tweaked around to keep the version magic the same. Made a kernel, yay!

So I adb push the three modules, lzo_compress.ko, lzo_decompress.ko, and ramzswap.ko up to my phone. The compression modules insmod with no problem. ramzswap, on insmod, freezes the phone, followed by a reboot about 10 seconds later. dmesg from adb showed nothing, it was frozen too.

It looks like I may have to build an entire custom kernel, then figure out how to update.zip package it so I can push it in. If anyone has a good update.zip packaging guide for kernels, I'd appreciate it - but I'm sure Google can find me a few.


----------



## mthous01 (Dec 22, 2011)

kynalvarus said:


> I followed (roughly) imnuts's directions to build a development VM. I downloaded his source from checkin 3e9d149c1ba21b741c6b0aa34aa434eae22fb157, which appears to be the last pre-FP5 commit. Customized the kernel Makefile to point to the ARM toolchain.
> 
> Used
> 
> ...


You might look at the end of IMNUTS' build_kernel.sh script. It seems to create the CWM flashable zip file automatically.


----------



## Tmanschuette (Aug 24, 2012)

Good luck man! It would be nice to have a little bit more development for the Charge. I like imnuts kernal because it enables over clock/undervolt, and allows you to use the voodoo sound app. If you can emplement those I will definately be a tester for you 

Tweaked 3.0 and Transparent ICS 5.0 Beta


----------



## mthous01 (Dec 22, 2011)

kynalvarus said:


> I followed (roughly) imnuts's directions to build a development VM. I downloaded his source from checkin 3e9d149c1ba21b741c6b0aa34aa434eae22fb157, which appears to be the last pre-FP5 commit. Customized the kernel Makefile to point to the ARM toolchain.
> 
> Used
> 
> ...


Looks like IMNUTS is having issues with getting his custom kernel to play nice with FP5, so he's backporting the changes into the FP1 Kernel. You might be able to further customize this one with the modules after he completes it. Personally, I couldn't get the kernel to build when I downloaded the repositories.

What did you do different from the development VM guide?


----------



## kynalvarus (Oct 26, 2011)

The guide was for the Samsung Fascinate, and some things were different. For example, the change to point the kernel build to the ARM toolchain was in a Makefile, not a script. Trivial stuff like that, nothing that should have broken anything under normal circumstances.


----------



## kynalvarus (Oct 26, 2011)

mthous01 said:


> Looks like IMNUTS is having issues with getting his custom kernel to play nice with FP5, so he's backporting the changes into the FP1 Kernel. You might be able to further customize this one with the modules after he completes it. Personally, I couldn't get the kernel to build when I downloaded the repositories.


I had a lot of trouble trying to build on my Fedora 17 install, so I built an Ubuntu 10.04 LTS VM using VirtualBox, and ran every part of imnuts's minimal_install.sh script - except the one with the vbox guest additions. I did that install manually so as to get the proper version that went with my VirtualBox install.

What sort of problems is imnuts having with FP5? I haven't heard much news about that project, but I'd be willing to help out.


----------



## mthous01 (Dec 22, 2011)

Not sure, but check in the dev section. He posted there about it.

tapping from a [email protected] Charge


----------



## mthous01 (Dec 22, 2011)

kynalvarus said:


> I followed (roughly) imnuts's directions to build a development VM. I downloaded his source from checkin 3e9d149c1ba21b741c6b0aa34aa434eae22fb157, which appears to be the last pre-FP5 commit. Customized the kernel Makefile to point to the ARM toolchain.
> 
> Used
> 
> ...


What config file did you use for the charge?


----------

