Dual Core vs Quad Core

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Dual Core vs Quad Core

Kitty Lee
Dear R-users,

I use R to run spatial stuff and it takes up a lot of ram. Runs can take hours or days. I am thinking of getting a new desktop. Can R take advantage of the dual-core system?

I have a dual-core computer at work. But it seems that right now R is using only one processor.

The new computers feature quad core with 3GB of RAM. Can R take advantage of the 4 chips? Or am I better off getting a dual core with faster processing speed per chip?

Thanks! Any advice would be really appreciated!

K.

       
---------------------------------

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Dual Core vs Quad Core

Andrew Perrin
On Mon, 17 Dec 2007, Kitty Lee wrote:

> Dear R-users,
>
> I use R to run spatial stuff and it takes up a lot of ram. Runs can take hours or days. I am thinking of getting a new desktop. Can R take advantage of the dual-core system?
>
> I have a dual-core computer at work. But it seems that right now R is using only one processor.
>
> The new computers feature quad core with 3GB of RAM. Can R take advantage of the 4 chips? Or am I better off getting a dual core with faster processing speed per chip?
>
> Thanks! Any advice would be really appreciated!
>
> K.

If I have my information right, R will use dual- or quad-cores if it's
doing two (or four) things at once. The second core will help a little bit
insofar as whatever else your machine is doing won't interfere with the
one core on which it's running, but generally things that take a single
thread will remain on a single core.

As for RAM, if you're doing memory-bound work you should certainly be
using a 64-bit machine and OS so you can utilize the larger memory space.


----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin (at) unc.edu - http://perrin.socsci.unc.edu
Associate Professor of Sociology; Book Review Editor, _Social Forces_
University of North Carolina - CB#3210, Chapel Hill, NC 27599-3210 USA

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Dual Core vs Quad Core

Simon Blomberg-4
I've been running R on a quad-core using Debian Gnu/Linux since March
this year, and I am very pleased with the performance.

Simon.


On Mon, 2007-12-17 at 20:13 -0500, Andrew Perrin wrote:

> On Mon, 17 Dec 2007, Kitty Lee wrote:
>
> > Dear R-users,
> >
> > I use R to run spatial stuff and it takes up a lot of ram. Runs can take hours or days. I am thinking of getting a new desktop. Can R take advantage of the dual-core system?
> >
> > I have a dual-core computer at work. But it seems that right now R is using only one processor.
> >
> > The new computers feature quad core with 3GB of RAM. Can R take advantage of the 4 chips? Or am I better off getting a dual core with faster processing speed per chip?
> >
> > Thanks! Any advice would be really appreciated!
> >
> > K.
>
> If I have my information right, R will use dual- or quad-cores if it's
> doing two (or four) things at once. The second core will help a little bit
> insofar as whatever else your machine is doing won't interfere with the
> one core on which it's running, but generally things that take a single
> thread will remain on a single core.
>
> As for RAM, if you're doing memory-bound work you should certainly be
> using a 64-bit machine and OS so you can utilize the larger memory space.
>
>
> ----------------------------------------------------------------------
> Andrew J Perrin - andrew_perrin (at) unc.edu - http://perrin.socsci.unc.edu
> Associate Professor of Sociology; Book Review Editor, _Social Forces_
> University of North Carolina - CB#3210, Chapel Hill, NC 27599-3210 USA
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Simon Blomberg, BSc (Hons), PhD, MAppStat.
Lecturer and Consultant Statistician
Faculty of Biological and Chemical Sciences
The University of Queensland
St. Lucia Queensland 4072
Australia
Room 320 Goddard Building (8)
T: +61 7 3365 2506
email: S.Blomberg1_at_uq.edu.au

Policies:
1.  I will NOT analyse your data for you.
2.  Your deadline is your problem.

The combination of some data and an aching desire for
an answer does not ensure that a reasonable answer can
be extracted from a given body of data. - John Tukey.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Dual Core vs Quad Core

Saeed Abu Nimeh-2
I ran a bayesian simulation sometime ago and it took me 1 week to finish
on a debian box (Dell PE 2850  Dual Intel Xeon@3.6GHz  6GB). I think it
depends on the setting of the experiment and whether the code can be
parallelized.

Simon Blomberg wrote:

