I am trying to get MongoDB installed on the Debian Squeeze OS.
I am following these instructions http://elsmorian.com/post/24395639198/b ... spberry-pi.
When I get to 'scons' it begins to compile but then I get 'Virtual memory exhausted: Cannot allocate memory'
Do I need to close some things to free up memory?
How do I find what is hogging all the memory?
Thanks
Re: Compiling MongoDB for the RasPI
Create an empty file using the dd (device-to-device copy) command: dd if=/dev/zero of=/swap0 bs=1M count=512 # This is for a 512 MB swap space.
Format the file for use as swap: mkswap /swap0
Add the swap file to the system configuration: echo "/swap0 swap swap" >>/etc/fstab
Activate the swap space: swapon -a
Format the file for use as swap: mkswap /swap0
Add the swap file to the system configuration: echo "/swap0 swap swap" >>/etc/fstab
Activate the swap space: swapon -a
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
Re: Compiling MongoDB for the RasPI
Thanks!
This worked great.
Is there any problem with leaving the swap file activated? I read that it can reduce the life of your SD card. Is it possible/better to have this file on a USB HDD?
This worked great.

Is there any problem with leaving the swap file activated? I read that it can reduce the life of your SD card. Is it possible/better to have this file on a USB HDD?
Re: Compiling MongoDB for the RasPI
It will reduce the life of the SD-card, but I found this on a different post on the subject:JimHough wrote:Thanks!
This worked great.![]()
Is there any problem with leaving the swap file activated? I read that it can reduce the life of your SD card. Is it possible/better to have this file on a USB HDD?
(http://www.raspberrypi.org/phpBB3/viewt ... f=2&t=2813)redman684 wrote:I often see memory that can be written 100,000 times and even claims of over 1,000,000 are made.
Writing an 8 GB card (with perfect wear leveling) 100,000 times with 10 MB/s will take 2.6 years of continuous writing. So it's pretty safe to say the card won't wear out anytime soon, even when used as swap space.
Re: Compiling MongoDB for the RasPI
But not all SHDC cards have wear-level support, I managed to burn one to the ground with swap partition after only two weeks of usage, so be careful...
Re: Compiling MongoDB for the RasPI
Congrats on this great quote, but that logic is flawed.Berglund wrote:JimHough wrote:
It will reduce the life of the SD-card, but I found this on a different post on the subject:
(http://www.raspberrypi.org/phpBB3/viewt ... f=2&t=2813)redman684 wrote:I often see memory that can be written 100,000 times and even claims of over 1,000,000 are made.
Writing an 8 GB card (with perfect wear leveling) 100,000 times with 10 MB/s will take 2.6 years of continuous writing. So it's pretty safe to say the card won't wear out anytime soon, even when used as swap space.
Issues don't happen when you write big files, like in your example, but when you write bunch of small files! Usually each block in SD card is 4MB in size, so when you write lots of small random files you can reduce time it takes to burn the card by factor of 30 or more.
Please read this great article regarding calculating time it takes to burn down flash memory in SDHC cards: http://www.scribd.com/doc/7010332/SANDI ... r-Leveling