Increase size of existing swap file


4 posts
by Physics_Dude » 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?
Posts: 4
Joined: Fri Sep 28, 2012 3:19 pm
by rpdom » 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.
User avatar
Posts: 10585
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK
by Physics_Dude » 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:
Posts: 4
Joined: Fri Sep 28, 2012 3:19 pm
by Zeno » Wed Feb 05, 2014 11:14 am
I think it should be CONF_SWAPSIZE
AFAIK CONF_SWAPFILE is for the swap location
Posts: 3
Joined: Tue Jan 14, 2014 4:56 pm