On Nov 19, 2009, at 9:25 AM, Carlos Hernandez wrote:
> Dear All,
> I appreciate any advice or hints you could provide about the
> following.
>
> We are running R code in a server (running Windows XP and QuadCore
> Xeon
> processors, see details below) and we would like to use the server
> efficiently. Our code takes a bit more than 6 seconds per 25
> iterations in
> the server using a default R 2.10.0 installation.
>
> We tested our code in two other computers, a Dell Latitute and a
> MacBook
> Pro, and from the details that i include below you will notice that
> the code
> needs almost twice the time when we used R for Windows compared
> against the
> time the code needs when we use Linux or MacOSX 10.6.2 in each of
> these
> computers.
>
> I'm sorry I don't provide details on the code we are using. The
code
> consists of all sort of operations (matrix inverses, random number
> generation, vectorized functions, a few loops, and so on). I hope I
> can get
> some advice from you despite the lack of specific code details.
>
> Is there any important R feature we should configure manually in the
> windows
> server to speed the code up? Is there an optimized BLAS available
> somewhere
> for this type of machine? Is these something else apart of an
> optimized BLAS
> that we could do to improve the timing?
>
> Best regards,
>
> Carlos
>
>
>
>
> **Server running WinXP (QuadCore Xeon 2.6GHz 8G Ram)
> Time per 25 Iterations "6.17"
>
> --------
> **Dell Latitude running Linux (R 2.9.2, Intel Core 2 Duo P9500 @
> 2.53GHz,
> 4GB ram)
> Time per 25 iterations "2.88"
>
> **Dell Latitude running Win Vista (R 2.10.0, Intel Core 2 Duo P9500 @
> 2.53GHz, 4GB ram) with New DLL in terminal
> Time per 25 iterations "5.53"
>
> -------
> **Macbook pro (2.16GHz Intel Core 2 Duo & 2GB ram)
> Time per 25 Iterations "4.58"
>
> **Macbook pro running WinXp (2.16GHz Intel Core 2 Duo & 2GB ram)
> Time per 25 Iterations "8.23"
>
>
> note: for the Dell and MacBook Pro we replaced the Rblas.dll file of
> R for
> Windows with the file available here
> http://cran.r-project.org/bin/windows/contrib/ATLAS/C2D/
Are you running 32 bit R on each platform or are you using 64 bit R on
Linux and OSX?
On the Dell, you are running two different versions of R and you don't
indicate the R versions on the MacBook.
The RAM configuration on each computer is different, which will impact
the timings to some extent, depending upon how much RAM you may
require for your R code, given other processes that are running and
before any disk swapping kicks in. You might want to review R Windows
FAQ 2.9, if you have not already:
http://cran.r-project.org/bin/windows/base/rw-FAQ.html#There-seems-to-be-a-limit-on-the-memory-it-uses_0021
For Windows on the MacBook, are you using Boot Camp to run Windows
natively or are you using virtualization (eg. Parallels, VMWare,
VirtualBox) to run Windows under OSX? If the latter, some of the time
increase will be due to the virtualization overhead.
You should be using the same version of R across each platform for a
fair comparison, as there is also the potential, if not the
likelihood, that some code has been improved between versions, which
may yield some performance differences. 32 bit versus 64 bit will also
yield some differences. Differences in tuned BLAS libraries across
each OS can also account for performance differences. You should look
into using the one provided by R across each to enable more balanaced
comparisons.
I am also not sure of what differences across each Windows test is
attributable to WinXP versus Vista. There are others here with more
insight into that aspect of things.
While there is a consistent increase for Windows timing as you have
above, some of the differences may be due to not really having a
(pardon the pun) "Apples to Apples" comparison across each platform.
HTH,
Marc Schwartz