TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: DENNIS LEE BIEBER
from: THEO
date: 2020-01-25 22:42:00
subject: Re: Question about ever g

Dennis Lee Bieber  wrote:
>         Swap is typically only used when an application is requesting more
> memory than is physically available (that may not be the same as physically
> installed -- if you have a 4GB address range, but only 2GB of RAM, then
> only a 2GB subset of the space can be loaded at any time, the rest is
> swapped out; the MMU is responsible for tracking what addresses are
> loaded). If the system has cached pages it can free (especially pages that
> are only read-mode, not written to) it is supposed to free those cache
> pages and make them available to the application requesting memory. Dirty
> cache pages will need to be written out -- but those typically belong to
> some file, not swap.

Also, these days it's common to compress pages in RAM in preference to
swapping to storage - a RAM page is faster to decompress than fetching it
from disc.  Swapping to compressed RAM doesn't relieve memory pressure as
much as disc (since you still need the compressed pages in RAM) but it can
be a lot quicker than devices like eMMC or spinning disc.

Android, macOS, Chrome OS, and iOS all use it - in particular since swapping
on a mobile device isn't great for power and performance reasons.
You can enable it on your Pi too if you want:
https://www.cnx-software.com/2018/05/14/running-out-of-ram-in-ubuntu-enable-zra
m/

Theo

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.