[R-sig-Geo] Surprising performance difference across computers with raster operation

Michael Treglia mtreglia at gmail.com
Fri Sep 2 19:18:12 CEST 2016


Hi All,

Was doing some work across a couple of different computers with the raster
package, and noticed a pretty considerable difference in processing time to
simply merge two Bioclim tiles (reproducible code below, plus system.time()
and sessionInfo() details). Both machines have plenty of RAM and use an SSD
for temp storage and program files; main differences are processor, and OS
(Win 7 vs Win 10, both x64).  Running R 3.3.1 on both, with raster 2.5-8.
I'd be curious to hear if folks have an idea what might contributes to this
difference - is it OS?

The machine with the slower processor running Windows 10 took about 1/2 the
amount of total time for the operation.  Out of curiosity, I also tried
this operation on Ubuntu Virtual Machines I've set up on both computers -
those times were pretty comparable to one another,but much faster than
either Windows setup. (see below).

This isn't a problem, but obviously might inform what environment I run
some big jobs in...

Thanks for any feedback. Best,
mike t


Sample Code:
bioclE <- raster::getData('worldclim', var='bio', res=0.5, lat=13.20884,
lon=-85.33288)
bioclW <- raster::getData('worldclim', var='bio', res=0.5, lat=13.20884,
lon=-93.7)
system.time(biocl <- raster::merge(bioclW, bioclE))


****Computer 1 - Windows 7, faster processor

> system.time(biocl <- raster::merge(bioclW, bioclE))
   user  system elapsed
 208.98   22.33  231.54

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C

[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] raster_2.5-8 sp_1.2-3

loaded via a namespace (and not attached):
[1] rgdal_1.1-10    tools_3.3.1     Rcpp_0.12.6     grid_3.3.1
 lattice_0.20-33



****Computer 2 - Windows 10, slower processor
> system.time(biocl <- raster::merge(bioclW, bioclE))
   user  system elapsed
  91.08   28.04  119.42

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 10586)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] sp_1.2-3        Rcpp_0.12.6     raster_2.5-8    grid_3.3.1
[5] lattice_0.20-33



****Computer 1 with Ubuntu VM

> system.time(biocl <- raster::merge(bioclW, bioclE))
   user  system elapsed
 77.404   5.794  83.688

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_3.3.1     sp_1.2-3        Rcpp_0.12.6     raster_2.5-8
[5] grid_3.3.1      lattice_0.20-33 tcltk_3.3.1



****Computer 2 with Ubunutu VM

> system.time(biocl <- raster::merge(bioclW, bioclE))
   user  system elapsed
 74.696   0.000  76.060

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.1 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_3.3.1     sp_1.2-3        Rcpp_0.12.6     raster_2.5-8
[5] grid_3.3.1      lattice_0.20-33 tcltk_3.3.1

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list