From owner-freebsd-stable@freebsd.org Tue Sep 22 16:19:48 2020 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1281A3EE5DD for ; Tue, 22 Sep 2020 16:19:48 +0000 (UTC) (envelope-from pmc@citylink.dinoex.sub.org) Received: from uucp.dinoex.sub.de (uucp.dinoex.sub.de [IPv6:2001:1440:5001:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "uucp.dinoex.sub.de", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bwmjb2bQXz4GB8 for ; Tue, 22 Sep 2020 16:19:46 +0000 (UTC) (envelope-from pmc@citylink.dinoex.sub.org) Received: from uucp.dinoex.sub.de (uucp.dinoex.org [185.220.148.12]) by uucp.dinoex.org (8.16.0.50/8.16.0.45) with ESMTPS id 08MGJElt047404 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 22 Sep 2020 18:19:15 +0200 (CEST) (envelope-from pmc@citylink.dinoex.sub.org) X-MDaemon-Deliver-To: X-Authentication-Warning: uucp.dinoex.sub.de: Host uucp.dinoex.org [185.220.148.12] claimed to be uucp.dinoex.sub.de Received: (from uucp@localhost) by uucp.dinoex.sub.de (8.16.0.50/8.16.0.45/Submit) with UUCP id 08MGJEaf047403 for freebsd-stable@freebsd.org; Tue, 22 Sep 2020 18:19:14 +0200 (CEST) (envelope-from pmc@citylink.dinoex.sub.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by citylink.dinoex.sub.de (8.15.2/8.15.2) with ESMTP id 08MGI4A4022696 for ; Tue, 22 Sep 2020 18:18:04 +0200 (CEST) (envelope-from peter@gate.oper.dinoex.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by gate.oper.dinoex.org (8.15.2/8.15.2) with ESMTP id 08MGI0og022670 for ; Tue, 22 Sep 2020 18:18:00 +0200 (CEST) (envelope-from peter@gate.oper.dinoex.org) Received: (from peter@localhost) by gate.oper.dinoex.org (8.15.2/8.15.2/Submit) id 08MGI0KE022664 for freebsd-stable@freebsd.org; Tue, 22 Sep 2020 18:18:00 +0200 (CEST) (envelope-from peter) To: freebsd-stable@freebsd.org Sender: li-fbsd@citylink.dinoex.sub.org Date: Tue, 22 Sep 2020 18:08:01 +0200 From: Peter Subject: How to free used Swap-Space? Message-ID: <20200922160801.GA19535@gate.oper.dinoex.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Milter: Spamilter (Reciever: uucp.dinoex.sub.de; Sender-ip: 185.220.148.12; Sender-helo: uucp.dinoex.sub.de; ) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (uucp.dinoex.org [185.220.148.12]); Tue, 22 Sep 2020 18:19:17 +0200 (CEST) X-Rspamd-Queue-Id: 4Bwmjb2bQXz4GB8 X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of pmc@citylink.dinoex.sub.org has no SPF policy when checking 2001:1440:5001:1::2) smtp.mailfrom=pmc@citylink.dinoex.sub.org X-Spamd-Result: default: False [2.24 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.13)[-0.125]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.45)[0.450]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_LONG(0.02)[0.017]; DMARC_NA(0.00)[sub.org]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8469, ipnet:2001:1440::/32, country:DE]; SUBJECT_ENDS_QUESTION(1.00)[]; MAILMAN_DEST(0.00)[freebsd-stable] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 16:19:48 -0000 Hi all, my machine should use about 3-4, maybe 5 GB swapspace. Today I found it suddenly uses 8 GB (which is worryingly near the configured 10G). I stopped all the big suckers - nothing found. I stopped all the jails - no success. I brought it down to singleuser: it tried to swapoff, but failed. I unmounted all filesystems, exported all pools, detached all geli, and removed most of the netgraphs. Swap is still occupied. Machine is now running only the init and a shell processes, has almost no filesystems mounted, has mostly native networks only, and this still occupies 3 GB of swap which cannot be released. What is going on, what is doing this, and how can I get this swapspace released?? It is 11.4-RELEASE-p3 amd64. Script started on Mon Sep 21 05:43:20 2020 root@edge# ps axlww UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 0 0 0 -16 0 0 752 swapin DLs - 291:32.41 [kernel] 0 1 0 0 20 0 5416 248 wait ILs - 0:00.22 /sbin/init -- 0 2 0 0 -16 0 0 16 ftcl DL - 0:00.00 [ftcleanup] 0 3 0 0 -16 0 0 16 crypto_w DL - 0:00.00 [crypto] 0 4 0 0 -16 0 0 16 crypto_r DL - 0:00.00 [crypto returns] 0 5 0 0 -16 0 0 32 - DL - 11:41.94 [cam] 0 6 0 0 -8 0 0 80 t->zthr_ DL - 13:07.13 [zfskern] 0 7 0 0 -16 0 0 16 waiting_ DL - 0:00.00 [sctp_iterator] 0 8 0 0 -16 0 0 16 - DL - 2:05.20 [rand_harvestq] 0 9 0 0 -16 0 0 16 - DL - 0:00.04 [soaiod1] 0 10 0 0 155 0 0 64 - RNL - 17115:06.48 [idle] 0 11 0 0 -52 0 0 352 - WL - 49:05.30 [intr] 0 12 0 0 -16 0 0 64 sleep DL - 16:28.51 [ng_queue] 0 13 0 0 -8 0 0 48 - DL - 23:10.60 [geom] 0 14 0 0 -16 0 0 16 seqstate DL - 0:00.00 [sequencer 00] 0 15 0 0 -68 0 0 160 - DL - 0:23.64 [usb] 0 16 0 0 -16 0 0 16 - DL - 0:00.04 [soaiod2] 0 17 0 0 -16 0 0 16 - DL - 0:00.04 [soaiod3] 0 18 0 0 -16 0 0 16 - DL - 0:00.04 [soaiod4] 0 19 0 0 -16 0 0 16 idle DL - 0:00.83 [enc_daemon0] 0 20 0 0 -16 0 0 48 psleep DL - 12:07.72 [pagedaemon] 0 21 0 0 20 0 0 16 psleep DL - 4:12.41 [vmdaemon] 0 22 0 0 155 0 0 16 pgzero DNL - 0:00.00 [pagezero] 0 23 0 0 -16 0 0 64 psleep DL - 0:23.50 [bufdaemon] 0 24 0 0 20 0 0 16 - DL - 0:04.21 [bufspacedaemon] 0 25 0 0 16 0 0 16 syncer DL - 0:32.48 [syncer] 0 26 0 0 -16 0 0 16 vlruwt DL - 0:02.31 [vnlru] 0 27 0 0 -16 0 0 16 - DL - 7:11.58 [racctd] 0 157 0 0 20 0 0 16 geli:w DL - 0:22.03 [g_eli[0] ada1p2] 0 158 0 0 20 0 0 16 geli:w DL - 0:22.77 [g_eli[1] ada1p2] 0 159 0 0 20 0 0 16 geli:w DL - 0:31.08 [g_eli[2] ada1p2] 0 160 0 0 20 0 0 16 geli:w DL - 0:29.41 [g_eli[3] ada1p2] 0 70865 1 0 20 0 7076 3104 wait Ss v0 0:00.21 -sh (sh) 0 71135 70865 0 20 0 6392 2308 select S+ v0 0:00.00 script 0 71136 71135 0 23 0 7076 3068 wait Ss 0 0:00.00 /bin/sh -i 0 71142 71136 0 23 0 6928 2584 - R+ 0 0:00.00 ps axlww root@edge# df Filesystem 512-blocks Used Avail Capacity Mounted on /dev/ada3p3 1936568 860864 920784 48% / devfs 2 2 0 100% /dev procfs 8 8 0 100% /proc /dev/ada3p4 3099192 1184896 1666368 42% /usr /dev/ada3p5 580344 8112 525808 2% /var root@edge# pstat -s Device 512-blocks Used Avail Capacity /dev/ada1p2.eli 10485760 5839232 4646528 56% root@edge# top | cat last pid: 71147; load averages: 0.19, 0.08, 0.09 up 3+03:21:00 05:44:12 5 processes: 1 running, 4 sleeping Mem: 9732K Active, 10M Inact, 882M Laundry, 1920M Wired, 10M Buf, 1023M Free ARC: 335K Total, 16K MFU, 304K MRU, 15K Header 320K Compressed, 2944K Uncompressed, 9.20:1 Ratio Swap: 5120M Total, 2851M Used, 2269M Free, 55% Inuse PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 70865 root 1 20 0 7076K 3104K wait 2 0:00 0.00% sh 71135 root 1 20 0 6392K 2308K select 1 0:00 0.00% script 71136 root 1 20 0 7076K 3068K wait 2 0:00 0.00% sh 71146 root 1 20 0 7928K 2980K CPU0 0 0:00 0.00% top 71147 root 1 20 0 6300K 2088K piperd 1 0:00 0.00% cat