From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,c6504cb3ecb2afb9 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-01-17 10:20:18 PST Path: supernews.google.com!sn-xit-02!sn-xit-04!supernews.com!xfer13.netnews.com!netnews.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: waco_johnny_d@my-deja.com Newsgroups: comp.unix.tru64 Subject: Re: Virtual memory exhausted Date: Wed, 17 Jan 2001 18:13:51 GMT Organization: Deja.com Message-ID: <944ncl$9b2$1@nnrp1.deja.com> References: <9443s6$ns5$1@nnrp1.deja.com> NNTP-Posting-Host: 206.152.163.42 X-Article-Creation-Date: Wed Jan 17 18:13:51 2001 GMT X-Http-User-Agent: Mozilla/4.61 [en] (X11; U; Linux 2.2.5 i586) X-Http-Proxy: 1.0 gateway.zk3.dec.com:8080 (Squid/2.2.STABLE5), 1.0 x55.deja.com:80 (Squid/1.1.22) for client 16.140.48.103, 206.152.163.42 X-MyDeja-Info: XMYDJUIDwaco_johnny_d Xref: supernews.google.com comp.unix.tru64:1496 Hi again J, > vm: > vm-maxvas = 1073741824 (1GB) As long as you're sure your program won't try to use more, this looks ok. How much memory in the workstation, by the way? (Apologies in advance if you've already provided this information.) > proc: > [...] > per-proc-data-size = 134217728 I would go ahead and make this 1GB, same as for vm-maxvas and the other per-proc stuff that's set to 1GB. With that 134MB setting, you might be placing a ceiling on the memory you can use. > maxusers is set to 32, but I don't think it can matter, it is just a > workstation with no more than 2-3 users logged in. A common misconception regarding "maxusers" is that it has to do only with the maximum number of users on the system. This is not true -- it actually controls several other important parameters (explained in the tuning guide). I would go ahead and kick this WAY up as I said before. > Before starting > compilation I make all possible ulimit settings to unlimited, so it > reads: > > core file size (blocks) unlimited > data seg size (kbytes) 1048576 > file size (blocks) unlimited > max memory size (kbytes) 505688 > open files 4096 > pipe size (512 bytes) 8 > stack size (kbytes) 32768 > cpu time (seconds) unlimited > max user processes 64 > virtual memory (kbytes) 1048576 > I've never had to do anything with ulimit -- always done it in sysconfigtab, so I can't comment here, except to ask whether you have set your soft limits all the way up to what the hard limits will allow? Have you compared the outputs of "ulimit -aS" and "ulimit -aH"? > Then I start the compilation and monitor the amount of free memory and > swap. Some strange things that I've noticed: in spite of the fact that > there is still free memory, the percentage of used swap also grows as > memory is allocated. Even when there are tons of free memory (like 40K > pages), both this memory AND swap are utilized, which I can't explain. > When the amount of memory occupied by the process (sum of free memory > plus swap) reaches approximately 150MB, it aborts, saying "Virtual > memory exhausted" - but there is still 20-30K pages of free memory and > at least 50% of swap left!!! Tracing the kernel calls shows, that the > process is aborted when mmap fails with ENOMEM. > > The questions now are: why it uses swap, when free memory is still > available and what limit am I overlooking? > You're probably using aggressive (immediate) swap, right? See the "swapon" man page for more. You may be able to get by with lazy (deferred) swap if no one's going to complain if processes die on the workstation because they can't get swap space. Production systems that can't crash or lose processes due to swap unavailability generally use immediate swap, but this may not reflect your needs, i.e. you may not need to be as conservative. Hope this helps a little more, WJD Sent via Deja.com http://www.deja.com/