Skip to main content
Modify Slurm configuration files to optimize scheduling, resource allocation, and job management for your GPU cluster.

Prerequisites

  • kubectl CLI installed and configured
  • Kubeconfig downloaded from your cluster
  • Access to your cluster’s Slurm namespace

Configuration Files

Your Slurm cluster configuration is stored in a Kubernetes ConfigMap with four main files:

Edit Configuration

Update ConfigMap

Edit the ConfigMap directly:
This opens the ConfigMap in your default editor. Make your changes and save. Alternative method:

Restart Components

After editing the ConfigMap, restart the appropriate components: For slurm.conf changes:
For gres.conf or plugstack.conf changes:

Verify Changes

Configuration Examples

Configure GPU Resources

Edit gres.conf to define GPU resources:

Modify Partitions

Edit the partition section in slurm.conf:

Tune Scheduler

Adjust scheduler parameters in slurm.conf:

Update Resource Allocation

Modify resource allocation settings:

Enable Cgroup Limits

Edit cgroup.conf to enforce resource limits:
Then update slurm.conf:

Troubleshooting

Configuration Not Applied

Syntax Errors

Pods Not Restarting

Jobs Failing After Changes

Quick Reference

View Configurations

Restart Components

Monitor Cluster

Best Practices

  • Back up configurations before making changes
  • Test in development before applying to production
  • Make incremental changes to isolate issues
  • Document your changes for future reference
  • Monitor logs and jobs after applying changes
  • Use version control to track configuration changes
Slurm compute nodes run as pods (not daemonsets). When you delete compute node pods, they will automatically restart with the new configuration. Running jobs may be affected during the restart.

Additional Resources