This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: cannot run many programs simultaneously


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]