- if use_disk_cache and "keep_cache_disk" not in runtime_constraints:
- # Cache size wasn't explicitly set so calculate a default
- # based on 2x RAM request or 1 GB per core, whichever is
- # smaller. This is to avoid requesting 100s of GB of disk
- # cache when requesting a node with a huge amount of RAM.
- runtime_constraints["keep_cache_disk"] = min(runtime_constraints["ram"] * 2, runtime_constraints["vcpus"] * (1024*1024*1024))
-