[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q} firewall machine nmbclusters,nkmempages



today my firewall kernel panic /bsd: panic: malloc: out of space in kmem_map
anyone know about number of optimize NMBCLUSTERS,NKMEMPAGES for my firewall ?
machine have a physical 512MB memory. and kernel config below
option          NMBCLUSTERS=16384
option          NKMEMPAGES=32768
maxusers        64              # estimated number of users
i tested a real traffic pf states in my network over 30,000 (very busy firewall normal times)
now not network busy time. (defail information. vmstat, netstat after kernel panic 10 hours) 
$ vmstat -m
Memory statistics by bucket size
    Size   In Use   Free           Requests  HighWater  Couldfree
      16    35398    186             193993    1280          0
      32      255   1409              12639     640        345
      64      906    310              23931     320          0
     128      226    734              43084     160       3216
     256      345    231              12344      80         86
     512      722      6                809      40          0
    1024      178     10             501891      20          0
    2048       15     11                 75      10          9
    4096       34      4                451       5          0
    8192        8     44                407       5        364
   16384        5      0                  8       5          0
   32768        3      0                 13       5          0
Memory usage type by bucket size
    Size  Type(s)
      16  devbuf, pcb, routetbl, ifaddr, sysctl, namecache, UFS mount, proc,
          in_multi, exec, xform_data, VM swap, UVM amap, UVM aobj, USB,
          packet tags, temp
      32  devbuf, pcb, routetbl, ifaddr, vnodes, undefined, LFS segment,
          ether_multi, xform_data, VM swap, UVM amap, USB, temp
      64  devbuf, pcb, routetbl, ifaddr, namecache, UFS mount, shm, undefined,
          lockf, LFS segment, in_multi, exec, pfkey data, UVM amap, USB, NDP
     128  devbuf, routetbl, ifaddr, vnodes, UFS mount, shm, ttys, inodedep,
          UVM amap, USB, USB device, NDP
     256  devbuf, pcb, routetbl, ifaddr, sysctl, ioctlops, vnodes, UFS mount,
          VM map, proc, NFS srvsock, NFS daemon, ttys, newblk, UVM amap, USB
     512  devbuf, pcb, ifaddr, ioctlops, mount, UFS mount, UVM amap, USB device
    1024  devbuf, sysctl, namei, ioctlops, UFS mount, proc, ttys, exec, pagedep,
          UVM amap, UVM aobj, crypto data
    2048  devbuf, UFS mount, VM swap, UVM amap
    4096  devbuf, UFS mount, MSDOSFS mount, UVM amap, temp
    8192  devbuf, NFS node, namecache, UFS quota, UFS mount, ISOFS mount,
          inodedep, indirdep, UVM amap
   16384  devbuf, namecache, UFS mount, UVM amap
   32768  devbuf
Memory statistics by type                           Type  Kern
          Type InUse MemUse HighUse  Limit Requests Limit Limit Size(s)
        devbuf  1628   649K    713K 78644K     1696    0     0  16,32,64,128,256,512,1024,2048,4096,8192,16384,32768
           pcb    20     4K      5K 78644K      578    0     0  16,32,64,256,512
      routetbl   213    26K    100K 78644K    25160    0     0  16,32,64,128,256
        ifaddr   132    24K     24K 78644K      136    0     0  16,32,64,128,256,512
        sysctl     3     2K      2K 78644K        3    0     0  16,256,1024
         namei     0     0K      5K 78644K   501331    0     0  1024
      ioctlops     0     0K      1K 78644K      306    0     0  256,512,1024
         mount     7     4K      4K 78644K        9    0     0  512
      NFS node     1     8K      8K 78644K        1    0     0  8192
        vnodes    60     8K     44K 78644K     1247    0     0  32,128,256
     namecache     5    25K     25K 78644K        5    0     0  16,64,8192,16384
     UFS quota     1     8K      8K 78644K        1    0     0  8192
     UFS mount    29    78K     78K 78644K       29    0     0  16,64,128,256,512,1024,2048,4096,8192,16384
           shm     2     1K      1K 78644K        2    0     0  64,128
        VM map     4     1K      1K 78644K        4    0     0  256
     undefined     2     1K      1K 78644K        2    0     0  32,64
         lockf     1     1K      1K 78644K       41    0     0  64
          proc     5     3K      3K 78644K       34    0     0  16,256,1024
   LFS segment     0     0K      2K 78644K     5339    0     0  32,64
   NFS srvsock     2     1K      1K 78644K        2    0     0  256
    NFS daemon     1     1K      1K 78644K        1    0     0  256
      in_multi    36     2K      2K 78644K       36    0     0  16,64
   ether_multi    10     1K      1K 78644K       10    0     0  32
   ISOFS mount     1     8K      8K 78644K        1    0     0  8192
 MSDOSFS mount     1     4K      4K 78644K        1    0     0  4096
          ttys   324   189K    189K 78644K      324    0     0  128,256,1024
          exec     0     0K      2K 78644K      957    0     0  16,64,1024
    pfkey data     1     1K      1K 78644K        2    0     0  64
    xform_data     0     0K      1K 78644K       14    0     0  16,32
       pagedep     1     1K      1K 78644K        1    0     0  1024
      inodedep     1     8K     94K 78644K    38351    0     0  128,8192
        newblk     1     1K      1K 78644K        1    0     0  256
      indirdep     0     0K    352K 78644K      392    0     0  8192
       VM swap     5     3K      3K 78644K        5    0     0  16,32,2048
      UVM amap   440    46K    123K 78644K    30682    0     0  16,32,64,128,256,512,1024,2048,4096,8192,16384
      UVM aobj     2     2K      2K 78644K        2    0     0  16,1024
           USB    29     3K      3K 78644K       29    0     0  16,32,64,128,256
    USB device     8     4K      4K 78644K        8    0     0  128,512
   crypto data     1     1K      1K 78644K        1    0     0  1024
   packet tags 35065   548K    548K 78644K   182435    0     0  16
           NDP    28     2K      3K 78644K       31    0     0  64,128
          temp    25     5K      9K 78644K      435    0     0  16,32,4096
