RPI4 (4Gb) running 13.1, no humungous tasks running on it, just a small
mail, web and file- server for the family.
But the swap is all eaten up, and there seem to be no swapped processes
to account:
root@kirk:~ # uptime
9:02AM up 20 days, 21:21, 2 users, load averages: 1.17, 0.87, 0.51
root@kirk:~ # swapinfo -h
Device Size Used Avail Capacity
/dev/da0s2b 2.0G 1.7G 267M 87%
root@kirk:~ # ps axwju | grep W
root 12 0 0 0 0 WL - 196:45.89 [intr]
23.9 0.0 0 368 14Jul22
root 19009 18964 19008 53800 2 S+ 2 0:00.01 grep W
0.0 0.0 12672 1900 09:01
It completely ran out of swap last night, so I'll reboot. But what's
chewing it all up? I've had much the same system running on i386 for
years without seeing this problem.
Mike Scott <usenet.16@scottsonline.org.uk.invalid> wrote:
Does top have anything interesting to say?
RPI4 (4Gb) running 13.1, no humungous tasks running on it, just a small
mail, web and file- server for the family.
But the swap is all eaten up, and there seem to be no swapped processes
to account:
root@kirk:~ # uptime
9:02AM up 20 days, 21:21, 2 users, load averages: 1.17, 0.87, 0.51
root@kirk:~ # swapinfo -h
Device Size Used Avail Capacity
/dev/da0s2b 2.0G 1.7G 267M 87%
root@kirk:~ # ps axwju | grep W
root 12 0 0 0 0 WL - 196:45.89 [intr]
23.9 0.0 0 368 14Jul22
root 19009 18964 19008 53800 2 S+ 2 0:00.01 grep W
0.0 0.0 12672 1900 09:01
It completely ran out of swap last night, so I'll reboot. But what's
chewing it all up? I've had much the same system running on i386 for
years without seeing this problem.
This question might be worth putting on the freebsd-arm mailing list: https://lists.freebsd.org/subscription/freebsd-arm
I read the list and don't recall seeing anything similar, nor have
I experienced anything similar on a 13.1 Pi3 or -current Pi4.
HTH,
bob prohaska
On 07/08/2022 21:17, bob prohaska wrote:
Mike Scott <usenet.16@scottsonline.org.uk.invalid> wrote:
Does top have anything interesting to say?
RPI4 (4Gb) running 13.1, no humungous tasks running on it, just a small
mail, web and file- server for the family.
But the swap is all eaten up, and there seem to be no swapped processes
to account:
root@kirk:~ # uptime
9:02AM up 20 days, 21:21, 2 users, load averages: 1.17, 0.87, 0.51
root@kirk:~ # swapinfo -h
Device Size Used Avail Capacity
/dev/da0s2b 2.0G 1.7G 267M 87%
root@kirk:~ # ps axwju | grep W
root 12 0 0 0 0 WL - 196:45.89 [intr]
23.9 0.0 0 368 14Jul22
root 19009 18964 19008 53800 2 S+ 2 0:00.01 grep W
0.0 0.0 12672 1900 09:01
It completely ran out of swap last night, so I'll reboot. But what's
chewing it all up? I've had much the same system running on i386 for
years without seeing this problem.
This question might be worth putting on the freebsd-arm mailing list:
https://lists.freebsd.org/subscription/freebsd-arm
I read the list and don't recall seeing anything similar, nor have
I experienced anything similar on a 13.1 Pi3 or -current Pi4.
HTH,
bob prohaska
Thanks for the comment. I'm wary about the discussion lists: too much is
over my head, but I'll take a look, thanks.
I've just this moment experimented a bit. After posting the above, the system's been running for a few days.
top says:
last pid: 74530; load averages: 1.21, 1.14, 0.80 up 3+23:34:36
08:41:25
108 processes: 2 running, 106 sleeping
CPU: 0.4% user, 0.0% nice, 0.3% system, 0.1% interrupt, 99.3% idle
Mem: 138M Active, 1052M Inact, 1278M Laundry, 580M Wired, 260M Buf, 809M
Free
Swap: 2048M Total, 179M Used, 1869M Free, 8% Inuse
I just did swapoff -a (took a few seconds) and top said:
last pid: 74538; load averages: 0.71, 1.03, 0.78 up 3+23:35:25
08:42:14
97 processes: 1 running, 96 sleeping
CPU: 0.4% user, 0.0% nice, 0.3% system, 0.1% interrupt, 99.3% idle
Mem: 128M Active, 679M Inact, 1447M Laundry, 490M Wired, 171M Buf, 1114M
Free
I've never known what "Laundry" might be :-{, but I would observe that
swap usage went from 179M to none, while Laundry increased by /roughly/
the same amount. Also, the number of "sleeping" process dropped a lot.
(Although as the system's been running a dump script while doing this, I can't be sure about the figures)
The swap usage just seems to increase monotonically with time. If
there's enough memory, a swapoff/swapon fixes it for a while. If the
swap gets too full, it's can't all be brought into main memory, so the swapoff won't work. It's not a truly busy machine - 4Gb memory should be
way more than it needs for operation (used to all run with just 1Gb
(i386) a couple of years ago without issue).
I'm tempted to run swapoff/swapon overnight, but then I'd never find
what was wrong :-}
If you've found a memory leak it'll be of interest to the developers.
Almost certainly you'll be asked for the output of uname -a and a
description of the storage hardware and the software running.
Top reports (at least on my machines) SIZE and RES. I think size is the
total memory used by a process and RES is how much is actually resident
in phyiscal RAM, with the difference being (I think) in swap. Those values >might bear watching.
In article <tcrvmj$11jmd$1@dont-email.me>,
bob prohaska <bp@www.zefox.net> wrote:
If you've found a memory leak it'll be of interest to the developers.
Almost certainly you'll be asked for the output of uname -a and a
description of the storage hardware and the software running.
Is the OP using tmpfs?
# mount -t tmpfs
valuesTop reports (at least on my machines) SIZE and RES. I think size is thetotal memory used by a process and RES is how much is actually resident
in phyiscal RAM, with the difference being (I think) in swap. Those
might bear watching.....>
I think top(1) output would be useful when swapinfo(8) is reporting
high usage.
# top -d 1 -o res -w
Presumably there's something big (not necessarily jailed) that runs that forces other processes into swap before it exits, but if that's the
case, everything left ought to fit into main memory, which it clearly
doesn't as swap usage just goes monotonically upwards to the point where swapoff can't work.
Mike Scott <usenet.16@scottsonline.org.uk.invalid> wrote:
Presumably there's something big (not necessarily jailed) that runs thatAre you using a custom kernel, perchance?
forces other processes into swap before it exits, but if that's the
case, everything left ought to fit into main memory, which it clearly
doesn't as swap usage just goes monotonically upwards to the point where
swapoff can't work.
[risking carrying coals to Newcastle]
Here's a script prepared with the help of Mark Millard which was used to investigate problems during self-hosting on Pi2 and Pi3 systems. It'll
have to be hacked to look at what you want, but might be a starting point.
On 11/08/2022 02:31, bob prohaska wrote:
Are you using a custom kernel, perchance?
Thanks for comments. No. Can't face the thought of building one on the
Pi :-| Works fine as is though.
[risking carrying coals to Newcastle]
Seems to have been left off :(
However, here's my offering give or take line wrap:
#!/bin/sh
LOG="/var/tmp/swap.topinfo"
DELAY=60
echo >>$LOG
echo "starting...." >>$LOG
lastswap="XXXX"
while true ; do
swap=`swapinfo -h | grep /dev | awk '{print $3}'`
if [ "$swap" != "$lastswap" ] ; then
echo "==================" >>$LOG
echo -n `date +"%Y-%m-%dT%H:%M:%S "` >>$LOG
swapinfo -h | grep /dev >>$LOG
top -wS 10000 >>$LOG # make terminal wide enough!!!!!!!! truncates if not
echo >>$LOG
ps axwwud >>$LOG
echo >>$LOG
lastswap="$swap"
fi
sleep $DELAY
done
I had it running last night - or rather managed to accidentally run 2
copies using the same log file -- and top had truncated the last column anyway. Very muddly - but it's nevertheless clear that /everything/ is
listed as 0B in the swap used column, even when swapinfo shows the space rocketed to >400Mb used (later dropped to 190Mb). Nothing obvious amiss otherwise.
Hi all, a bit of a conundrum; maybe I'm missing something.
RPI4 (4Gb) running 13.1, no humungous tasks running on it, just a small
mail, web and file- server for the family.
But the swap is all eaten up, and there seem to be no swapped processes
to account:
root@kirk:~ # uptime
9:02AM up 20 days, 21:21, 2 users, load averages: 1.17, 0.87, 0.51
root@kirk:~ # swapinfo -h
Device Size Used Avail Capacity
/dev/da0s2b 2.0G 1.7G 267M 87%
root@kirk:~ # ps axwju | grep W
root 12 0 0 0 0 WL - 196:45.89 [intr]
23.9 0.0 0 368 14Jul22
root 19009 18964 19008 53800 2 S+ 2 0:00.01 grep W
0.0 0.0 12672 1900 09:01
It completely ran out of swap last night, so I'll reboot. But what's
chewing it all up? I've had much the same system running on i386 for
years without seeing this problem.
TIA.
Thanks for comments. No. Can't face the thought of building one on the
Pi :-| Works fine as is though.
Seems to have been left off :(
In article <td2g5g$24nfl$1@dont-email.me>,
Mike Scott <usenet.16@scottsonline.org.uk.invalid> wrote:
Thanks for comments. No. Can't face the thought of building one on the
Pi :-| Works fine as is though.
Ok, have you updated to p1 as advised? <URL:https://www.freebsd.org/security/advisories/FreeBSD-SA-22:11.vm.asc>
Seems to have been left off :(
You have left off the full output of ps and top when your swapinfo
usage exceeds your preferred maximum.
John
groenveld@acm.org
Den 2022-08-04 skrev Mike Scott <usenet.16@scottsonline.org.uk.invalid>:.....
Hi all, a bit of a conundrum; maybe I'm missing something.
RPI4 (4Gb) running 13.1, no humungous tasks running on it, just a small
mail, web and file- server for the family.
But the swap is all eaten up, and there seem to be no swapped processes
to account:
If you aren't seeing processes in top eating more and more memory, you
could try having a look at vmstat -m which will show how the kernel
has allocated heap memory. It could be something in the kernel being
the culprit.
TIA.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 399 |
Nodes: | 16 (2 / 14) |
Uptime: | 64:27:10 |
Calls: | 8,354 |
Calls today: | 14 |
Files: | 13,159 |
Messages: | 5,893,803 |
Posted today: | 1 |