Increase Your Raspberry RAM With Your Disk Storage

profile picture

Increase Your Raspberry RAM With Your Disk Storage

I've got this raspberry pi 3 running from a very long time, and some time ago I installed Gekko, a crypto trader bot, on it.

The problem is that with my 500Gb of RAM, the bot crashes after a few days (it is accumulating data in a wide range). Seems like there is nothing to do ? Quite the opposite!

I worked with Linux for a long time and I didn't even know about memory swap! As they say, we learn new things every day...

So my dear friend Drilon explained me I can use the disk storage (my SD card space) to store flash memory (thus increase the maximum RAM of the raspberry pi).

And you just need to run a few commands.

If you're on Raspbian:

Edit the /etc/dphys-swapfile file

sudo nano /etc/dphys-swapfile

It's a very small file and you're looking for the CONF_SWAPSIZE variable.

Set it to 1024 if you want to allow 1Gb of RAM from your SD Card (or more, or less).

Save the file and restart the service with

sudo /etc/init.d/dphys-swapfile restart

That's it !

rasbperry pi

2021 My Dynamic Production SPRL All rights Reserved.