This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error in change the swap size
Hi to all ,

I try to increase the swap size with these code:

root@tinkerboard:~# cat /etc/dphys-swapfile
# /etc/dphys-swapfile - user settings for dphys-swapfile package
# author Neil Franklin, last modification 2010.05.05
# copyright ETH Zuerich Physics Departement
#   use under either modified/non-advertising BSD or GPL license

# this file is sourced with . so full normal sh syntax applies

# the default settings are added as commented out CONF_*=* lines

# where we want the swapfile to be, this is the default

# set size to absolute value, leaving empty (default) then uses computed value
#   you most likely don't want this, unless you have an special disk situation

# set size to computed value, this times RAM size, dynamically adapts,
#   guarantees that there is enough swap without wasting disk space on excess

# restrict size (computed and absolute!) to maximally this limit
#   can be set to empty for no limit, but beware of filled partitions!
#   this is/was a (outdated?) 32bit kernel limit (in MBytes), do not overrun it
#   but is also sensible on 64bit to prevent filling /var or even / partition
root@tinkerboard:~# /etc/init.d/dphys-swapfile restart
Restarting dphys-swapfile (via systemctl): dphys-swapfile.service.
root@tinkerboard:~# free -h
             total        used        free      shared  buff/cache   available
Mem:           2,0G        1,3G        127M         69M        548M        587M
Swap:          3,0G        1,0G        2,0G

Why it not change ?

Thanks, see you.
What about
# ls -l /var/swap
and the dphys-swapfile.service content.
Hi xxavi,

You can try this "CONF_SWAPSIZE=200".
The 4000 means 4000M...

Steps 1.
$ sudo leafpad /etc/dphys-swapfile
To modify CONF_SWAPSIZE=200

Step 2.
$ sudo service dphys-swapfile restart
Big Grin  I'm Lyle. 
The details are telling that the maximum is 2 Gb.

Forum Jump:

Users browsing this thread: 1 Guest(s)