RStudio Desktop (Windows 10) vs. RStudio Server (Linux)

Hello, dear Community!

I am using RStudio Desktop (latest preview version) in a Dell Laptop with the following specs:


I also use the RStudio Server (latest preview version) in a a Ubuntu server (18.04.5 LTS) with the following specs:

64 processors image
128 GB RAM

I tested several types of scrips (web scraping; modeling...) the Dell Laptop is always faster. Can you provide me some guidance? I always set in the server session options(Ncpus = parallel::detectCores(all.tests = FALSE, logical = TRUE)-2) to use the maximum number of available Cpus minus 2.

This is reasonably normal behaviour, given typical laptop and server specifications.

The reason that your code runs faster on a laptop is most likely because your laptop has a faster CPU clock cycle than the server.

Running your code on a server does not automatically utilise more CPUs, since the majority of R code will run in a single thread. To benefit from multiple CPUs, you will have to use R code that is explicitly parallel (although some R packages will do this for you, depending on the algorithm in use).

The real benefit of running your code on a server is that multiple people can run their code on the same server, without interfering with one another.

The reason that servers are typically slower than laptops is because the server needs to be able to maintain that level of performance continuously, even if all 64 CPUs are in use all the time.

I hope this helps.


Thank you, I will be aware if the packages I use have a parallel="multicore" option. Just for clarity, my laptop CPU base speed:


While the CPUs in the server...


Thank you.

Maybe you'll find chapter this chapter on Parallel Computation useful, it's in R Programming for Data Science by Roger D. Peng:

1 Like

Useful, thank you. I had this book, but I noticed that this chapter was later on added.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.