From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7129 invoked by alias); 4 Mar 2010 16:09:46 -0000 Received: (qmail 7116 invoked by uid 22791); 4 Mar 2010 16:09:44 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from hermes.csrv.ucy.ac.cy (HELO hermes.csrv.ucy.ac.cy) (194.42.13.180) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Mar 2010 16:09:37 +0000 Received: from ucy.ac.cy ([127.0.0.1]) by hermes.csrv.ucy.ac.cy (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTP id <0KYR00FKAM296K10@hermes.csrv.ucy.ac.cy> for gcc-help@gcc.gnu.org; Thu, 04 Mar 2010 18:06:09 +0200 (EET) Received: from [213.7.234.48] by hermes.csrv.ucy.ac.cy (mshttpd); Thu, 04 Mar 2010 18:06:09 +0200 Date: Thu, 04 Mar 2010 16:09:00 -0000 From: Anna Sidera Subject: Re: RE: cannot run many programs simultaneously In-reply-to: <4B7A6CC9992C4E4FB188D02872C90A6B134EF6@nambxv01a.corp.adobe.com> To: eljay@adobe.com Cc: gcc-help@gcc.gnu.org Message-id: MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline References: <4B8E9DCA.7080808@verizon.net> <4B7A6CC9992C4E4FB188D02872C90A6B134EF6@nambxv01a.corp.adobe.com> Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg00069.txt.bz2 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" 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 >