Skip to main content
Changed swappiness from suggested 10 to 0, a reboot and a day later, it still hasn't used any swap space, so seems even better.
Source Link
dpzz
  • 4.5k
  • 4
  • 22
  • 45

Therefore, I also reduced the "swappiness" from the default 60 down to 100, which should reduce the tendency to use swap, unless absolutely required:

$ cat /proc/sys/vm/swappiness
60
$ sudo sysctl vm.swappiness=10swappiness=0
$ cat /proc/sys/vm/swappiness
100

To make the change permanent, edit /etc/sysctl.conf as root:

sudo vi /etc/sysctl.conf

And add the following line:

vm.swappiness = 0

Therefore, I also reduced the "swappiness" from the default 60 down to 10, which should reduce the tendency to use swap, unless absolutely required:

$ cat /proc/sys/vm/swappiness
60
$ sudo sysctl vm.swappiness=10
$ cat /proc/sys/vm/swappiness
10

Therefore, I also reduced the "swappiness" from the default 60 down to 0, which should reduce the tendency to use swap, unless absolutely required:

$ cat /proc/sys/vm/swappiness
60
$ sudo sysctl vm.swappiness=0
$ cat /proc/sys/vm/swappiness
0

To make the change permanent, edit /etc/sysctl.conf as root:

sudo vi /etc/sysctl.conf

And add the following line:

vm.swappiness = 0
added 90 characters in body
Source Link
dpzz
  • 4.5k
  • 4
  • 22
  • 45

After reading some of the instructions over at http://pinode.co.uk, I think I found the culprit. Turned out Ubuntu MATE for Raspberry Pi doesn't install with swap space out-of-the-box. I wasn't aware of this.

I have now added a 1024 MB linux-swap partition on my microSD card with GParted. I won't be very fast, but at least it's there.

enter image description here

Therefore, I also reduced the "swappiness" from the default 60 down to 10, which should reduce the tendency to use swap, unless absolutely required:

$ cat /proc/sys/vm/swappiness
60
$ sudo sysctl vm.swappiness=10
$ cat /proc/sys/vm/swappiness
10

Output of the free command when starting up monerod shows free memory takes a nose dive from ± 710 KB:

              total        used        free      shared  buff/cache   available
Mem:         949580       40424      710540        6760      198616      841848
Swap:       1048572           0     1048572

to roughly ± 35 KB

              total        used        free      shared  buff/cache   available
Mem:         949580       60428       36532        6760      852620      818640
Swap:       1048572           0     1048572

After monerod was fully synchronized again, it seems my Raspberry Pi 3 system is using just a little bit of swap space:

              total        used        free      shared  buff/cache   available
Mem:         949580      133652       33256        3768      782672      748508
Swap:       1048572        2988     1045584

That's probably why it system crashed previously without that swap ability.

I don't know exactly how to configure these newer Linux systems in "runlevel 3", if that still exists, to even consume less RAM. As a workaround, I have stopped some unnecessary services:

for SERVICE in x11vnc lightdm bluetooth cups
do
    sudo systemctl stop ${SERVICE}.service
done

If anyone has a better suggestion for that, feel free to comment or edit.

After reading some of the instructions over at http://pinode.co.uk, I think I found the culprit. Turned out Ubuntu MATE for Raspberry Pi doesn't install with swap space out-of-the-box. I wasn't aware of this.

I have now added a 1024 MB linux-swap partition on my microSD card with GParted. I won't be very fast, but at least it's there. Therefore, I also reduced the "swappiness" from the default 60 down to 10, which should reduce the tendency to use swap, unless absolutely required:

$ cat /proc/sys/vm/swappiness
60
$ sudo sysctl vm.swappiness=10
$ cat /proc/sys/vm/swappiness
10

Output of the free command when starting up monerod shows free memory takes a nose dive from ± 710 KB:

              total        used        free      shared  buff/cache   available
Mem:         949580       40424      710540        6760      198616      841848
Swap:       1048572           0     1048572

to roughly ± 35 KB

              total        used        free      shared  buff/cache   available
