CompressedMemory

Differences between revisions 1 and 2
Revision 1 as of 2006-09-07 14:59:35
Size: 4074
Editor: c-68-33-112-13
Comment: creat()
Revision 2 as of 2006-09-13 17:27:14
Size: 4073
Editor: triband-del-59
Comment: correct my name spelling >:)
Deletions are marked like this. Additions are marked like this.
Line 51: Line 51:
 * It would be wise to attempt to merge the compressed memory patches with mainline. Nitan Guptia states in e-mail that he has no interest in this because it's difficult to negotiate with the kernel developers; however, as with the 2.4 patch, if not merged with mainline use will be cumbersome and the project may eventually be abandoned.  * It would be wise to attempt to merge the compressed memory patches with mainline. Nitin Gupta states in e-mail that he has no interest in this because it's difficult to negotiate with the kernel developers; however, as with the 2.4 patch, if not merged with mainline use will be cumbersome and the project may eventually be abandoned.

NOTE: This page is part of the Ubuntu Specification process. Please check the status and details in Launchpad before editing. If the spec is Approved then you should contact the Assignee, or another knowledgeable person, before making changes.

Summary

This spec aims to deploy compressed memory in Ubuntu Linux using the new [http://linuxcompressed.sf.net] patches.

Rationale

It has been [http://linuxcompressed.sourceforge.net/linux24-cc/statistics/index.html shown] that compressed memory increases performance greatly when memory is overdrawn and decreases performance negligibly when ample memory is available. We should take advantage of this for both desktop and LiveCD performance.

Use cases

There are several.

  • Alice tries to run the LiveCD runs on 192MiB of RAM; with compressed memory, fewer disc reads occur and more programs can run at once.
  • Bob is running several applications on 1GiB of RAM; they total 800MiB and the kernel asides 400MiB for page cache due to swappiness, but doesn't write to disk because page cache and some memory pages are compressed before resorting to actual swapping.
  • Ben sets up a Web server with 2GiB of RAM servicing thousands of users. At peak usage it avoids expensive disk swaps by compressing some page cache and LRU memory.

Scope

This spec focuses on LiveCD, desktop, and server environments. Embedded environments such as OLPC should be handled case by case.

Design

The [http://linuxcompressed.sourceforge.net/] compressed memory patches will be used to enable memory compression. These patches should be stable by Edgy+1.

The compressed memory infrastructure is patched into the kernel; but the actual compression engine is a module. This module shall be separately loaded.

It should be possible to disable auto-loading of the compression module using a kernel command line switch such as nocompress.

Implementation

  • Merge patches to the 2.6 kernel with the Ubuntu kernel
    • Build the compressed memory module as a separate module
  • Write a loader script for the compressed memory module
    • Minimalistic and simple
    • Check a kernel command line parameter
    • Designed to be executed by anything; possibly execute in the initrd
  • Test heavily
    • Run both desktop and LiveCD with restrictive mem= parameters

Data preservation and migration

None.

Unresolved issues

Tuning of the compressed memory parameters is important. The current experimental patches allow direct tuning of the number of pages used for each of swap cache and page cache; it would be interesting to make this a percentage and let the kernel decide how to distribute it between the two.

BoF agenda and discussion

  • It would be wise to attempt to merge the compressed memory patches with mainline. Nitin Gupta states in e-mail that he has no interest in this because it's difficult to negotiate with the kernel developers; however, as with the 2.4 patch, if not merged with mainline use will be cumbersome and the project may eventually be abandoned.

References


CategorySpec

CompressedMemory (last edited 2008-08-06 16:33:05 by localhost)