Disabling or changing CPU, GPU and RStudio idle timeout
A cluster administrator can disable or change the default idle timeout of CPU, GPU or RStudio environment runtimes on the shared file system if this is desired.
A change to the idle shutdown setting will only apply for runtimes that are started after the file was changed. Whether a runtime has become idle is checked every 8 minutes, which means that a runtime might be stopped later than the defined idle timeout.
Note that the idle timeout value for RStudio and notebooks runtimes do not have to be the same. Also, you do not have to specify a timeout value for both.
Changing this idle timeout doesn't affect jobs. It only applies to interactive content.
To disable the idle timeout directly on the shared file system:
- Create a file named
idleshutdown.configand add the following content. The value that you add foridleTimeBeforeShutdowneither enables or disables the idle timeout functionality. The value-1disables idle timeout. Any other value or an empty file enables it.{ "jupyterNotebook": { "idleTimeBeforeShutdown": -1 }, "rStudio": { "idleTimeBeforeShutdown": -1 } } - To change the idle shutdown time, replace
-1with the idle timeout value in seconds that you want to use for runtimes. All CPU, GPU or RStudio runtimes started after this change will honor this setting. - Copy
idleshutdown.configto /mnt/user-home/_global_/config/.idleshutdown/. You can use theasset-files-apipod for this:oc cp idleshutdown.config $(oc get pods | grep asset-files-api | head -1 | awk '{print $1}'):/mnt/user-home/_global_/config/.idleshutdown/
Disabling or changing idle timeout of a pod
You can create a pod and change the timeout value in the configuration file on the pod.
- Dependent on your cluster policy, identify which image to use for this pod. You need to be able to edit files in this pod.
- Create a pod spec with the following volume and volume
mounts:
volumeMounts: - mountPath: /cc-home/_global_/config/.idleshutdown name: cc-home subPath: _global_/config/.idleshutdownvolumeMountsrequires the followingvolumessection:volumes: - name: cc-home persistentVolumeClaim: claimName: cc-home-pvc - Start a pod with these volume settings and exec into the pod.
- Navigate to /cc-home/_global_/config/.idleshutdown.
- Edit or create the file
idleshutdown.configand add the following content:{ "jupyterNotebook": { "idleTimeBeforeShutdown": -1 }, "rStudio": { "idleTimeBeforeShutdown": -1 } } - Change
-1to the idle timeout value in seconds that you want to use for runtimes. All CPU, GPU or Rstudio runtimes started after this change will honor this setting.