Port-i386 archive

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

Max VM process usage



I'm running Roaring Penguin's CanIt-PRO on a NetBSD/i386 5.0.2 machine (although it isn't a supported platform) which has 2 GB of RAM and 5GB of swap space. One of it's processes frequently exits unexpectedly. ktrace has revealed the probable cause:

  3716      1 perl     CALL  break(0x1e910000)
  3716      1 perl     RET   break -1 errno 12 Cannot allocate memory

and the developers have asked "what is the maximum virtual memory size of a process on NetBSD on your architecture?" Would the correct answer be "there is no limit" based on the following sysctl output, or am I looking in the wrong place?

# /sbin/sysctl proc.curproc
proc.curproc.corename = %n.core
proc.curproc.rlimit.cputime.soft = unlimited
proc.curproc.rlimit.cputime.hard = unlimited
proc.curproc.rlimit.filesize.soft = unlimited
proc.curproc.rlimit.filesize.hard = unlimited
proc.curproc.rlimit.datasize.soft = 268435456
proc.curproc.rlimit.datasize.hard = 3221225472
proc.curproc.rlimit.stacksize.soft = 2097152
proc.curproc.rlimit.stacksize.hard = 67108864
proc.curproc.rlimit.coredumpsize.soft = unlimited
proc.curproc.rlimit.coredumpsize.hard = unlimited
proc.curproc.rlimit.memoryuse.soft = 2094112768
proc.curproc.rlimit.memoryuse.hard = 2094112768
proc.curproc.rlimit.memorylocked.soft = 698037589
proc.curproc.rlimit.memorylocked.hard = 2094112768
proc.curproc.rlimit.maxproc.soft = 160
proc.curproc.rlimit.maxproc.hard = 1044
proc.curproc.rlimit.descriptors.soft = 128
proc.curproc.rlimit.descriptors.hard = 3404
proc.curproc.rlimit.sbsize.soft = unlimited
proc.curproc.rlimit.sbsize.hard = unlimited
proc.curproc.rlimit.vmemoryuse.soft = unlimited
proc.curproc.rlimit.vmemoryuse.hard = unlimited
proc.curproc.stopfork = 0
proc.curproc.stopexec = 0
proc.curproc.stopexit = 0
#

It's usual for top to say about 400 MB of swap space are being used--way below the free amount--so maybe I should increase the process' maximum data segment size.


Changing subject slightly... I've noticed in top's output on a NetBSD/i386 5.0.2 PC which has 1 GB RAM and 641 MB of swap space which is running squid, that the file cache sometimes uses more than 700 MB of RAM and at the same time more than 300 MB of swap space is used. I wondered if system performance might be better if less RAM was used by the file cache so as to be able to use less slow swap space. I guess that's not right though since the memory management routines know what they're doing. Could you give me a rough idea of how the kernel (?) decides to balance the competing needs of file caching and swap usage?


Ray


Home | Main Index | Thread Index | Old Index