Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Nov 2001 10:21:12 +0800
From:      Justin Chuang <justin_ml@skysoft.com.tw>
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>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011102102112.A70575>