Changes

Linux and Your USB Flash Drive

1,104 bytes added, 19:12, 13 November 2019
/* swapiness and cache */
The following lines were added (+) and removed (-):
== swapiness and cache ==== swappiness and cache ==The kernel divides the memory on your system into a number of “zones” which are related to the address range and what NUMA node they’re associated with. You can view information about the zones in the file /proc/zoneinfo.  The kernel does attempt to reserve a certain amount of memory in each zone.  You can view the sum of the reserved memory in the file /proc/sys/vm/min_free_kbytes, but you can also view the per-zone statistics in /proc/zoneinfo.  The linux kernel tunable parameter vm.swappiness (/proc/sys/vm/swappiness) can be used to define how aggressively memory pages are swapped to disk and also impacts invocation of kswapd to attempt to reclaim memory by killing certain types of processes.  Linux moves memory pages that have not been accessed for some time to the swap space even if there is enough free memory available. By changing the percentage in /proc/sys/vm/swappiness you can control the swapping behavior.A high swappiness value means that the kernel will be more apt to unmap mapped pages.  Changing the swappiness value to a low number or zero will do the opposite.his will cause linux to drop the cache before libraries etc. are written to the swap. Linux, like Windows, doesn't do all copying in real time.  Instead, they build up a queue of write operations, and then work through the queue in the background so that the actual copy / cut / delete operation can "complete" much faster from the user's perspective of allowing them to continue working with the computer.  It is a perception thing.  Microsoft started it to trick people.  Linux developers spending too much time trying to emulate Windows which makes no sense since we the user are trying to avoid the pitfalls of Microsoft Windows.This will cause linux to drop the cache before libraries etc. are written to the swap. Linux, like Windows, doesn't do all copying in real time.  Instead, they build up a queue of write operations, and then work through the queue in the background so that the actual copy / cut / delete operation can "complete" much faster from the user's perspective of allowing them to continue working with the computer.  It is a perception thing.  Microsoft started it to trick people.  Linux developers spending too much time trying to emulate Windows which makes no sense since we the user are trying to avoid the pitfalls of Microsoft Windows.
Administrator
4,579
edits