[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

8673.0. "Out of Virtual Memory" by NEOV00::KLOPEZ (Ay Caramba!) Fri Jan 31 1997 14:25

    Hello,
    
    My customer is running ProEngineer on an AlphaServer 2100 with 128 MB
    of memory and a swap space of 500 MB. 
    
    When they run ProE, the console message displays "Out of Virtual
    Memory". I haven't had a chance to monitor his system yet, but I asked
    him to revise the values displayed on ulimit -a, and some of the ipc
    values. They all seem big enough. 
    
    I'll visit my customer site next monday and would like advice on where
    to look for the problem. No been an expert on tuning, I would look on
    unusual behavior on vmstat, ps, swapon, etc. But I would certainly be
    glad to receive some help from the experts.
    
    
    Thanks in advance,
    
    Katya
T.RTitleUserPersonal
Name
DateLines
8673.1How to configure/increase process limitsNETRIX::"[email protected]"SriFri Jan 31 1997 17:08194
How to increase process virtual memory limits in Digital Unix
=============================================================

The best reference source for all this good stuff is the book titled 
"System tuning and Performance management"


1) Do the following command to see what your current parameters are:

# sysconfig -q proc
max-proc-per-user = 256
max-threads-per-user = 1024
per-proc-stack-size = 2097152
max-per-proc-stack-size = 33554432
per-proc-data-size = 134217728
max-per-proc-data-size = 1073741824
max-per-proc-address-space = 1073741824
per-proc-address-space = 1073741824
autonice = 0
open-max-soft = 4096
open-max-hard = 4096
ncallout = 66084
round-robin-switch-rate = 0
round_robin_switch_rate = 0
sched-min-idle = 0
sched_min_idle = 0
give-boost = 1
give_boost = 1

# sysconfig -q vm
ubc-minpercent = 10
ubc-maxpercent = 100            (Amount of physical memory, RAM,
                                allowed for disk I/O buffering)
ubc-borrowpercent = 10          (let this one be about 10 to 20)
ubc-maxdirtywrites = 5
ubc-wait-for-io = 1
vm-max-wrpgio-kluster = 32768
vm-max-rdpgio-kluster = 16384
vm-cowfaults = 4
vm-mapentries = 200
vm-maxvas = 1073741824
vm-maxwire = 16777216
vm-heappercent = 7
vm-anonklshift = 17
vm-anonklpages = 1
vm-vpagemax = 16384
vm-segmentation = 1
vm-ubcpagesteal = 24
vm-ubcdirtypercent = 10
vm-ubcseqstartpercent = 50
vm-ubcseqpercent = 10
vm-csubmapsize = 1048576
vm-ubcbuffers = 256
vm-syncswapbuffers = 128
vm-asyncswapbuffers = 4
vm-clustermap = 1048576
vm-clustersize = 65536
vm-zone_size = 0
vm-kentry_zone_size = 16777216
vm-syswiredpercent = 80
vm-inswappedmin = 1
vm-page-free-target = 128
vm-page-free-min = 20
vm-page-free-reserved = 10
vm-page-free-optimal = 74


2) You need to increase the following parameters according to your
   requirements:

        (parameters that start with "max" are hard limits that apply to
         super user also. So if you want to change the limit on the total 
         allocated memory of a user process you would tweak the 
         "per-proc-data-size" parameter)

per-proc-stack-size = 2097152           (Can be as huge as vm-maxvas, but
                                        would  be about 10 times lesser)
max-per-proc-stack-size = 33554432      (Can be as huge as vm-maxvas, but
                                        would  be about 10 times lesser)
per-proc-data-size = 134217728          (Can equal vm-maxvas)
max-per-proc-data-size = 1073741824     (Can equal vm-maxvas)
max-per-proc-address-space = 1073741824 (Can equal vm-maxvas)
per-proc-address-space = 1073741824     (Can equal vm-maxvas) 
vm-kentry_zone_size (You can double the default value, if you get a warning 
                        while running the program that kernel zone_size
                        is smaller for managing the system work-load)
vm-maxvas  (Total virtual address space the system has and a user can access)
            on immediate swap systems., its better close to total amount
            of virtual memory you have., but if your system is specifically
            configured for lazy swap., then you might have a much higher
            value)
vm-maxwire ( Amount of RAM (wired) memory allocated per process
            before it uses swap-space for memory allocation;
           Can go close to the amount of your physical memory, 
            which can be allocated per any process. Your RAM - 30 Meg
            would be a good estimate. Don't change the default value
            if you have less than 48 Meg of RAM on the system)


3) See limit command to figure out what are your current limits.
        ("csh" might rarely reports erroneous values, because of some 
        software correction)

4) Run your program and see if it gets you going!

