Date: 5 Feb 2018 15:08:24 -0500 From: "John R. Levine" <johnl@iecc.com> To: freebsd-questions@freebsd.org Subject: Re: Swap on SSD Message-ID: <alpine.OSX.2.21.1802051507540.42615@ary.qy>
next in thread | raw e-mail | index | archive | help
In article <24BAEBB4-FAA7-47C8-A6FC-32839063666F@kreme.com>, LuKreme <kremels@kreme.com> wrote: >On Feb 5, 2018, at 09:13, Frank Leonhardt <frank2@fjl.co.uk> wrote: >> FreeBSD doesn't actually swap these days; uses demand paging. This means that blocks of RAM that are hardly ever used can get >copied to disk. This may include some stuff that's only accessed a few times a year, but would otherwise be occupying precious >RAM that would be much more useful as a disk cache. That said, FreeBSD tends not to page out except as a last resort - probably a >mistake but I can't prove it. That's right. The swap space is where it pages stuff that doesn't have a home anywhere else. A great deal of what's in memory is a copy of something on the disk, so if it's paged out, it goes back to the disk, or it's just deleted in the common case that it hasn't changed since being read in. Unless your system is trying to do something that wants a lot more R/W address space than is physically available, the system doesn't write much to the swap space. On one of my BSD cloud virtual machines I have a server process that slurps in about a gigabyte of stuff into a very large perl table, then sits there and answers queries from that table. The system swaps like crazy for a few seconds while it's loading up the table, then quiets down and reads a few pages a second from the swap as the queries come in. That's about the worst case, and only becasue I'm a cheapskate and don't want to pay for a larger VM where everything would fit in RAM. -- Regards, John Levine, johnl@iecc.com, Primary Perpetrator of "The Internet for Dummies", Please consider the environment before reading this e-mail. https://jl.ly
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.OSX.2.21.1802051507540.42615>