New IT forum
12 August 2022, 02:44:17 pm *
Welcome, %1$s. Please login or register.

: MiraBox now in stock.
Pages: [1]

Author Topic: Dealing with the low RAM  (Read 4413 times)


  • Newbie
  • *
  • Posts: 9
Dealing with the low RAM
« on: 21 July 2011, 01:13:07 pm »

Hi Guys,

as you might have noticed, 512MB of RAM can sometime be a pain in the ***. So here some workarounds (with questions):

a) Using compcache

You should be familiar with making you own kernel!
Compcache creates a compressed ramdisk to use it as a swapspace. The upside is more swapspace, the downside is of course performance, as it is using the cpu (what else) to (de-)compress the data on the fly. So if cpu load is not your problem, but RAM is, this is for you. I have to notice, that this can even be run on smartphones, so the cpu load is not that hight. As disksize 128MB works well for me.
In order to use this, you have to make you own kernel from a manually patched source. I used the kernels config file from mentioned in this forum as a base for that.
Compcache and helpful instructions can be found here:

b) Swap partition, the big questionmark

You might partition you SD-Card or create a swapfile (here 512MB) using "dd if=/dev/zero of=/swapfile bs=1M count=512". However, many sources mention, that using a swapspace on a SD-Card wears it out very fast, causing damage to it. Other sources say, that this is no problem, if the SD-Card is of a better quality. So, @NEWIT-Crew: Is the internal SD-Card able to handle the many read/write cycles?

a + b) A nice solution is of course, to use both techniques and handle the usage of them via swappines. So the ramdisk is used frequently, whereas the swapfile is avoided if not needed.

c) Tuning programs config for low memory

For many programs, you can find some usefull hints via google search for "$PROGRAM low memory", "$PROGRAM low ram" or something similar. Eg. you can configure apache not to fork is self a big amount of times to keep its memory usage low.

Any further suggestions?
A fool with a tool is still a fool.


  • Newbie
  • *
  • Posts: 8
Re: Dealing with the low RAM
« Reply #1 on: 21 July 2011, 04:23:19 pm »

One alternative, if you have the network infrastructure, would be to swap to a network block device (such as gnbd).  Then you can "serve" a swap partition to the Dreamplug from another host.  This would enable you to swap arbitrarily large amounts - but performance will be turgid when swapping heavily.  To make the best of it, use gigabit ethernet and a 9K MTU, ideally connected point-to-point to the gnbd host.
Pages: [1]

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!