time -v
...
Technical reasons for why this works are, irrelevant.
...
All the technical reasons parroted so far, for not using it, are just so much 'blah, blah, blah', from my perspective.
...
@Martinski, your assumptions are also incorrect about all the important points in your post above.
This isn't a hard concept to understand. I'm not disparaging anyone, I'm not being snarky. In unknown circumstances, the larger swap file allows the router to function as expected.
Nothing more, nothing less.
Yes, I'm not a programmer. But I can understand that the expected output may change by a smaller/larger swap file. Empirically. That also indicates to me that the programs/scripts and their interactions are not as fully understood as is being assumed here.
The definitions of a swap file, I'm not arguing. They just don't apply to what I'm saying. I'm sorry it is so hard to convey a simple idea to this group lately. But you may also try to understand me better, rather than just assume the worst (as your post above shows) about me and my skill set.
That was fascinating. Not so much the article you linked to, but the Red Hat article it linked to. It suggests that a larger swap file extends the time that a system is unresponsive before the OOM process kicks in to restore responsiveness, and recommends a swap file that is a fraction of physical memory. (I know they are not talking about little embedded devices here.)Take a read at this:
It also suggest that there is no real finite awnser since everyone(other meaning linux distros) has their own take on the matter. For example, "If you go by Red Hat’s suggestion, they recommend a swap size of 20% of RAM for modern systems."That was fascinating. Not so much the article you linked to, but the Red Hat article it linked to. It suggests that a larger swap file extends the time that a system is unresponsive before the OOM process kicks in to restore responsiveness, and recommends a swap file that is a fraction of physical memory. (I know they are not talking about little embedded devices here.)
Since I never want the router to be unresponsive just because a blocking list is being updated, this suggests some swap file may be desirable, but too much swap is undesirable.
Here is CentOS , which I find more reasonable.That was fascinating. Not so much the article you linked to, but the Red Hat article it linked to. It suggests that a larger swap file extends the time that a system is unresponsive before the OOM process kicks in to restore responsiveness, and recommends a swap file that is a fraction of physical memory. (I know they are not talking about little embedded devices here.)
Since I never want the router to be unresponsive just because a blocking list is being updated, this suggests some swap file may be desirable, but too much swap is undesirable.
Yes, a more typical example and the specific example Red Hat was suggesting was a bad idea. Competitive instincts kicking in!Here is CentOS , which I find more reasonable.
So, I opened diversion and edited the whitelist file to add one entry, at a time when I had 50 mb of free space. That triggered a swap usage of 170kB. My swap file is 500mb and physical memory is 1GB. Then I processed an update to the blocking list (151,000 entries), which immediately increased my free space to 457mb and no swap usage.
Swapping in the first instance and not in the second surprised me.
The biggest problem with encouraging more swapping comes from this statement.Yes, a more typical example and the specific example Red Hat was suggesting was a bad idea. Competitive instincts kicking in!
Math is tough. I have exactly 1GB, so I am caught between a minimum of 1GB and a minimum of the square root of 1GB. While calculating that puts me to sleep, fortunately the router never sleeps.Lastly, Ubuntu which takes into consideration of hibernating operating systems:
Yeaaa, those people at Ubuntu land have always been trying to figure that one out.Math is tough. I have exactly 1GB, so I am caught between a minimum of 1GB and a minimum of the square root of 1GB. While calculating that puts me to sleep, fortunately the router never sleeps.
The square root of 4GB is not 2GB.
Per some of the forum scholars , the recommended SWAP math for 1GB of ram isYes, a more typical example and the specific example Red Hat was suggesting was a bad idea. Competitive instincts kicking in!
SWAP=(RAM+RAM)×5
(SSD is recommended.)(1+1)×5=10
.RAM x 20 = 10GB
.I support this statement. Even with AMTM, ENTWARE and NGINX webserver, I still have not even touched my "10GB" swap. Note I am also running resource hungry transmission, but I limit how many connections. However, none of the other user scripts are being ran on this platform.If you don't install any addon scripts (e.g. skynet, diversion, etc.) then there is no point in having a swap file as there would be nothing running on the router that would require it.
RT-AX88U:/tmp/home/root# free
total used free shared buffers cached
Mem: 903544 466876 436668 4696 16464 92832
-/+ buffers/cache: 357580 545964
Swap: 10485756 0 10485756
I still have not even touched my "10GB" swap.
Indeed. I never managed to force swap use either. I would like to see an example/screen shot of... let's say 1GB swap used on an Asus router. Come on folks, give me something to play with on AX86U.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!