Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* memory limits
@ 2000-02-08  5:00 Philippe Blaise
  2000-02-09  5:00 ` Aurel Balmosan
  2000-02-09  5:00 ` Serguei Patchkovskii
  0 siblings, 2 replies; 4+ messages in thread
From: Philippe Blaise @ 2000-02-08  5:00 UTC (permalink / raw)


I can't understand the memory limits on my ES40 Tru64 Unix V5.0 :

253.phblai.ixia0> limit
cputime         1:00:00
filesize        unlimited
datasize        4194304 kbytes
stacksize       4194304 kbytes
coredumpsize    unlimited
memoryuse       1032192 kbytes
vmemoryuse      4194304 kbytes
descriptors     4096

I thought it was not possible to adress more than
memoryuse       1032192 kbytes
but a simple program can allocate more :

254.phblai.ixia0> ./fuck_mem
 allocation de          128  MB en cours...
   16777216.0000000
 allocation + test calcul reussis !
 allocation de          256  MB en cours...
   33554432.0000000
 allocation + test calcul reussis !
 allocation de          384  MB en cours...
   50331648.0000000
 allocation + test calcul reussis !
 allocation de          512  MB en cours...
   67108864.0000000
 allocation + test calcul reussis !
 allocation de          640  MB en cours...
   83886080.0000000
 allocation + test calcul reussis !
 allocation de          768  MB en cours...
   100663296.000000
 allocation + test calcul reussis !
 allocation de          896  MB en cours...
   117440512.000000
 allocation + test calcul reussis !
 allocation de         1024  MB en cours...
   134217728.000000
 allocation + test calcul reussis !
 allocation de         1152  MB en cours...
   150994944.000000
 allocation + test calcul reussis !
 allocation de         1280  MB en cours...
   167772160.000000
 allocation + test calcul reussis !
 allocation de         1408  MB en cours...
   184549376.000000
 allocation + test calcul reussis !
 allocation de         1536  MB en cours...

etc....

Could someone explain to me the meaning of all that memory limits,
and how to avoid to allocate more than 1 Go / process on my ES40 ?

Phil.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: memory limits
  2000-02-08  5:00 memory limits Philippe Blaise
@ 2000-02-09  5:00 ` Aurel Balmosan
  2000-02-09  5:00 ` Serguei Patchkovskii
  1 sibling, 0 replies; 4+ messages in thread
From: Aurel Balmosan @ 2000-02-09  5:00 UTC (permalink / raw)




Philippe Blaise wrote:

> I can't understand the memory limits on my ES40 Tru64 Unix V5.0 :
>
> 253.phblai.ixia0> limit
> cputime         1:00:00
> filesize        unlimited
> datasize        4194304 kbytes
> stacksize       4194304 kbytes
> coredumpsize    unlimited
> memoryuse       1032192 kbytes
> vmemoryuse      4194304 kbytes
> descriptors     4096
>
> I thought it was not possible to adress more than
> memoryuse       1032192 kbytes
> but a simple program can allocate more :

There has been no 1G limit for several year now. On 64-bit machines you
can address up to 4T. And on alpha's we currently use up to 8G address
space without a problem. Well, you have to adjust the kernel limits in
/etc/sysconfig to i.e:


ipc:  msg-max = 32768
      msg-mnb = 65536
      msg-mni = 512
      msg-tql = 1024
      num-of-sems = 512
      sem-mni = 512
      sem-msl = 256
      sem-opm = 256
      sem-ume = 256
      shm-max = 2147483647
      shm-min = 1
      shm-mni = 512
      shm-seg = 128

proc: max-per-proc-address-space = 8589934592
      max-per-proc-data-size = 8589934592
      per-proc-address-space = 8589934592
      per-proc-data-size = 8589934592
      max-proc-per-user = 1024
      max-threads-per-user = 1024

