Subj : Re: Installing Debian To : Avon From : Zip Date : Sun Sep 20 2020 11:48:54 Hello Avon! On 20 Sep 2020, Avon said the following... Av> Isn't swap meant to be something like half your onboard ram? So if I Av> have 8 gig I make a 4 gig swap partition? Or is that too much, or does Av> it depend on what stuff I am running say a NNTP server on top of BBS Av> stuff? I just read up on this on https://wiki.debian.org/Swap and it appears they "recommend" 1.5 times the amount of RAM. It depends on the workload and its memory usage patterns, but it can be good to have some clearance. The installer usually suggests something. Speaking of this, there are heuristics in the memory management which by default appears to result in a rather "random" random way of deciding if processes will get the memory that they ask for when memory pressure gets high (for some definition of high). One can tune this to let it always grant all memory requests from applications (always overcommit) and kill them off should the need *really* arise, or never allow more memory than what is available be handed out (never overcommit). This leads to a more deterministic memory allocation scenario for applications. See https://engineering.pivotal.io/post/virtual_memory_settings_in_linux_-_the_prob lem_with_overcommit/ for more information on this. Also see https://unix.stackexchange.com/a/294651 as to why one might NOT want to set vm.overcommit_ratio = 100. On my box (which by the way has a swap file that equals the amount of RAM), I have added an /etc/sysctl.d/local.conf file with the following: # how aggressively the kernel will swap memory pages # (lower values decrease aggressiveness) # (a value of 0 instructs the kernel not to initiate swap until the amount of # free and file-backed pages is less than the high water mark in a zone) vm.swappiness = 0 # virtual memory accounting mode # (always check, never overcommit) vm.overcommit_memory = 2 # a percentage by which memory can be overcommitted # (for vm.overcommit_memory = 2: maximum % of physical RAM to be allocated to # applications) vm.overcommit_ratio = 75 So it will refrain from using swap as much as possible, never grant memory allocation requests that it cannot fulfil (using RAM + swap), and use 75% of the RAM for applications, 25% for kernel stuff. Best regards Zip --- Mystic BBS v1.12 A47 2020/09/12 (Linux/64) * Origin: Star Collision BBS, Uppsala, Sweden (21:1/202) .