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
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.