cannot run many programs simultaneously

Anna Sidera sidera.anan@ucy.ac.cy
Thu Mar 4 16:09:00 GMT 2010


When I said stop I meant crash.

I am sending you the output of the top command when I run the program only one time.

top - 17:58:23 up 8 days,  2:45,  1 user,  load average: 1.00, 1.00, 1.00
Tasks: 120 total,   2 running, 118 sleeping,   0 stopped,   0 zombie
Cpu(s): 36.6%us,  0.1%sy,  0.0%ni, 63.4%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  10267424k total,  2039184k used,  8228240k free,   153588k buffers
Swap:  2963952k total,    35404k used,  2928548k free,   104768k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
23308 sidera    20   0 8809m 1.5g  720 R  101 15.8 592:06.37 fir2p
    1 root      20   0 10312  200  168 S    0  0.0   0:05.50 init
    2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd
    3 root      RT  -5     0    0    0 S    0  0.0   0:20.02 migration/0
    4 root      15  -5     0    0    0 S    0  0.0   0:00.20 ksoftirqd/0
    5 root      RT  -5     0    0    0 S    0  0.0   0:08.72 watchdog/0
    6 root      RT  -5     0    0    0 S    0  0.0   0:08.64 migration/1
    7 root      15  -5     0    0    0 S    0  0.0   0:00.00 ksoftirqd/1
    8 root      RT  -5     0    0    0 S    0  0.0   0:00.72 watchdog/1
    9 root      RT  -5     0    0    0 S    0  0.0   0:09.16 migration/2
   10 root      15  -5     0    0    0 S    0  0.0   0:00.00 ksoftirqd/2
   11 root      RT  -5     0    0    0 S    0  0.0   0:00.76 watchdog/2
   12 root      RT  -5     0    0    0 S    0  0.0   0:03.08 migration/3
   13 root      15  -5     0    0    0 S    0  0.0   0:00.08 ksoftirqd/3
   14 root      RT  -5     0    0    0 S    0  0.0   0:00.80 watchdog/3
   15 root      RT  -5     0    0    0 S    0  0.0   0:00.06 migration/4
   16 root      15  -5     0    0    0 S    0  0.0   0:00.00 ksoftirqd/4

I think this means that the system has 10 GB RAM and 2 GB memory that can be used on the disk. In this case, the program asked for 8809 MB of RAM? How much memory is the program currently using? How many of these programs should I be able to run simulatneously?

Thanks,
Anna

----- Original Message -----
From: "John (Eljay) Love-Jensen" <eljay@adobe.com>
Date: Thursday, March 4, 2010 5:33 am
Subject: 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
> 



More information about the Gcc-help mailing list