It’s been a while since I last used brms, so I’m not sure whether this is a new or an old issue. However, I’ve noticed that brms is using all the available RAM. After a few hundred iterations, it becomes fully occupied. I tried running the program from my laptop, which has 32 GB of RAM, and it was filled after approximately 300 iterations. I also tried from my office computer, which has 254 GB of RAM. It filled up as well after a while, forcing me to stop the sampling. This issue occurred with different models, including the simple example below.
Here are the specs of my laptop:
Platform: x86_64-pc-linux-gnu (64-bit)
Ubuntu 22.04.2 LTS
RSstudio 2023.06.0, Build 421
R version 4.3.1
Thank you in advance for any input or advice you may have.
# brms: An R Package for Bayesian Multilevel Models using Stan # https://cran.r-project.org/web/packages/brms/vignettes/brms_overview.pdf # 4.1. A worked example library("brms") data("kidney") head(kidney, n = 3) # 4.2. Fitting models with brms fit1 <- brm(formula = time | cens(censored) ~ age * sex + disease + (1 + age|patient), data = kidney, family = lognormal(), prior = c(set_prior("normal(0,5)", class = "b"), set_prior("cauchy(0,2)", class = "sd"), set_prior("lkj(2)", class = "cor")), warmup = 1000, iter = 2000, chains = 4, control = list(adapt_delta = 0.95))