<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.snu.edu.in/index.php?action=history&amp;feed=atom&amp;title=Magus02%2FScheduling_Basics</id>
	<title>Magus02/Scheduling Basics - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.snu.edu.in/index.php?action=history&amp;feed=atom&amp;title=Magus02%2FScheduling_Basics"/>
	<link rel="alternate" type="text/html" href="https://wiki.snu.edu.in/index.php?title=Magus02/Scheduling_Basics&amp;action=history"/>
	<updated>2026-11-04T19:44:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>https://wiki.snu.edu.in/index.php?title=Magus02/Scheduling_Basics&amp;diff=1182&amp;oldid=prev</id>
		<title>Deepak: new</title>
		<link rel="alternate" type="text/html" href="https://wiki.snu.edu.in/index.php?title=Magus02/Scheduling_Basics&amp;diff=1182&amp;oldid=prev"/>
		<updated>2026-04-20T06:39:08Z</updated>

		<summary type="html">&lt;p&gt;new&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DISPLAYTITLE:Scheduling Basics — Magus02 HPC}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#0d1b2a;border:1px solid #1e3a5a;border-radius:8px;padding:12px 18px;margin-bottom:20px;font-size:13px;font-family:monospace;color:#5ba3d9;&amp;quot;&amp;gt;&lt;br /&gt;
