Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!newsfeed.CARNet.hr!gregory.BNet.hr!not-for-mail From: Josip Almasi Newsgroups: comp.lang.java.programmer Subject: Re: why running multiple instances of the same program is faster than running single instance? Date: Tue, 03 Jun 2014 09:40:23 +0200 Organization: B.net Hrvatska d.o.o. Lines: 22 Message-ID: References: NNTP-Posting-Host: 109.60.126.228 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: gregory.bnet.hr 1401781223 22675 109.60.126.228 (3 Jun 2014 07:40:23 GMT) X-Complaints-To: abuse@globalnet.hr NNTP-Posting-Date: Tue, 3 Jun 2014 07:40:23 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:28640 On 06/02/2014 05:12 PM, www wrote: > Hi: > > We have a software(some code from ours and some from the 3rd party) doing scientific calculation. > It runs for several hours for finishing two years calculation. We use linux and it has four CPUs. > Our code is not con-current multi-threaded yet. > > We are puzzled that when we run multiple instances on the same linux computer, the run finishes > earlier than running singe instance. When we run multiple instances, each instance is independently > doing its own two year calculation. For example, one instance is calculating 1980-1981, another > instance is calculating 1982-1983, etc. If running single instance for 1980-1981 takes 120 minutes > to finish, when running together with other instances, it only needs 100 minutes to finish 1980-1981. > > Any suggestions why this is happening? Thank you very much. Maybe you're lucky, and read-ahead kicked in. But I have no clue how to monitor this on linux. I/O may be faster with multiple instances, either due to readahead, or due to dentry/inode caching. Maybe slaptop and vmstat provide some useful info. Regards...