From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 458 invoked by alias); 4 Mar 2010 16:58:44 -0000 Received: (qmail 448 invoked by uid 22791); 4 Mar 2010 16:58:43 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail.gmx.net (HELO mail.gmx.net) (213.165.64.20) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 04 Mar 2010 16:58:39 +0000 Received: (qmail invoked by alias); 04 Mar 2010 16:58:35 -0000 Received: from NANO-67-180.grenoble.cnrs.fr (EHLO axel) [147.173.67.180] by mail.gmx.net (mp063) with SMTP; 04 Mar 2010 17:58:35 +0100 Date: Thu, 04 Mar 2010 16:58:00 -0000 From: Axel Freyn To: gcc-help@gcc.gnu.org Subject: Re: RE: cannot run many programs simultaneously Message-ID: <20100304165831.GN7759@axel> Mail-Followup-To: gcc-help@gcc.gnu.org References: <4B8E9DCA.7080808@verizon.net> <4B7A6CC9992C4E4FB188D02872C90A6B134EF6@nambxv01a.corp.adobe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-IsSubscribed: yes 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/msg00072.txt.bz2 Hi Anna, On Thu, Mar 04, 2010 at 06:06:09PM +0200, Anna Sidera wrote: > 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 This part means, you have a total of 10GB Ram + 2.9GB swap-space on the disk, so you can use at the same time up to 13GB. In addition: From the 10.2GB of Ram, 8.2GB are completely free at the moment. From the 3GB of Swap-space on the disk, only 35MB are used. > > 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 > > 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? Yes, the program allocated (using "alloc" oder "new" or a similar function) 8.8GB of memory. At the moment, it is using 1.5GB - the remaining part of the allocated memory (8.8GB-1.5GB=7.3GB) is not used by the program until now. > How many of these programs should I be able to run simulatneously? That is an answer nobody of us can answer;-) To be on the safe side: IF the program is going to use ALL of these 8.8 GB - you can only run one program at a time (already two simultaneous programs would need 2*8.8GB = 17.6GB, which is more than you have). However: Nobody can say for sure whether that will happen or not: if the program never uses more than 1.5GB, you can run up to 13GB/1.5GB = 8 programs simultaneously (well, maybe 7 as you also have other programs needing memory). In addition, there is of course a third possibility: maybe the program is going to allocate even more memory - and also going to use it. Than it might happen, that even the single run will crash if it runs to long. So, the safest solution would be to read the documentation / sourcecode of the program in order to determine how much memory it is expected to use:-) HTH, Axel