[Commotion-admin] [commotion-openwrt] Nodes are crashing, out of memory (#40)

Ben West notifications at github.com
Fri Oct 4 08:25:03 UTC 2013


Likewise, leading from chatting briefly with Dan here, I suggested adding the "zram-swap" package presently in OpenWRT trunk to the commotion packages feed, and then enabling swap in kernelconfig.  This would let you enable compressed swap memory on nodes, and ideally make the memory limit somewhat softer (i.e. help nodes avoid OOM errors and processes crashing).

So, specifically, do make kernel_menuconfig and make these selections:
General Setup -> Support for paging of anonymous memory (swap) *
Device Drivers -> Staging drivers -> Compressed RAM block device support *

This kernel config change can also be done via a patch, and such a patch is buried somewhere in openwrt-devel listserv archives (i.e. when the zram package was originally announced).

Then copy the zram_swap package from trunk into commotionfeed and enable it.

For my nodes with 32MB of RAM, I specify 6MB swap in /etc/config/system:

```
config system
	...
	option 'zram_size_mb' '6'
```

You can periodically check swap usage to ensure nothing is using excessive RAM:

```
root at nsm5-b:~# free
             total         used         free       shared      buffers
Mem:         29184        24100         5084            0         2752
-/+ buffers:              21348         7836
Swap:         6140            0         6140
```


---
Reply to this email directly or view it on GitHub:
https://github.com/opentechinstitute/commotion-openwrt/issues/40#issuecomment-25683085
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-admin/attachments/20131004/d4c87475/attachment.html>


More information about the Commotion-admin mailing list