RStudio Desktop on my laptop faster to RStudio Server in a powerful server

Hello,

I am running RStudio Desktop 1.25.5042 my windows laptop (4 cores, 12Gb RAM) and the attached scripts ends after 4 mins 31 seconds.

I tried the same script with the same amount of data in a Linux Server (8 cores 32 Gb RAM) and the scripts takes 47 minutes 49 seconds!!!!

R Studio Server version is 1.3.959 installed from this docker image https://hub.docker.com/r/rocker/rstudio/

I don' t understand why the same script with exactly the same amount of data (70Mb) is so slow in a more powerful server, anyone has an idea about what is the root of this problem?

Thanks in advance,

rm(list = ls())

library(tidyverse)
library(scorecard)
library(tictoc)

load("base_1.RData")

woe_toy_0 = woebin(data,y='codtarget',var_skip='CIF_KEY',stop_limit = 0.02, 
                   count_distr_limit = 0.02,max_bin_num = 100, check_cate_num = F, 
                   no_cores = parallel::detectCores())

rm(list = ls())

I'm not familiar with that specific package but one explanation could be that the function is not parallelized so you effectively run the script in just one core regardless of how many you have available on the system and usually laptop cores are faster than server cores (individually). If this is the case you could take advantage of the extra cores in the server by manually parallelizing your code (if possible).

1 Like

I think is not the problem because all the CPUs are running almost at 100% the whole process
image

You could try using benchmarkme (CRAN) to profile both systems

1 Like

Thanks, I will try that right now! I am totally new to R btw :slight_smile:

Well, I am stuck, I cannot find the reason why my laptop is faster than the server :frowning:

Any ideas?

Can you provide more information about both systems? you said your laptop has 4 cores but they usually support 2 threads per core so you would get 8 "virtual" cores, matching the core count in the server so if the CPU frequency is higher in your laptop that would explain the faster performance.

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