@@ -737,6 +737,30 @@ execution:
737737 # clusters. These don't need to be available on the Galaxy server
738738 # itself.
739739
740+ # Under most runners, Galaxy will set the `$GALAXY_SLOTS` environment variable in the
741+ # tool execution environment to the number of cores allocated to the job by the
742+ # scheduler. Tools can use this to control how many threads or processes they start.
743+ #
744+ # Under some runners, most notably Slurm and SGE, Galaxy will set environment
745+ # variables related to the amount of memory allocated to the job by the scheduler, if
746+ # possible. These are `$GALAXY_MEMORY_MB`, `$GALAXY_MEMORY_GB`,
747+ # `$GALAXY_MEMORY_MB_PER_SLOT`, and `$GALAXY_MEMORY_GB_PER_SLOT`. You can override
748+ # these on a per-environment basis as shown below.
749+ #
750+ # Additionally, you can specify two variables that will indicate a tool should use
751+ # less memory than allocated. Typically some overhead is required or else the Linux
752+ # OOM Killer will simply kill the job's processes if they exceed they amount of memory
753+ # allocated by the scheduler.
754+ job_vars_example :
755+ runner : drmaa
756+ env :
757+ # Sets `$GALAXY_MEMORY_MB` to 2GB less than what has been allocated
758+ - name : GALAXY_MEMORY_MB_OVERHEAD
759+ value : " 2048"
760+ # Floor value for `$GALAXY_MEMORY_MB` if (allocated - overhead < floor)
761+ - name : GALAXY_MEMORY_MB_FLOOR
762+ value : " 1024"
763+
740764 # Following three environments demonstrate setting up per-job temp directory handling.
741765 # In these cases TEMP, TMP, and TMPDIR will be set for each job dispatched to these
742766 # environments.
0 commit comments