> I've been running R on a quad-core using Debian Gnu/Linux since March
> this year, and I am very pleased with the performance.
>
> Simon.
>
>
> On Mon, 2007-12-17 at 20:13 -0500, Andrew Perrin wrote:
>> On Mon, 17 Dec 2007, Kitty Lee wrote:
>>
>>> Dear R-users,
>>>
>>> I use R to run spatial stuff and it takes up a lot of ram. Runs can take hours or days. I am thinking of getting a new desktop. Can R take advantage of the dual-core system?
>>>
>>> I have a dual-core computer at work. But it seems that right now R is using only one processor.
>>>
>>> The new computers feature quad core with 3GB of RAM. Can R take advantage of the 4 chips? Or am I better off getting a dual core with faster processing speed per chip?
>>>
>>> Thanks! Any advice would be really appreciated!
>>>
>>> K.
>> If I have my information right, R will use dual- or quad-cores if it's
>> doing two (or four) things at once. The second core will help a little bit
>> insofar as whatever else your machine is doing won't interfere with the
>> one core on which it's running, but generally things that take a single
>> thread will remain on a single core.
>>
>> As for RAM, if you're doing memory-bound work you should certainly be
>> using a 64-bit machine and OS so you can utilize the larger memory space.
>>
>>
>> ----------------------------------------------------------------------
>> Andrew J Perrin - andrew_perrin (at) unc.edu - http://perrin.socsci.unc.edu
>> Associate Professor of Sociology; Book Review Editor, _Social Forces_
>> University of North Carolina - CB#3210, Chapel Hill, NC 27599-3210 USA
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Dual Core vs Quad Core

slre
In reply to this post by Kitty Lee
Hiding in the windows faq is the observation that "R's computation is
single-threaded, and so it cannot use more than one CPU". So multi-core
should make no difference other than allowing R to run with less
interruption from other tasks. That is often a significant advantage,
though.




>>> Andrew Perrin <[hidden email]> 18/12/2007 01:13 >>>
On Mon, 17 Dec 2007, Kitty Lee wrote:

> Dear R-users,
>
> I use R to run spatial stuff and it takes up a lot of ram. Runs can
take hours or days. I am thinking of getting a new desktop. Can R take
advantage of the dual-core system?
>
> I have a dual-core computer at work. But it seems that right now R is
using only one processor.
>
> The new computers feature quad core with 3GB of RAM. Can R take
advantage of the 4 chips? Or am I better off getting a dual core with
faster processing speed per chip?
>
> Thanks! Any advice would be really appreciated!
>
> K.

If I have my information right, R will use dual- or quad-cores if it's

doing two (or four) things at once. The second core will help a little
bit
insofar as whatever else your machine is doing won't interfere with the

one core on which it's running, but generally things that take a single

thread will remain on a single core.

As for RAM, if you're doing memory-bound work you should certainly be
using a 64-bit machine and OS so you can utilize the larger memory
space.


----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin (at) unc.edu -
http://perrin.socsci.unc.edu 
Associate Professor of Sociology; Book Review Editor, _Social Forces_
University of North Carolina - CB#3210, Chapel Hill, NC 27599-3210 USA

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help 
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html 
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Dual Core vs Quad Core

Prof Brian Ripley
On Tue, 18 Dec 2007, S Ellison wrote:

> Hiding in the windows faq is the observation that "R's computation is
> single-threaded, and so it cannot use more than one CPU". So multi-core
> should make no difference other than allowing R to run with less
> interruption from other tasks. That is often a significant advantage,
> though.

Yes, but that is Windows-specific.

On most other platforms you can benefit from using a multi-threaded BLAS,
such as ATLAS, ACML or Dr Goto's.  The speedup for linear algebra can be
substantial (although sometimes it will slow things down).  Luke Tierney
has an experimental package to make use of parallel threads for some basic
R computations which may appear in R 2.7.0.

It should be possible to use a multi-threaded BLAS under Windows, but I
know no one who has done it.  There is a viable pthreads implementation
for Windows, and I've tested Luke's experimental package using it.

Some compilers' runtimes will be able to use parallel threads for other
tasks.  Since all the examples I am aware of are expensive commercial
compilers, I suspect R will make limited use of them.  (In particular,
base R does not use the Fortran 9x vector operations at which many of
these features are targeted: we probably would if we routinely used such
compilers.)

I've had dual-CPU desktops for more than ten years.  Given how little
speedup you are likely to get via parallel processing (only under ideal
conditions do the optimized BLASes run >1.5x faster using two CPUs), the
most effective way to make use of multiple CPUs has been to run multiple
jobs: I typically run 3-4 at once to keep the CPUs fully used.

One way to run multiple R processes to cooperate on a single task is to
use a package such as snow to distribute the load.



