casper configures system to use 50% ram for compressed swap post installation

Bug #933712 reported by Ben Howard
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
casper (Ubuntu)
Won't Fix
Low
Unassigned

Bug Description

When installing from live-cd or if Capser is installed, it leaves /usr/share/initramfs-tools/conf.d/comcache with a value 'COMPCACHE="50%"'. This means that a user will loose half of their RAM to a compressed swap device on kernel initramfs generation and reboot. . In my opinion this is a _very_ poor user experience.

A work around is to boot with "nocompcache" as a kernel option. However, requiring a user to boot with "nocompcache" is beyond many users and will surely frustrate power-users and developers.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: casper (not installed)
ProcVersionSignature: Ubuntu 3.2.0-15.24-generic 3.2.5
Uname: Linux 3.2.0-15-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
Date: Thu Feb 16 12:38:37 2012
EcryptfsInUse: Yes
SourcePackage: casper
UpgradeStatus: Upgraded to precise on 2012-01-09 (38 days ago)
modified.conffile..etc.casper.conf: [deleted]

Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

More information as to how Casper ended up on my laptop:

I installed the usb-creator on Oneiric, which required lupin-capser, which pulled in casper. I upgrade from Oneiric to Precise on 2012-01-07. On 2012-02-01, my host picked up the version of Casper which has the compcache setting.

Revision history for this message
Brian Murray (brian-murray) wrote :

casper is not installed on the target system during the installation process and afaict usb-creator doesn't require capser or lupin-casper so I'm really not sure what happened to your system.

Additionally, compcache (according to the casper changelog) should only be used on systems (running casper) with less than 512MB of ram.

casper (1.232) lucid; urgency=low

  * bump compcache size to 50% on live images for machines with less than
    512MiB. This makes sure we don't hit OOM errors on systems with only
    256MiB of RAM.

 -- Oliver Grawert <email address hidden> Mon, 12 Apr 2010 08:10:06 +0200

Changed in casper (Ubuntu):
importance: Undecided → Low
Revision history for this message
Colin Watson (cjwatson) wrote :

It might make sense to do an additional run-time check to see if you booted with boot=casper, and otherwise not set this variable.

Revision history for this message
Oliver Grawert (ogra) wrote :

i am closing this bug for two reasons:

a) having compcache enabled isnt actually a bad thing, it raises the amount of usable ram with no known drawbacks (and i dont know what you refer to regarding a "poor experience")
b) on normal installs casper is not installed, during installation casper (and with it the compcache configuration) gets removed by ubiquity

Changed in casper (Ubuntu):
status: New → Won't Fix
Revision history for this message
Adam Conrad (adconrad) wrote :

To elaborate on Oli's "no known drawbacks" comment, I think it's clear that some people don't understand how zram works. While you're telling it that you can use up to 50% of your RAM for compressed swap, that doesn't actually kick in until you run out of RAM, precisely the point where you'd normally be hitting disk for swap instead.

So, if you only ever commit 3.9G on a 4G system, zram does essentially nothing. If you overcommit, it'll start swapping from ram to zram and eating memory, but this all happens so much faster than you can swap to disk that I have yet to see it be a bad thing (in fact, I've been arguing for a while that we should just enable zram on all machines, regardless of configuration).

Revision history for this message
Daniel Lemnaru (lemnaru) wrote :

I encountered the same thing here. Remastersys required casper, and casper set the compcache to 50%.

Regardless of the fact that it may be a good thing performance wise, I still think it's not something that should happen without the user's knowledge.

I had to waste quite a bit of time to find out what was the source of the 50% zram swap partition. Also, I would assume this can affect those who want to/can otherwise use hibernate, since this is not a non volatile swap partition.

"Additionally, compcache (according to the casper changelog) should only be used on systems (running casper) with less than 512MB of ram."

I have 5.5 GB of available RAM. Casper apparently isn't using that 512MB limit, or fails to determine the system's available memory properly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.