On 11/14/2017 08:41 AM, Bike dernikov1 wrote: > On Mon, Nov 13, 2017 at 4:36 PM, Alex Rousskov wrote: >> On 11/13/2017 02:34 AM, Bike dernikov1 wrote: >>> Swap could be used to translate back data to mem if used, but it >>> stays on disk and purge after some time if not used ? >> The purging bit is wrong. Think of swap as very very very slow RAM. > So, when squid need something from swap, it will load that data back to ram. In this context, swap is an OS-level concept. Squid does not know that the OS memory manager has swapped some of Squid data from RAM to disk. OS does not know what swapped out data means to Squid. When Squid tries to access data at a swapped out address, the OS blocks the Squid process and loads the missing data from disk into RAM (usually after swapping out some RAM bytes to free RAM space for those requested bytes). Here, "data" essentially means any sequence of bytes allocated by Squid. For example, some of those swapped out bytes may have nothing to do with Squid memory cache. Swapped out bytes can even be Squid binary code. > For purge, data then stay in swap forever ? Swapped out process data stays swapped out until it is either accessed by the process (and is swapped in by the OS) or the process terminates (without accessing those swapped out bytes). The latter is unlikely for Squid data unless the Squid process dies prematurely (i.e., without doing internal cleanup). HTH, Alex. _______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx http://lists.squid-cache.org/listinfo/squid-users