Memory Totals:  In Use    Free    Requests
                 1658K    619K      789645
Memory resource pool statistics
Name        Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
extentpl      20      188    0      156     1     0     1     1     0   inf    0
phpool        40     3161    0        0    32     0    32    32     0   inf    0
pmappl        72      816    0      801     1     0     1     1     0   inf    0
vmsppl       212      816    0      801     2     0     2     2     0   inf    1
vmmpepl       88    62521    0    62219    11     0    11    11     0   inf    4
vmmpekpl      88     5212    0     5152     2     0     2     2     0   inf    0
aobjpl        52        1    0        0     1     0     1     1     0   inf    0
amappl        40     8667    0     8526     3     0     3     3     0   inf    1
bufpl        116    34891    0    34891     1     0     1     1     0   inf    1
mbpl         256 30228509    0 30192863  2230     0  2230  2230     1   inf    2
mclpl       2048 27478753    0 27478176   611     0   611   611     4  8192  321
sockpl       200      573    0      558     1     0     1     1     0   inf    0
scxspl       128   227095    0   227095     1     0     1     1     0   inf    1
wdcspl        96        8    0        8     1     0     1     1     0   inf    1
procpl       316      824    0      801     3     0     3     3     0   inf    1
zombiepl      72      801    0      801     1     0     1     1     0   inf    1
ucredpl       80      560    0      555     1     0     1     1     0   inf    0
pgrppl        24      486    0      472     1     0     1     1     0   inf    0
sessionpl     48       77    0       64     1     0     1     1     0   inf    0
pcredpl       24      824    0      801     1     0     1     1     0   inf    0
filepl        48   189768    0   189717     1     0     1     1     0   inf    0
fdescpl      320      825    0      801     3     0     3     3     0   inf    1
pipepl        76      320    0      318     1     0     1     1     0   inf    0
vnodes       160     4083    0        0   164     0   164   164     0   inf    0
nchpl         64     2398    0        0    39     0    39    39     0   inf    0
ffsino       280   284131    0   280059   292     0   292   292     0   inf    0
pagedeppl     64    18830    0    18830    18     0    18    18     0   inf   18
inodedeppl    84   134549    0   134549   379     0   379   379     0   inf  379
newblkpl      32   112766    0   112766     1     0     1     1     0   inf    1
bmsafemappl   32      577    0      577     1     0     1     1     0   inf    1
allocdirectpl 60   101253    0   101253    76     0    76    76     0   inf   76
indirdeppl    28      534    0      534     1     0     1     1     0   inf    1
allocindirpl  52    11513    0    11513    25     0    25    25     0   inf   25
freefragpl    32     7101    0     7101     3     0     3     3     0   inf    3
freeblkspl   108    67788    0    67788   260     0   260   260     0   inf  260
freefilepl    28    69669    0    69669    65     0    65    65     0   inf   65
diraddpl      32    68884    0    68884    37     0    37    37     0   inf   37
mkdirpl       28    17308    0    17308     8     0     8     8     0   inf    8
dirrempl      32    71263    0    71263    78     0    78    78     0   inf   78
pftrpl        60    61932    0    61664    11     0    11    11     0   inf    4
pfrulepl     484      225    0      151    19     0    19    19     0   inf    8
pfstatepl    144    30966    0    30832    13     0    13    13     0   358    5
pffrent       16  2331042    0  2331042     3     0     3     3     0    20    3
pffrag        48  1154436    0  1154436     6     0     6     6     0    12    6
ipqepl        20        1    0        1     1     0     1     1     0   inf    1
tcpcbpl      344       35    0       28     1     0     1     1     0   inf    0
sigapl       308      816    0      801     2     0     2     2     0   inf    0
plimitpl     152       77    0       69     1     0     1     1     0   inf    0
In use 12231K, total allocated 17660K; utilization 69.3%
$ netstat -m
35581 mbufs in use:
        577 mbufs allocated to data
        35002 mbufs allocated to packet headers
        2 mbufs allocated to socket names and addresses
576/1222 mapped pages in use
11348 Kbytes allocated to network (88% in use)
0 requests for memory denied
0 requests for memory delayed
0 calls to protocol drain routines
thanks
-Jung