Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #28642

Re: why running multiple instances of the same program is faster than running single instance?

X-Received by 10.50.51.68 with SMTP id i4mr9079640igo.5.1401791078700; Tue, 03 Jun 2014 03:24:38 -0700 (PDT)
X-Received by 10.140.80.5 with SMTP id b5mr28736qgd.20.1401791078671; Tue, 03 Jun 2014 03:24:38 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!h18no35458igc.0!news-out.google.com!s2ni1907qap.0!nntp.google.com!hw13no3831416qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Tue, 3 Jun 2014 03:24:38 -0700 (PDT)
In-Reply-To <de5dcb91-d280-463d-86f9-3ffb658d391f@googlegroups.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=92.27.247.252; posting-account=lu82qwoAAADTCukE-yHKgXq1LeJIU4ZA
NNTP-Posting-Host 92.27.247.252
References <de5dcb91-d280-463d-86f9-3ffb658d391f@googlegroups.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <6e41fef8-de83-4da3-85be-59b41262aee0@googlegroups.com> (permalink)
Subject Re: why running multiple instances of the same program is faster than running single instance?
From Rupert Smith <rupertlssmith@googlemail.com>
Injection-Date Tue, 03 Jun 2014 10:24:38 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.lang.java.programmer:28642

Show key headers only | View raw


On Monday, June 2, 2014 4:12:31 PM UTC+1, 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.

Its definitely possible, and not necessarily anything to do with Java.

If your processes read from files, they could be IO bound, and not using much CPU, resulting in the CPU running at a lower clock speed. Running a second one may be using more CPU, pushing up the clock speed.

A hyper-threaded CPU will be more efficient with 2 single-threaded processes running, as pipeline stalls on one process may get filled in with the other process doing useful work.

Rupert

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

why running multiple instances of the same program is faster than running single instance? www <xsli2@yahoo.com> - 2014-06-02 08:12 -0700
  Re: why running multiple instances of the same program is faster than running single instance? Joerg Meier <joergmmeier@arcor.de> - 2014-06-02 23:59 +0200
    Re: why running multiple instances of the same program is faster than running single instance? Arivald <arivald_@AT_interia_DOT_.pl> - 2014-06-03 13:25 +0200
  Re: why running multiple instances of the same program is faster than running single instance? Josip Almasi <joe@vrspace.org> - 2014-06-03 09:40 +0200
  Re: why running multiple instances of the same program is faster than running single instance? lipska the kat <lipskathekat@example.com> - 2014-06-03 10:02 +0100
  Re: why running multiple instances of the same program is faster than running single instance? Rupert Smith <rupertlssmith@googlemail.com> - 2014-06-03 03:24 -0700
    Re: why running multiple instances of the same program is faster than running single instance? Rupert Smith <rupertlssmith@googlemail.com> - 2014-06-03 03:26 -0700
  Re: why running multiple instances of the same program is faster than running single instance? Roedy Green <see_website@mindprod.com.invalid> - 2014-06-06 19:50 -0700

csiph-web