📍 [[Magus02/Knowledge_Base|Magus02 Knowledge Base]] → Basics → Scheduling Basics&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains the fundamental concepts behind batch scheduling on HPC clusters. For specific Slurm commands and job types, see [[Magus02/Batch_Scheduler|Batch Scheduler]].&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What is a Batch Scheduler? ==&lt;br /&gt;
&lt;br /&gt;
On Magus02, users do not run calculations directly and interactively on the compute nodes (as they would on a laptop). Instead, they submit '''batch jobs''' to the '''Slurm scheduler'''.&lt;br /&gt;
&lt;br /&gt;
The scheduler:&lt;br /&gt;
* Stores submitted jobs in a queue&lt;br /&gt;
* Evaluates each job's resource requirements and priority&lt;br /&gt;
* Distributes jobs to suitable compute nodes when resources are available&lt;br /&gt;
* Manages all 57+ compute nodes making up 98%+ of the cluster&lt;br /&gt;
&lt;br /&gt;
The '''login nodes''' are for compiling code, editing files, and submitting jobs. The '''compute nodes''' (accessed only through the scheduler) are where actual computation happens.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#2a1a00;border-left:4px solid #f0c040;border-radius:6px;padding:14px 18px;margin:16px 0;font-size:14px;color:#d4b870;&amp;quot;&amp;gt;&lt;br /&gt;
⚠️ &amp;lt;strong&amp;gt;Do not run compute jobs on login nodes.&amp;lt;/strong&amp;gt; Heavy workloads on login nodes slow the system for all users and may result in your processes being killed. Always use Slurm for anything that takes more than a few seconds.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How a Batch Job Works ==&lt;br /&gt;
&lt;br /&gt;
# You write a '''jobscript''' — a shell script containing your commands and resource requests&lt;br /&gt;
# You submit it with &amp;lt;code&amp;gt;sbatch jobscript.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
# Slurm adds it to a queue and waits for enough free resources&lt;br /&gt;
# When resources become available, Slurm runs your job on compute nodes&lt;br /&gt;
# Output is written to files you specified in the script&lt;br /&gt;
&lt;br /&gt;
You specify three key resources:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Resource !! Slurm Flag !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Time || &amp;lt;code&amp;gt;--time=HH:MM:SS&amp;lt;/code&amp;gt; || Maximum runtime. Job is killed if it exceeds this.&lt;br /&gt;
|-&lt;br /&gt;
| Cores || &amp;lt;code&amp;gt;--ntasks&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--cpus-per-task&amp;lt;/code&amp;gt; || Number of CPU cores needed.&lt;br /&gt;
|-&lt;br /&gt;
| Memory || &amp;lt;code&amp;gt;--mem=XG&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--mem-per-cpu=XG&amp;lt;/code&amp;gt; || RAM needed. Job may crash or not start if underspecified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Scheduling Algorithms ==&lt;br /&gt;
&lt;br /&gt;
Modern schedulers like Slurm use a combination of strategies:&lt;br /&gt;
&lt;br /&gt;
=== First Come, First Served (FCFS) ===&lt;br /&gt;
&lt;br /&gt;
Jobs run in the order they were submitted. Simple and fair, but small jobs can wait behind large ones unnecessarily.&lt;br /&gt;
&lt;br /&gt;
=== Shortest Job First ===&lt;br /&gt;
&lt;br /&gt;
Jobs with shorter declared runtimes get priority. Very long-running jobs may be delayed significantly.&lt;br /&gt;
&lt;br /&gt;
=== Backfilling ===&lt;br /&gt;
&lt;br /&gt;
Slurm's default strategy. It maintains FCFS priority but allows shorter jobs to ''fill gaps'' in the schedule without delaying higher-priority jobs. This means short jobs typically see short wait times even when the cluster is busy.&lt;br /&gt;
&lt;br /&gt;
To benefit from backfilling, '''request an accurate runtime''' — not too long (wastes priority) and not too short (job gets killed before finishing).&lt;br /&gt;
&lt;br /&gt;
== Magus02 Queue Structure ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;font-size:13px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;background:#0d1b2a;color:#94a8be;&amp;quot; | Queue&lt;br /&gt;
! style=&amp;quot;background:#0d1b2a;color:#94a8be;&amp;quot; | Processor&lt;br /&gt;
! style=&amp;quot;background:#0d1b2a;color:#94a8be;&amp;quot; | Min Cores&lt;br /&gt;
! style=&amp;quot;background:#0d1b2a;color:#94a8be;&amp;quot; | Max Cores&lt;br /&gt;
! style=&amp;quot;background:#0d1b2a;color:#94a8be;&amp;quot; | Max Nodes&lt;br /&gt;
! style=&amp;quot;background:#0d1b2a;color:#94a8be;&amp;quot; | Wall Time&lt;br /&gt;
! style=&amp;quot;background:#0d1b2a;color:#94a8be;&amp;quot; | Max Cores/User&lt;br /&gt;
! style=&amp;quot;background:#0d1b2a;color:#94a8be;&amp;quot; | Max Pending&lt;br /&gt;
! style=&amp;quot;background:#0d1b2a;color:#94a8be;&amp;quot; | Max Running&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;medium&amp;lt;/code&amp;gt; || AMD EPYC 7763 || 32 || 128 || 77 || 1 week || 512 || 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;small&amp;lt;/code&amp;gt; || AMD EPYC 7043 || 8 || 32 || 16 || 1 month || 128 || 2 || 4&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;high_mem&amp;lt;/code&amp;gt; || AMD EPYC 7543 || 32 || 256 || 12 || 2 weeks || 1024 || 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;large&amp;lt;/code&amp;gt; || AMD EPYC 7763 || 64 || 256 || 24 || 2 weeks || 1024 || 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;GPU&amp;lt;/code&amp;gt; || Intel Xeon Platinum 8368 || 16 || 16 || 4 || 1 week || 32 || 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;low/long&amp;lt;/code&amp;gt; || AMD EPYC 7763 || 32 || 1024 || All || 1 month || 1024 || 2 || 8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#0d1a0d;border-left:4px solid #39d353;border-radius:6px;padding:14px 18px;margin:16px 0;font-size:14px;color:#80b880;&amp;quot;&amp;gt;&lt;br /&gt;
✅ &amp;lt;strong&amp;gt;Queue selection guide:&amp;lt;/strong&amp;gt;&lt;br /&gt;
* Testing / debugging → &amp;lt;strong&amp;gt;small&amp;lt;/strong&amp;gt;&lt;br /&gt;
* Standard multi-node runs → &amp;lt;strong&amp;gt;medium&amp;lt;/strong&amp;gt;&lt;br /&gt;
* Large production jobs → &amp;lt;strong&amp;gt;large&amp;lt;/strong&amp;gt;&lt;br /&gt;
* Gaussian / large in-memory apps → &amp;lt;strong&amp;gt;high_mem&amp;lt;/strong&amp;gt;&lt;br /&gt;
* GPU workloads (CUDA) → &amp;lt;strong&amp;gt;GPU&amp;lt;/strong&amp;gt;&lt;br /&gt;
* Long, low-priority jobs → &amp;lt;strong&amp;gt;low/long&amp;lt;/strong&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [[Magus02/Batch_Scheduler|Batch Scheduler — Job Submission Guide]]&lt;br /&gt;
* [[Magus02/FAQ_Batch_Jobs|FAQ: Batch Jobs]]&lt;br /&gt;
* [[Magus02|Magus02 Main Page — Queue Details]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-family:monospace;font-size:11px;color:#484f58;text-align:right;&amp;quot;&amp;gt;&lt;br /&gt;
[[Magus02/Knowledge_Base|↑ Back to Knowledge Base]] · Maintained by HPC Administration · wiki.snu.edu.in&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deepak</name></author>
	</entry>
</feed>