What's new

SWAP file not in use

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

bartimeaus

Occasional Visitor
On an AX88U right now. Currently I've got diversion running with the large list and Im noticing the free ram is under 200mb yet my swap file of 2gb seems to be completely free. Is there a reason why the swap file is not in use?
 
On an AX88U right now. Currently I've got diversion running with the large list and Im noticing the free ram is under 200mb yet my swap file of 2gb seems to be completely free. Is there a reason why the swap file is not in use?
Because you have free RAM. Even if you didn't have "free" RAM it doesn't necessarily mean swap space needs to be used.
 
Another reason why you don't need a large swap file or partition. 512M or 1G is more than enough!
 
Swap 2GB is recommended only to prevent an error message in Skynet.

 
Swap 2GB is recommended only to prevent an error message in Skynet.

yea, skynet wont perform properly with out that 2GB swap.
 
It checks for specific swap size presence, but in my experience never uses it. Perhaps very small portion during large blocklists update on 256/512MB RAM router models. Another interesting observation is 256MB RAM AC68U has about about the same RAM left after boot as 512MB RAM AC86U. The firmware on HND models takes more RAM. As a result both routers can run about the same custom scripts before they need any swap.
 
It checks for specific swap size presence, but in my experience never uses it.
In one very specific place, if a shared whitelist that needs to be processed is more than 150 lines, it also checks the swap size. If it is under 1G, or under 2G while DNS caching is active, it processes the list in 150 line chunks. That is not to say that in either case it uses the swap.

I wonder who had a 150 line whitelist.
 
It checks for specific swap size presence, but in my experience never uses it.
According to my RTRMON stats, only a very small percentage is in use at all times... But like you said, it's EXTREMELY rare if this number ever budges.

1665412524429.png
 
I'm not a software guy and never checked the code, but I've seen "cannot fork" error and remember searching for information what's going on. Then I found Skynet wants 2GB swap as some sort of workaround and the error indeed disappeared. I would say 2GB is needed, but not for swapping.
 
But like you said, it's EXTREMELY rare if this number ever budges.
A slightly different thing. Once something is paged out to the swap, I think it stays there, maybe until the program to which it is allocated terminates.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top