vm:   vm-maxvas = 8589934592
      vm-maxwire = 8589934592






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: memory limits
  2000-02-08  5:00 memory limits Philippe Blaise
  2000-02-09  5:00 ` Aurel Balmosan
@ 2000-02-09  5:00 ` Serguei Patchkovskii
  2000-02-10  5:00   ` Philippe Blaise
  1 sibling, 1 reply; 4+ messages in thread
From: Serguei Patchkovskii @ 2000-02-09  5:00 UTC (permalink / raw)


Philippe Blaise (phblai@mimosa.ceng.cea.fr) wrote:
: I thought it was not possible to adress more than
: memoryuse       1032192 kbytes
: but a simple program can allocate more :

I believe that csh 'memoryuse' limit corresponds to RLIMIT_RSS
in getrlimit/setrlimit system calls. Now, looking at the manual
page for setrlimit(2), we see:

      RLIMIT_RSS
          [Digital]  The maximum size, in bytes, to which a process's
          resident set size can grow.  This value imposes a limit on the
          amount of physical memory to be given to a process.  If memory is
          in short supply, the system prefers to take memory from processes
          that are exceeding their declared resident set size.

As you can see, this limit applies only in constrained memory
situations, and controls the amount of physical memory your
process can use - provided that there are other ways in which
it can be used by the system. Therefore, calling RLIMIT_RSS a
"limit" is a bit of misnomer - your process may well be able
to use more memory (if system has no other use for it), or it
may be stuck with less memory (if there are higher-priority 
uses for that memory). I'd rather call RLIMIT_RSS a hint, made 
by your application to the virtual memory subsystem, saying
that you'd *like* to have that much real memory to work optimally ...

Cheers,

/Serge.P

P.S. RTFM - it usually helps!

--
home page: http://www.cobalt.chem.ucalgary.ca/ps/



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: memory limits
  2000-02-09  5:00 ` Serguei Patchkovskii
@ 2000-02-10  5:00   ` Philippe Blaise
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Blaise @ 2000-02-10  5:00 UTC (permalink / raw)


Serguei Patchkovskii wrote:

> Philippe Blaise (phblai@mimosa.ceng.cea.fr) wrote:
> : I thought it was not possible to adress more than
> : memoryuse       1032192 kbytes
> : but a simple program can allocate more :
>
> I believe that csh 'memoryuse' limit corresponds to RLIMIT_RSS
> in getrlimit/setrlimit system calls. Now, looking at the manual
> page for setrlimit(2), we see:
>
>       RLIMIT_RSS
>           [Digital]  The maximum size, in bytes, to which a process's
>           resident set size can grow.  This value imposes a limit on the
>           amount of physical memory to be given to a process.  If memory is
>           in short supply, the system prefers to take memory from processes
>           that are exceeding their declared resident set size.
>

I wonder how a process can exceed that declared resident size. Humm....


>
> As you can see, this limit applies only in constrained memory
> situations, and controls the amount of physical memory your
> process can use - provided that there are other ways in which
> it can be used by the system. Therefore, calling RLIMIT_RSS a
> "limit" is a bit of misnomer - your process may well be able
> to use more memory (if system has no other use for it), or it
> may be stuck with less memory (if there are higher-priority
> uses for that memory). I'd rather call RLIMIT_RSS a hint, made
> by your application to the virtual memory subsystem, saying
> that you'd *like* to have that much real memory to work optimally ...
>

Ok I see. So I should set RLIMIT_AS to 1 GB also, if I want interactive
session use less than 1 GB.
Have you any idea for data and stack size too ?
Thanks a lot.

Philippe

>
> Cheers,
>
> /Serge.P
>
> P.S. RTFM - it usually helps!
>
> --
> home page: http://www.cobalt.chem.ucalgary.ca/ps/




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-02-10  5:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-02-08  5:00 memory limits Philippe Blaise
2000-02-09  5:00 ` Aurel Balmosan
2000-02-09  5:00 ` Serguei Patchkovskii
2000-02-10  5:00   ` Philippe Blaise

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox