Quantcast
Viewing all articles
Browse latest Browse all 5077

Troubleshooting • Re: Headless RPi 3B+ extremely slow !

You may be having a "thrashing" problem which occurs when the system runs out of real memory and begins heavily use the swap space. If swap space runs out, then the system begins to crawl along even slower.

Use a terminal window and issue the command "swapon" to determine the size and usage of the swap file. The default Rpios swap file size is 100MB which can be limiting depending on what is running. If you find the swap usage is close to the allocated amount, then edit /etc/dphys-swapfile and increase CONF_SWAPSIZE to something larger.

Butch
I tried doing this and it seems like you are right about the 100MB swap file size. But the swapfile is completely empty when i opened it with nano . So i just entered CONF_SWAPSIZE manually , but the size didn't change at all. I even restarted the swap file but the size remains the same.
The swap configuration file is /etc/dphys-swapfile and should not be empty. The following is the default contents of the file:

Code:

# /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 situationCONF_SWAPSIZE=100# 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=2# 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=2048
The default location for the swapfile is /var/swap and the swapon command gives current the swapfile name, location, allocation size, and usage as follows:

Code:

pi@InternetPi:~ $ swaponNAME      TYPE SIZE USED PRIO/var/swap file   2G   0B   -2pi@InternetPi:~ $
Butch

Statistics: Posted by butchkemper — Fri Jun 14, 2024 4:37 am



Viewing all articles
Browse latest Browse all 5077

Trending Articles