How gonzalorodrigo/scsfsimulator works
Major system components
• Controller (slurmctld): This is the heart of the Slurm system that handles job scheduling, resource allocation, node management, and overall state control.
• Node Daemons (slurmd): Running on each compute node, these components execute assigned jobs and report node state.
• Database Daemon (slurmdbd): A separate process that manages job accounting and other historical data.
• Job Step Daemon (slurmstepd): Handles the launching and tracking of sub-tasks or job steps once jobs are dispatched.
• CLI Tools and APIs: The various command-line tools (e.g., sbatch, sinfo, srun, scancel, etc.) and the API/library (e.g., the “src/api” and “slurm” include directories) provide interfaces for users or external integrations to interact with the system.
• Plugins Infrastructure: A major design element is the extensive plugins structure (organized in src/plugins). These include modules for accounting storage, authentication, scheduling (which may include specialized implementations for specific hardware such as Cray or BlueGene), MPI support, GPU/accelerator support, and others. This extensibility is key to Slurm’s design.
• Simulation and Workflow Layers: In this fork there is an added simulation component (ScSf) and the WoAS technique that work on top of the normal Slurm scheduling infrastructure. These simulate live resource behavior and user job patterns.
• Supporting and Auxiliary Components: There are directories for configuration (etc/), documentation (doc/), autotools and build configuration (auxdir/), and a testsuite (testsuite/) which aids in validating the system.
Relationships and interactions
• Users submit jobs using various CLI tools which interact with the central controller (slurmctld) via the Slurm API.
• The controller communicates with one or more compute nodes by sending instructions to the slurmd daemons.
• Job steps are managed by slurmstepd, often coordinated by slurmctld.
• The slurmctld also interacts with the database daemon (slurmdbd) for accounting and historical records.
• The plugin framework is used by many of these components (especially in scheduling, authentication, and accounting) to dynamically extend functionality without hardcoding vendor-specific or domain-specific logic.
• In the simulated version, the ScSf simulator overlays a simulated resource environment (with its own resource “state” and “time” adjustments) and uses WoAS to incorporate workflow aware scheduling decisions.
• Communication between these components (API calls, messaging, configuration reads via files found in etc/ and src/common/ etc.) should be clearly indicated.
Architectural Patterns and Design Principles
• Modularity is central – the code is broken into modules for each major functionality (controller, node daemon, plugins, CLI tools, etc.).
• Plugin-based extensibility is a clear design pattern, with clearly defined interfaces and separate directories/files for each plugin type.
• A client-server style interaction is visible between users (via CLI or scripts) and a central scheduling controller.
• The system is distributed – the separation between a central controller and multiple node daemons reflects a fault-tolerant and scalable distributed architecture.
Reminder
• Both the runtime system (how jobs flow through the system) and the extensibility architecture (plugin-based modules) that set Slurm apart.