Mem:         949580       60428       36532        6760      852620      818640
Swap:       1048572           0     1048572

After monerod was fully synchronized again, it seems my Raspberry Pi 3 system is using just a little bit of swap space:

              total        used        free      shared  buff/cache   available
Mem:         949580      133652       33256        3768      782672      748508
Swap:       1048572        2988     1045584

That's probably why it system crashed previously without that swap ability.

I don't know exactly how to configure these newer Linux systems in "runlevel 3", if that still exists, to even consume less RAM. As a workaround, I have stopped some unnecessary services:

for SERVICE in x11vnc lightdm bluetooth cups
do
    sudo systemctl stop ${SERVICE}.service
done

If anyone has a better suggestion for that, feel free to comment or edit.

After reading some of the instructions over at http://pinode.co.uk, I think I found the culprit. Turned out Ubuntu MATE for Raspberry Pi doesn't install with swap space out-of-the-box. I wasn't aware of this.

I have now added a 1024 MB linux-swap partition on my microSD card with GParted. I won't be very fast, but at least it's there.

enter image description here

Therefore, I also reduced the "swappiness" from the default 60 down to 10, which should reduce the tendency to use swap, unless absolutely required:

$ cat /proc/sys/vm/swappiness
60
$ sudo sysctl vm.swappiness=10
$ cat /proc/sys/vm/swappiness
10

Output of the free command when starting up monerod shows free memory takes a nose dive from ± 710 KB:

              total        used        free      shared  buff/cache   available
Mem:         949580       40424      710540        6760      198616      841848
Swap:       1048572           0     1048572

to roughly ± 35 KB

              total        used        free      shared  buff/cache   available
Mem:         949580       60428       36532        6760      852620      818640
Swap:       1048572           0     1048572

After monerod was fully synchronized again, it seems my Raspberry Pi 3 system is using just a little bit of swap space:

              total        used        free      shared  buff/cache   available
Mem:         949580      133652       33256        3768      782672      748508
Swap:       1048572        2988     1045584

That's probably why it system crashed previously without that swap ability.

I don't know exactly how to configure these newer Linux systems in "runlevel 3", if that still exists, to even consume less RAM. As a workaround, I have stopped some unnecessary services:

for SERVICE in x11vnc lightdm bluetooth cups
do
    sudo systemctl stop ${SERVICE}.service
done

If anyone has a better suggestion for that, feel free to comment or edit.

Source Link
dpzz
  • 4.5k
  • 4
  • 22
  • 45

After reading some of the instructions over at http://pinode.co.uk, I think I found the culprit. Turned out Ubuntu MATE for Raspberry Pi doesn't install with swap space out-of-the-box. I wasn't aware of this.

I have now added a 1024 MB linux-swap partition on my microSD card with GParted. I won't be very fast, but at least it's there. Therefore, I also reduced the "swappiness" from the default 60 down to 10, which should reduce the tendency to use swap, unless absolutely required:

$ cat /proc/sys/vm/swappiness
60
$ sudo sysctl vm.swappiness=10
$ cat /proc/sys/vm/swappiness
10

Output of the free command when starting up monerod shows free memory takes a nose dive from ± 710 KB:

              total        used        free      shared  buff/cache   available
Mem:         949580       40424      710540        6760      198616      841848
Swap:       1048572           0     1048572

to roughly ± 35 KB

              total        used        free      shared  buff/cache   available
Mem:         949580       60428       36532        6760      852620      818640
Swap:       1048572           0     1048572

After monerod was fully synchronized again, it seems my Raspberry Pi 3 system is using just a little bit of swap space:

              total        used        free      shared  buff/cache   available
Mem:         949580      133652       33256        3768      782672      748508
Swap:       1048572        2988     1045584

That's probably why it system crashed previously without that swap ability.

I don't know exactly how to configure these newer Linux systems in "runlevel 3", if that still exists, to even consume less RAM. As a workaround, I have stopped some unnecessary services:

for SERVICE in x11vnc lightdm bluetooth cups
do
    sudo systemctl stop ${SERVICE}.service
done

If anyone has a better suggestion for that, feel free to comment or edit.