Physics_Dude
Posts: 4
Joined: Fri Sep 28, 2012 3:19 pm

Increase size of existing swap file

Sat Jun 08, 2013 2:10 am

First of all I need to mention that my Pi is running off a mechanical HDD, not an SD card. So from this it is understandable that a larger swap file would be beneficial when the internal ram fills up.

The existing 100MB swap file at /var/swap is doing a good job, but I am in need of a bit more. Perhaps a Gig or two.

Does anyone have a few words on how I can go about doing this without causing to much trouble on the system?

User avatar
rpdom
Posts: 11541
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: Increase size of existing swap file

Sat Jun 08, 2013 5:26 am

Change the size in /etc/dphys-swapfile:

Code: Select all

CONF_SWAPFILE=100
man dphys-swapfile for details.

Physics_Dude
Posts: 4
Joined: Fri Sep 28, 2012 3:19 pm

Re: Increase size of existing swap file

Sat Jun 08, 2013 8:28 am

Code: Select all

$ free -m
             total       used       free     shared    buffers     cached
Mem:           485        141        344          0         10         63
-/+ buffers/cache:         66        419
Swap:         1023          0       1023
Thanks! :mrgreen:

Zeno
Posts: 3
Joined: Tue Jan 14, 2014 4:56 pm

Re: Increase size of existing swap file

Wed Feb 05, 2014 11:14 am

I think it should be CONF_SWAPSIZE
AFAIK CONF_SWAPFILE is for the swap location

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 35 guests