public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "John (Eljay) Love-Jensen" <eljay@adobe.com>
To: Anna Sidera <sidera.anan@ucy.ac.cy>
Cc: "gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: RE: cannot run many programs simultaneously
Date: Thu, 04 Mar 2010 03:34:00 -0000	[thread overview]
Message-ID: <4B7A6CC9992C4E4FB188D02872C90A6B134EF6@nambxv01a.corp.adobe.com> (raw)
In-Reply-To: <f5c6b503deb1.4b8f361b@ucy.ac.cy>

Hi Anna,

> When I said stop, I meant they stop running before finishing.

I am not sure what you mean by "stop" here.

Stop as in crash?

> If increasing the swap space makes them vrey slow this will not help me. The reason I run 6 programms simultaneously is to save time.

What is the memory footprint of one of the programs running by itself?

For example, let's assume your machine has 64 GB of RAM, and 256 GB of swap space.  If one program running consumes 128 GB of RAM, then when you run the third program, your machine will have exhausted its supply of RAM (both physical and swap).

> Can you explain 'hit either the system over commit limit or actual exhaustion of memory'?

If you have three programs running and each asks for 128 GB of RAM, and you machine physically has 64 GB of RAM and 256 GB of swap, the OS will give each program 128 GB of RAM.  That overcommits the available RAM (physical + swap).

Everything will run okay as long as the programs don't actually use as much RAM as they asked for.  (A surprisingly large number of program exhibit the behavior of asking for a lot more heap memory than they actually use.)

But if the programs do actually need all the RAM they requested, then later on when the program goes to swap in some fresh page of memory the program will fault.  Note that the fault happens long, long after the request for memory was made (and which was made without having an error code).

Sincerely,
--Eljay

  reply	other threads:[~2010-03-04  3:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-03 14:35 Anna Sidera
2010-03-03 15:48 ` Ian Lance Taylor
2010-03-03 17:35 ` John S. Fine
2010-03-04  2:28   ` Anna Sidera
2010-03-04  3:34     ` John (Eljay) Love-Jensen [this message]
2010-03-04 16:09       ` Anna Sidera
2010-03-04 16:58         ` Axel Freyn
2010-03-04 16:43     ` John S. Fine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B7A6CC9992C4E4FB188D02872C90A6B134EF6@nambxv01a.corp.adobe.com \
    --to=eljay@adobe.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=sidera.anan@ucy.ac.cy \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).