问题
On the right hand side is the result from EC2 instance with 36 cores and 64GB RAM while on the left is my laptop with 8 cores and 8GB RAM.
I'm new to running R on AWS EC2 instance, so probably I need to configure my R in order to make use of the EC2 instance raw compute power.
Could someone please advise on how or is there anything that I miss here?
Thanks!
回答1:
I found the better answer here.
Quite disappointing with the unnecessary downvotes.
https://github.com/csantill/RPerformanceWBLAS/blob/master/RPerformanceBLAS.md
We frequently hear that R is slow, if your code makes heavy usage of vector/matrix operations you will see significant performance improvements.
The precompiled R distribution that is downloaded from CRAN makes use of the reference BLAS/LAPACK implementation for linear algebra operations, These implementations are built to be stable and cross platform compatible but are not optimized for performance. Most R programmers use these default libraries and are unaware that highly optimized libraries are available and switching to these can have a significant perfomance improvement.
来源:https://stackoverflow.com/questions/58516577/r-with-36-cores-is-much-slower-than-r-with-8-cores