>>>> Andrew Perrin <[hidden email]> 18/12/2007 01:13 >>>
> On Mon, 17 Dec 2007, Kitty Lee wrote:
>
>> Dear R-users,
>>
>> I use R to run spatial stuff and it takes up a lot of ram. Runs can
> take hours or days. I am thinking of getting a new desktop. Can R take
> advantage of the dual-core system?
>>
>> I have a dual-core computer at work. But it seems that right now R is
> using only one processor.
>>
>> The new computers feature quad core with 3GB of RAM. Can R take
> advantage of the 4 chips? Or am I better off getting a dual core with
> faster processing speed per chip?
>>
>> Thanks! Any advice would be really appreciated!
>>
>> K.
>
> If I have my information right, R will use dual- or quad-cores if it's
> doing two (or four) things at once. The second core will help a little
> bit
> insofar as whatever else your machine is doing won't interfere with the
> one core on which it's running, but generally things that take a single
> thread will remain on a single core.
>
> As for RAM, if you're doing memory-bound work you should certainly be
> using a 64-bit machine and OS so you can utilize the larger memory
> space.

They only have 3GB of RAM, which 32-bit OSes can address.  The benefits
really come with more than that.

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Dual Core vs Quad Core

Luke Tierney
On Tue, 18 Dec 2007, Prof Brian Ripley wrote:

> On Tue, 18 Dec 2007, S Ellison wrote:
>
>> Hiding in the windows faq is the observation that "R's computation is
>> single-threaded, and so it cannot use more than one CPU". So multi-core
>> should make no difference other than allowing R to run with less
>> interruption from other tasks. That is often a significant advantage,
>> though.
>
> Yes, but that is Windows-specific.
>
> On most other platforms you can benefit from using a multi-threaded BLAS,
> such as ATLAS, ACML or Dr Goto's.  The speedup for linear algebra can be
> substantial (although sometimes it will slow things down).  Luke Tierney
> has an experimental package to make use of parallel threads for some basic
> R computations which may appear in R 2.7.0.

There are two experimental packages available in
http://www.stat.uiowa.edu/~luke/R/experimental: pnmath, based on
OpenMP, and pnmath0, based on basic pthreads. These packages provide
parallelized versions of many of the R vectorized math functions. The
README files in these packages give more details.  OpenMP is I think
the way we want to go in the longer term; there are a few configu
issues that need sorting out and so in the interim a non OpenMP
version might be useful.

Best,

luke

>
> It should be possible to use a multi-threaded BLAS under Windows, but I
> know no one who has done it.  There is a viable pthreads implementation
> for Windows, and I've tested Luke's experimental package using it.
>
> Some compilers' runtimes will be able to use parallel threads for other
> tasks.  Since all the examples I am aware of are expensive commercial
> compilers, I suspect R will make limited use of them.  (In particular,
> base R does not use the Fortran 9x vector operations at which many of
> these features are targeted: we probably would if we routinely used such
> compilers.)
>
> I've had dual-CPU desktops for more than ten years.  Given how little
> speedup you are likely to get via parallel processing (only under ideal
> conditions do the optimized BLASes run >1.5x faster using two CPUs), the
> most effective way to make use of multiple CPUs has been to run multiple
> jobs: I typically run 3-4 at once to keep the CPUs fully used.
>
> One way to run multiple R processes to cooperate on a single task is to
> use a package such as snow to distribute the load.
>
>
>
>>>>> Andrew Perrin <[hidden email]> 18/12/2007 01:13 >>>
>> On Mon, 17 Dec 2007, Kitty Lee wrote:
>>
>>> Dear R-users,
>>>
>>> I use R to run spatial stuff and it takes up a lot of ram. Runs can
>> take hours or days. I am thinking of getting a new desktop. Can R take
>> advantage of the dual-core system?
>>>
>>> I have a dual-core computer at work. But it seems that right now R is
>> using only one processor.
>>>
>>> The new computers feature quad core with 3GB of RAM. Can R take
>> advantage of the 4 chips? Or am I better off getting a dual core with
>> faster processing speed per chip?
>>>
>>> Thanks! Any advice would be really appreciated!
>>>
>>> K.
>>
>> If I have my information right, R will use dual- or quad-cores if it's
>> doing two (or four) things at once. The second core will help a little
>> bit
>> insofar as whatever else your machine is doing won't interfere with the
>> one core on which it's running, but generally things that take a single
>> thread will remain on a single core.
>>
>> As for RAM, if you're doing memory-bound work you should certainly be
>> using a 64-bit machine and OS so you can utilize the larger memory
>> space.
>
> They only have 3GB of RAM, which 32-bit OSes can address.  The benefits
> really come with more than that.
>
>

--
Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:      [hidden email]
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.