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
#1
Hi to all ,

I try to increase the swap size with these code:

Code:
root@tinkerboard:~#
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
#CONF_SWAPFILE=/var/swap

# 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
CONF_SWAPSIZE=4000

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

# 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
CONF_MAXSWAP=4048
root@tinkerboard:~#
root@tinkerboard:~# /etc/init.d/dphys-swapfile restart
Restarting dphys-swapfile (via systemctl): dphys-swapfile.service.
root@tinkerboard:~#
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
root@tinkerboard:~#

Why it not change ?

Thanks, see you.
Reply
#2
What about
Code:
# ls -l /var/swap
and the dphys-swapfile.service content.
Reply
#3
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. 
Reply
#4
The details are telling that the maximum is 2 Gb.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)