This swap-not-emptying problem for me has existed since ages - and to touch upon your model of laptop direction - it's been the same issue with two different models of laptops.
Di you have a specific reason not to reveal make/model of this laptop? It's always been question #1 with laptops, as so many have make and/or model issues; see the wiki.
Maybe I'm just unlucky or maybe this is a genuine issue - I suspect the latter.
Nothing to do with luck, but which issue is the issue ... did you peruse that recent thread on freebsd-current that yuripv79 posted in #11?
Also, try answering Mer's most recent questions, and try Alain's script?
From earlier:
Trying not to close Chrome since I am in the middle of some work - is there any other way to diagnose the issue?
If chrome is set to save and restore its tabs, it wouldn't take 5 minutes to try closing and reopening it, recording state of swap, laundry etc before and after - given hours for swap to settle.
Also, in that screenshot in post #5, why do the chrome entries show Size 1115G (1.1TB!)? I know it's not much used, but does the system think it could be? Again, restarting chrome should be indicative.
This is what I use to sleep :
sudo acpiconf -s 3
Also - this is what is supported on the machine :
Code:
sysctl hw.acpi.supported_sleep_state
hw.acpi.supported_sleep_state: S3 S4 S5
Standard.
I suspect the same - suspend (via `acpiconf -s 3` is somehow dumping it to swap and that doesn't clear upon resumption.
Which "it" though? Try NOT suspending after clearing swap by methods above, including reboot if needed, but using it as heavily for a while. I.e. does swap ONLY grow if you've suspended?
If there are any specific commands I could try easily, please let me know.
Ok. In /boot/loader.conf:
boot_verbose="YES"
verbose_loading="YES"
In /etc/sysctl.conf:
hw.acpi.verbose=1
After booting, you'll have much more system info than you usually want, perhaps with useful clues re swap, in /var/log/messages.
After suspend / resume you will see there lots of info, perhaps including any problems related to this.
Seems like an overkill for a 512 G machine to allocate 32/64G to swap - also I'm barely using ~20 G RAM at most peak times. It's the **NOT** _clearing_ of swap that, to my untrained mind, is probably the root cause.
So seek out trained minds - that's what I'd do anyway ..
One more thing you might try:
Code:
sysctl -ad | grep swap > somefile
sysctl -a | grep swap >> somefile
Is this a FreeBSD suspend/resume issue? ?
I doubt it, but you'll have to be prepared to try things to find out