For Example with 128 MB memory (RAM) and about 300 Meg swap, the
following values give you a rough idea of maximum values you can assign 
with immediate swap mode (having the link /sbin/swapdefault to the primary
swap partition). If you have lazy swap and you believe you never use all
the memory you allocate., you can have proc: sub-system values much higher.
(If you have LOTTA memory (RAM) you might have to double the default
values for the vm-kentry_zone_size!)

When you need to change some parameters., you can do so by incorporating
them into /etc/sysconfigtab file. For EXAMPLE my /etc/sysconfigtab file
is:
vm:
        ubc-maxpercent=100
        ubc-borrowpercent = 10
        vm-maxwire = 104857600
        vm-maxwire = 2134217728
        vm-vpagemax = 16000
        vm-syswiredpercent = 90
        vm-kentry_zone_size = 33554432

proc:
        per-proc-stack-size = 222097152
        max-per-proc-stack-size = 222097152
        per-proc-data-size = 1134217728
        max-per-proc-data-size = 2134217728
        max-per-proc-address-space = 2134217728
        per-proc-address-space = 2134217728



NOTE1:
        Please make sure which sub-section which parameter belongs before
        trying to change them. Also, once you change've these values
        in /etc/sysconfigtab file., you need a system re-boot to
        update the system with new values.

NOTE2:  
        If you are allocating large arrays you might want to do the following
        thing as root:

     # dbx -k /vmunix /dev/mem
     (dbx) p stackinc
     32768
     (dbx) a stackinc=0x20000
     131072
     (dbx)quit


NOTE3:        you need to increase the values (in the file /etc/sysconfigtab)

proc:
max-proc-per-user = 256
max-threads-per-user = 2048

        If you are running large web-server or a database server., you
        might want to push these limits further. Just make sure you 
        have enough "maxusers" parameter set to go with it.
        ( max-proc-per-user should be less than 8 times maxusers 
                ie., max-proc-per-user < 8 * maxusers )
        Also, make sure make sure max-threads-per-user is
        about as large or more than max-proc-per-user.


NOTE4:

        For 2.x and 3.0 and 3.2 series versions of operating systems:
        You might need to incease maxusers parameter in your
        kernel configuration file (/sys/conf/HOSTNAME) and re-build
        the kernel (doconfig -c HOSTNAME) to increase the system
        wide number of processes. After this you need to reboot
        with the newly built kernel. 

        For 4.0 or above versions of operating systems:
        maxusers is configurable via sysconfigtab itself. Check the 
        current value by typing "/sbin/sysconfig -q proc"

This parameter is particularly important if
you have lotta memory and lotta users/processes going on the
system. You can check it by:

# echo "p maxusers" | dbx -k /vmunix /dev/mem

(If you don't have enough maxusers values., you might see
a message that task/proc table full messages, or fork, too many
processes, or no more processes)

Sri
[email protected]
[Posted by WWW Notes gateway]
8673.2Possible solutionsHYDRA::DONSBACHJeff Donsbach, Software Partner Engineering, DTN 297-6862Fri Jan 31 1997 19:4538
    
    First of all, please open a Note on this issue in
    ALLVAX::PRO_ENGINEER (sorry, I'm a notes novice so I'm not sure
    how to move it there myself)
    
    Second, Pro_Engineer's "Out of Virtual Memory" error message is sort
    of a catch all that it prints out when it receives a signal it
    doesn't know how to handle, and then just exits. I'm working with
    PTC to make this error handling more intelligent.
    
    Three, please give OS and Firmware Specifics
    
    There is a known problem that gives a message like this when EV4 and
    EV45 systems have PALcode 1.45 or later and Unix 3.2D or earlier.
    Please check and let me know here whether the system in question has
    this combination. There are 3 different ways of fixing it.
    
        1) Upgrade to Unix 3.2F or later
        2) Downgrade the firmware back to something previous to
           PALcode 1.45
        3) Get a patch for the version of Digital Unix they are running.
    
    The obvious clue to this situation is that you will also see an
    error like:
    
            "inst fault=4, status word=               8, pc=3ff80128e50"
            "Illegal instruction (core dumped)"
    just before the "Out of Virtual Memory Message".
    
    There was a TIMA blitz issued on May 9, 1996 on this whole issue.
    It was first found when the AlphaStation 255's were released.
    
    Get the information I asked about above and I might be able to help
    out.
    
    Regards,
    -Jeff
    
8673.3also, 2100 not certifiedHYDRA::DONSBACHJeff Donsbach, Software Partner Engineering, DTN 297-6862Fri Jan 31 1997 19:465
    Your customer should also be aware that the 2100 server is not
    certified by PTC for Pro/Engineer. It is only certified for Pro/PDM.
    
    -Jeff
    
8673.4Thanks for the infoNEOV00::KLOPEZAy Caramba!Mon Feb 03 1997 16:558
    Thanks!
    
    I was very puzzled by the fact that the same version on PRO/E was
    running well with less resources on two different workstations. Less
    memory, less swap space. The only difference I could find out was
    the operating system on the 2100 server: 3.2D!!!!!
    
    Katya