From owner-freebsd-questions Thu Nov 1 18:20:21 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.eimg.com.tw (mail.eimg.com.tw [211.22.11.115]) by hub.freebsd.org (Postfix) with ESMTP id 2A93437B401 for ; Thu, 1 Nov 2001 18:20:15 -0800 (PST) Received: by mail.eimg.com.tw (Postfix, from userid 1055) id 3C578DEDB5; Fri, 2 Nov 2001 10:21:13 +0800 (CST) Date: Fri, 2 Nov 2001 10:21:12 +0800 From: Justin Chuang To: freebsd-questions@freebsd.org Cc: mcl@skysoft.com.tw Subject: hang with low inact mem and thousands of processes Message-ID: <20011102102112.A70575@mail.eimg.com.tw> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, My FreeBSD box usually hangs when the InAct mem drops below 100Mb. It is a SMP box which has 2.5 G of physical memory, there are about 6000 processes running. It happens when the number of processes is high, and *suddenly* the box stop responding at all. I can ping it, but I can't get any response as I type something on the console or remote login. However, I can break to debugger on serial console and call cpu_reset. The problem happened before when it had 1G or 2G of RAM and fewer processes running on FreeBSD 3.x and 4.x. I found that I could solve this problem by adding more RAM until the memory is not enough again. I'm not sure if it use any swap. However, even if it does use some swap, it won't use a lot of it. (maybe a few megabytes) $ swapinfo Device 1K-blocks Used Avail Capacity Type /dev/da0s1b 1048448 0 1048448 0% Interleaved Backtrace when it hangs: siointr1(8676c000,802e8048,806a000,ac82cf14,8024a150) at siointr1+0xb5 siointr(8676c000) at siointr+0x17 Xfastintr4(b7b9766c,806a000) at Xfastintr4+0x20 pmap_ts_referenced(82e04448,b8157150,ba345400,0,1) at pmap_ts_referenced+0x98 vm_pageout_object_deactivate_pages(ba345400,b56a3660,0,0) at vm_pageout_object_d eactivate_pages+0xd8 vm_pageout_map_deactivate_pages(ba345400,0) at vm_pageout_map_deactivate_pages+0 x8b vm_daemon(0) at vm_daemon+0xa5 fork_trampoline() at fork_trampoline+0x30 $ cat /etc/sysctl.conf vm.defer_swapspace_pageouts=1 vm.v_free_min=24807 vm.v_free_reserved=9235 vm.v_free_target=50000 vfs.vmiodirenable=1 kern.ipc.shm_use_phys=1 related Kernel config: maxusers 425 options P1003_1B #Posix P1003_1B real-time extensions options _KPOSIX_PRIORITY_SCHEDULING options PMAP_SHPGPERPROC=300 options MSGBUF_SIZE=81920 options NMBCLUSTERS=12288 As a final note, the thousands of processes share a large portion of shm (8 Mb), and they wake up every 10-300 seconds (select(2) timeout). This problem bothered me over 1 years, I'm grateful to anyone who could give me some advices. Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message