where to tune R Shiny key parameters

.Hi Team,

How are these parameters tuned?
I assume at the very least we’re going to be increasing Max Processes to 10-15 on production?

Ideally we would have perfvis and we could profile the app. Unfortunately we’re going to have to rely on Jmeter only.
Has anyone looked at these 3 key parameters on each environment?

Whats the recommendation?

Max Connections (maxRequestsPerProc) - The maximum number of connections per R process. Default value is 20.
Pick a small number if your application involves heavy computation. Pick a larger number if your application takes a long time to load, but after loading is very responsive to user selections.

Load Factor (loadFactor) - Determines how aggressively new R processes will be created. This parameter can take on values from 0-1. A value close to 0 means new processes will be spun up aggressively so that the number of connections per process will be small. A value close to 1 means the number of connections per process will close to max connections. Default value is 0.9.
Pick a small number if your application loads quickly but involves expensive computation. Pick a number closer to 1 if your application loads slowly, but after loading is fast OR if you want to minimize the amount of memory.

Max Processes (maxProc) - Determines the maximum number of R processes that will be created. Max processes x max connections = total number of connections to an application. Default value is 3.
Pick a value that will support the expected number of concurrent users.

Example Configuration:

server {
  listen 3838;
  ... #any other configuration options like authentication
  location /myApp {
      app_dir /srv/shiny-server/myApp
      # Utilization Scheduler
      utilization_scheduler  20 0.9 3;  # 20 max connections, 0.9 load factor, 3 max processes
  # Include the admin dashboard to track performance metrics
  admin 4151 {
      required_user admin; 


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