ColinTaylor
Part of the Furniture
What is true exactly? The issue being reported was that swapping didn't take place on a GT-AX6000 with swappiness=0. Are you saying that's not the case?Tested - Found True
What is true exactly? The issue being reported was that swapping didn't take place on a GT-AX6000 with swappiness=0. Are you saying that's not the case?Tested - Found True
Not at all. My swappiness value is 72. I was noting that what Martinski said about when swapping would start was accurate.What is true exactly? The issue being reported was that swapping didn't take place on a GT-AX6000 with swappiness=0. Are you saying that's not the case?
So, missed the entire point of this thread then.If one doesn't have a swap file, it doesn't matter what the value of swappiness is..
It's a moot point then - stock firmware doesn't have a swap file, so it can be set to whatever
This is good. It means that, at least up to this point, the built-in memory management is working & handling RAM usage & memory reclamation as it should when it gets close to memory exhaustion.Still monitoring, but it never reaches 100% memory usage. Uninstalled log rotate (scribe) so maybe I can get a max out soon. I have gotten up to 96% but no swapping.
Now, *assuming* that the above has *not* been modified for your particular router model, it's rather difficult to predict the percentage of RAM usage at which swapping would be triggered (if at all) because it's not based on only the current number of free pages, but also on the current number of file-backed pages, both of which dynamically change as RAM is allocated & deallocated while the router is operating & performing its tasks.When swappiness value == 0, swapping occurs only when the combined value of file-backed pages (nr_file_pages) and free (nr_free_pages) pages is less than the "high water mark."
85 might lead to a bit too much swapping, you should consider picking a number between 40 to 65. That is assuming you care about your usb's mileage.Well I hate to admit it, but I gave up on this test. I was trying to get logging of events when the memory got constrained but couldn't. Seems as if syslog gets hung or stops posting and the router crashes and restarts.
I set my swappiness to 85, and I'm just going to run with it. When the VPN has active connections the usage goes up, and it does start swapping, but it never did with swappiness at 0
Can you clarify at what point you started experiencing the problems? The last time you posted you had been running with swappiness=0 for over a week and hadn't had any problems.Well I hate to admit it, but I gave up on this test. I was trying to get logging of events when the memory got constrained but couldn't. Seems as if syslog gets hung or stops posting and the router crashes and restarts.
You have a USB drive and addons that constantly write to it, e.g. Diversion and Scribe. Therefore it's expected that the memory usage will increase over time to ~97%.EDIT: I want to add that there does seem to be some sort of memory leak because usage grows and grows now matter what.
Yes there are lots of situations where the memory is flushed. One common one would be a process that creates a large (>500MB) temporary file on disk and then deletes it. You're running multiple addon scripts that could exhibit this sort of behaviour.Is there some type of process that can account for this memory flush ...
... I left swappiness at zero and still tracked memory usage....usage went up to 97%. I wake up th today and the memory usage is at 65%, no reboot I am able to determine (uptime still has days) and my WAN event didn't fire.
@ColinTaylor has a good point. When the router reaches ~97% RAM usage, it means that the amount of "free RAM" is roughly about 31MB (out of 1GB RAM total). At that low level, even a 100MB memory allocation request would most certainly trigger a large flush of "used RAM" which would essentially reclaim a lot of the "inactive" used memory, marking it as "free" which, in turn, may result in a significant reduction in the percentage of RAM usage.Yes there are lots of situations where the memory is flushed. One common one would be a process that creates a large (>500MB) temporary file on disk and then deletes it. You're running multiple addon scripts that could exhibit this sort of behaviour.
>> free
total used free shared buffers cached
Mem: 1018848 986556 32292 2396 174912 256680
-/+ buffers/cache: 554964 463884
Swap: 2097148 0 2097148
----------------------------
>> cat /proc/meminfo
MemTotal: 1018848 kB
MemFree: 31488 kB
MemAvailable: 413664 kB
Buffers: 174972 kB
Cached: 256720 kB
SwapCached: 0 kB
Active: 392680 kB
Inactive: 171668 kB
Active(anon): 129544 kB
Inactive(anon): 5516 kB
Active(file): 263136 kB
Inactive(file): 166152 kB
...
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!