LSF Handbook
  • 前言
  • 迁移通知
  • Part I 入门介绍篇
    • Chapter 1 LSF 介绍
      • 1.1 LSF 简介
      • 1.2 LSF 系统要求与兼容性
        • 操作系统支持
        • 主机选择
        • 服务器主机兼容性
        • 附加兼容性
        • API 兼容性
      • 1.3 局限性
      • 1.4 版本更新说明
      • 1.5 LSF 快速上手
  • Chapter 2 安装、升级与迁移
    • [2.1 在 UNIX 与 Linux 上安装](chapter2/section1/Install on UNIX and Linux.md)
      • [安装目录结构示意](chapter2/section1/Example installation directory structure.md)
      • [规划安装](chapter2/section1/Planning your installation.md)
        • [LSF 集群中的 EGO](chapter2/section1/EGO in the LSF cluster.md)
        • [主节点选择](chapter2/section1/Master host selection.md)
      • [准备系统进行安装](chapter2/section1/Preparing your systems for installation.md)
      • [安装新的 LSF 集群 (lsfinstall)](chapter2/section1/Installing a new LSF cluster.md)
      • [从 IBM Fix Central 中获取修订](chapter2/section1/Getting fixes from IBM Fix Central.md)
      • [配置集群](chapter2/section1/Configuring a cluster.md)
      • [以非 root 用户安装 LSF](chapter2/section1/If you install LSF as a non-root user.md)
      • [往集群中添加节点](chapter2/section1/Adding hosts to the cluster.md)
      • [LSF HPC 特征](chapter2/section1/LSF HPC features.md)
        • [可选的LSF HPC 功能配置](chapter2/section1/Optional LSF HPC features configuration.md)
      • [注册服务端口](chapter2/section1/Registering service ports.md)
      • install.config 文件
      • slave.config 文件
    • [2.2 在 Windows 上安装](chapter2/section2/Install on Windows.md)
      • [安装目录结构示意](chapter2/section2/Example installation directory structures.md)
      • [LSF 集群中的 EGO](chapter2/section2/EGO in the LSF cluster.md)
      • [准备系统进行安装](chapter2/section2/Planning and preparing your systems for installation.md)
        • [主节点选择](chapter2/section2/Master host selection.md)
        • [Entitlement files 文件](chapter2/section2/Entitlement files.md)
      • [安装新的 LSF 集群](chapter2/section2/Installing a new LSF cluster.md)
      • [安装参数快速参考](chapter2/section2/Installation parameter quick reference.md)
    • [2.3 使用 IBM Spectrum Cluster Foundation 安装 LSF](chapter2/section3/Install LSF with IBM Spectrum Clus
      • [使用 IBM Spectrum Cluster Foundation安装 LSF Suites 10.1.1](chapter2/section3/Install LSF Suites 10.1.1
        • 安装
          • [安装规划](chapter2/section3/subsection1/Installation planning.md)
            • [预安装路线图](chapter2/section3/subsection1/Preinstallation roadmap.md)
            • [安装路线图](chapter2/section3/subsection1/Installation roadmap.md)
          • [准备安装适用于工作组的IBM Spectrum LSF Suite或适用于 HPC 的 IBM Spectrum LSF Suite](chapter2/section3/subsection1/P
            • 要求
            • [配置和测试开关](chapter2/section3/subsection1/Configure and test switches.md)
            • [规划您的网络配置](chapter2/section3/subsection1/Plan your network configuration.md)
            • [在管理节点上安装和验证操作系统](chapter2/section3/subsection1/Installing and verifying the operating system on the
          • [执行安装](chapter2/section3/subsection1/Performing an installation.md)
            • [安装方法的对比](chapter2/section3/subsection1/Comparing installation methods.md)
            • [交互式安装路线图](chapter2/section3/subsection1/Interactive installation roadmaps.md)
              • [快速安装路线图](chapter2/section3/subsection1/Quick installation roadmap.md)
              • [自定义安装](chapter2/section3/subsection1/Custom installation.md)
            • [使用安装程序执行交互式安装](chapter2/section3/subsection1/Performing an interactive installation using the insta
          • [执行静默安装](chapter2/section3/subsection1/Performing a silent installation.md)
          • [验证安装](chapter2/section3/subsection1/Verifying the installation.md)
          • [安装后的第一步](chapter2/section3/subsection1/Taking the first steps after installation.md)
            • [安装后添加计算节点](chapter2/section3/subsection1/Adding compute nodes after installation.md)
              • [导入计算节点](chapter2/section3/subsection1/Import compute nodes.md)
              • [发现计算节点](chapter2/section3/subsection1/Discover compute nodes.md)
          • [解决安装问题](chapter2/section3/subsection1/Troubleshooting installation problems.md)
        • [集群部署](chapter2/section3/subsection2/Cluster deployment.md)
          • [安装后创建 LSF 工作组集群](chapter2/section3/subsection2/Creating an LSF Workgroups cluster after installatio
          • [安装后创建 LSF HPC 集群](chapter2/section3/subsection2/Creating an LSF HPC cluster after installation.md)
        • [设置高可用性环境](chapter2/section3/subsection3/Setting up a high availability environment.md)
          • [高可用性要求](chapter2/section3/subsection3/High availability requirements.md)
            • [准备共享文件系统](chapter2/section3/subsection3/Prepare a shared file system.md)
          • [准备高可用性](chapter2/section3/subsection3/Preparing high availability.md)
          • [启用高可用性环境](chapter2/section3/subsection3/Enable a high availability environment.md)
          • [验证高可用性环境](chapter2/section3/subsection3/Verifying a high availability environment.md)
          • [对高可用性环境启用进行故障排除](chapter2/section3/subsection3/Troubleshooting a high availability environment enab
        • [安装之后](chapter2/section3/subsection4/After installation.md)
          • [管理集群](chapter2/section3/subsection4/Managing a cluster.md)
            • [添加或删除服务器](chapter2/section3/subsection4/Add or remove servers.md)
            • [同步集群](chapter2/section3/subsection4/Synchronizing a cluster.md)
            • [删除集群](chapter2/section3/subsection4/Deleting a cluster.md)
            • [维护模式](chapter2/section3/subsection4/Maintenance mode.md)
            • [健康检查](chapter2/section3/subsection4/Health check.md)
          • [升级集群](chapter2/section3/subsection4/Upgrading a cluster.md)
            • [执行集群升级](chapter2/section3/subsection4/Performing a cluster upgrade.md)
            • [滚动或批量升级过程概述](chapter2/section3/subsection4/Rolling or bulk upgrade process overview.md)
        • [已知问题和局限性](chapter2/section3/subsection5/Known issues and limitations.md)
    • [2.4 升级和迁移](chapter2/section4/Upgrade and migrate.md)
      • [在UNIX和Linux上升级](chapter2/section4/subsection1/Upgrade on UNIX and Linux.md)
        • [在 UNIX 和 Linux 上升级 LSF](chapter2/section4/subsection1/Upgrade LSF on UNIX and Linux.md)
        • [从IBM Fix Central获取修订](chapter2/section4/subsection1/Getting fixes from IBM Fix Central.md)
      • [在Windows上迁移](chapter2/section4/subsection2/Migrate on Windows.md)
        • [在Windows上迁移LSF](chapter2/section4/subsection2/Migrate LSF on Windows.md)
  • Part II 基础操作篇
    • Chapter 3 用户操作基础
      • 3.1 LSF 概览
        • LSF 介绍
        • 集群组件
      • 3.2 LSF 细观
        • LSF 服务与进程
        • 集群通信方式
        • 容错
        • 安全
      • 3.3 作业负载管理
        • 作业生命周期
        • 作业提交
        • 作业调度
        • 节点选择
        • 作业运行环境
      • 3.4 启用 EGO 的 LSF
        • EGO 组件概览
        • 资源
        • LSF 资源共享
  • Chapter 4 管理员操作基础
    • 4.1 集群概览
      • 术语与概念
      • 集群特征
      • 文件系统、目录和文件
        • [示例目录结构](chapter4/section1/Example directory structures.md)
      • 重要的文件目录与配置文件
    • 4.2 使用 LSF
      • 开启、结束与重配置 LSF
        • [设置 LSF 环境](chapter4/section2/subsection1/Setting up the LSF environment.md)
        • [启动集群](chapter4/section2/subsection1/Starting your cluster.md)
        • [停止集群](chapter4/section2/subsection1/Stopping your cluster.md)
        • [重新配置集群](chapter4/section2/subsection1/Reconfiguring your cluster.md)
      • 检查 LSF 状态
        • [检查集群配置](chapter4/section2/subsection2/Check cluster configuration.md)
        • [检查集群状态](chapter4/section2/subsection2/Check cluster status.md)
        • [检查LSF批处理系统配置](chapter4/section2/subsection2/Check LSF batch system configuration.md)
        • [找出批处理系统状态](chapter4/section2/subsection2/Find out batch system status.md)
      • 运行作业
        • [提交批处理作业](chapter4/section2/subsection3/Submit batch jobs.md)
        • [显示作业状态](chapter4/section2/subsection3/Display job status.md)
        • [控制作业执行](chapter4/section2/subsection3/Control job execution.md)
        • [运行交互式任务](chapter4/section2/subsection3/Run interactive tasks.md)
        • [将应用程序与 LSF 集成](chapter4/section2/subsection3/Integrate your applications with LSF.md)
      • 管理用户、节点与队列
        • [使您的集群可供用户使用](chapter4/section2/subsection4/Making your cluster available to users.md)
        • [将主机节点添加到集群](chapter4/section2/subsection4/Adding a host to your cluster.md)
        • [从集群中移除主机节点](chapter4/section2/subsection4/Removing a host from your cluster.md)
        • [添加队列](chapter4/section2/subsection4/Adding a queue.md)
        • [移除队列](chapter4/section2/subsection4/Removing a queue.md)
      • 配置 LSF 启动
        • [允许 LSF 管理员启动 LSF 守护程序](chapter4/section2/subsection5/Allowing LSF administrators to start LSF daemo
        • [设置 LSF 自动启动](chapter4/section2/subsection5/Setting up automatic LSF startup.md)
      • 管理软件许可证及其他共享资源
    • 4.3 LSF 排错
      • 常见 LSF 问题
      • LSF 错误信息
  • Part III 作业调度篇
    • Chapter 5 作业调度管理
      • 5.1 关于 IBM Spectrum LSF
        • LSF 集群,作业与队列
        • 节点
        • LSF 守护程序
        • 批处理作业和任务
        • 主机类型和主机型号
        • 用户和管理员
        • 资源
        • 作业生命周期
      • 5.2 作业运行
        • bsub 提交作业
          • [将作业提交到特定队列](chapter5/section2/subsection1/About submitting a job to a specific queue.md)
          • [查看可用队列](chapter5/section2/subsection1/View available queues.md)
          • [将作业提交到队列](chapter5/section2/subsection1/Submit a job to a queue.md)
          • [提交与项目关联的作业 (bsub -P)](chapter5/section2/subsection1/Submit a job associated with a project.md)
          • [提交与用户组关联的作业 (bsub -G)](chapter5/section2/subsection1/Submit a job associated with a user group.md)
          • [提交有作业名的作业 (bsub -J)](chapter5/section2/subsection1/Submit a job with a job name.md)
          • [提交作业到服务类 (bsub -sla)](chapter5/section2/subsection1/Submit a job to a service class.md)
          • [在作业组下提交作业 (bsub -g)](chapter5/section2/subsection1/Submit a job under a job group.md)
          • [提交带有 JSON 文件的作业 (bsub -json)](chapter5/section2/subsection1/Submit a job with a JSON file.md)
          • [提交带有 YAML 文件的作业 (bsub -yaml)](chapter5/section2/subsection1/Submit a job with a YAML file.md)
          • [提交带有 JSDL 文件的作业 (bsub -jsdl)](chapter5/section2/subsection1/Submit a job with a JSDL file.md)
        • [修改正在等待的作业 (bmod)](chapter5/section2/subsection2/Modify pending jobs.md)
        • [修改正在运行的作业](chapter5/section2/subsection3/Modify running jobs.md)
        • [关于控制作业](chapter5/section2/subsection4/About controlling jobs.md)
          • [杀掉作业 (bkill)](chapter5/section2/subsection4/Kill a job.md)
          • [关于暂停和恢复作业 (bstop and bresume)](chapter5/section2/subsection4/About suspending and resuming jobs.md)
          • [将作业移到队列底部 (bbot)](chapter5/section2/subsection4/Move a job to the bottom of a queue.md)
          • [将作业移到队列顶部 (btop)](chapter5/section2/subsection4/Move a job to the top of a queue.md)
          • [控制作业组中的作业](chapter5/section2/subsection4/Control jobs in job groups.md)
          • [将作业提交给特定主机](chapter5/section2/subsection4/Submit a job to specific hosts.md)
          • [提交具有特定资源的作业](chapter5/section2/subsection4/Submit a job with specific resources.md)
          • [队列和主机首选项](chapter5/section2/subsection4/Queues and host preference.md)
          • [指定不同级别的主机首选项](chapter5/section2/subsection4/Specify different levels of host preference.md)
          • [提交具有资源需求的作业](chapter5/section2/subsection4/Submit a job with resource requirements.md)
          • [通过 SSH X11 转发提交作业](chapter5/section2/subsection4/Submit a job with SSH X11 forwarding.md)
        • [将 LSF 与非共享文件空间一起使用](chapter5/section2/subsection5/Using LSF with non-shared file space.md)
          • 操作符
        • [关于资源预约](chapter5/section2/subsection6/About resource reservation.md)
          • [查看资源信息](chapter5/section2/subsection6/View resource information.md)
          • [提交具有资源需求的作业](chapter5/section2/subsection6/Submit a job with resource requirements.md)
          • [提交有开始或终止时间的作业](chapter5/section2/subsection6/Submit a job with start or termination times.md)
          • [提交具有计算单元资源要求的作业](chapter5/section2/subsection6/Submit a job with compute unit resource requirements
        • [设置等待时间限制](chapter5/section2/subsection7/Set pending time limits.md)
      • 5.3 作业监控
        • [查看有关作业的信息](chapter5/section3/subsection1/View information about jobs.md)
          • [查看未完成的工作](chapter5/section3/subsection1/View unfinished jobs.md)
          • [查看未完成的作业的摘要信息](chapter5/section3/subsection1/View summary information of unfinished jobs.md)
          • [查看所有作业](chapter5/section3/subsection1/View all jobs.md)
          • [查看正在运行的作业](chapter5/section3/subsection1/View running jobs.md)
          • [查看在等待作业的原因](chapter5/section3/subsection1/View pending reasons for jobs.md)
          • [查看作业暂停原因](chapter5/section3/subsection1/View job suspending reasons.md)
          • [查看详细的作业信息](chapter5/section3/subsection1/View detailed job information.md)
          • [查看作业组信息](chapter5/section3/subsection1/View job group information.md)
          • [监测 SLA 进程](chapter5/section3/subsection1/Monitor SLA progress.md)
          • [查看作业输出](chapter5/section3/subsection1/View job output.md)
          • [查看作业的时间顺序历史](chapter5/section3/subsection1/View chronological history of jobs.md)
          • [查看未在活动事件日志中列出的作业历史](chapter5/section3/subsection1/View history of jobs not listed in active event l
          • [查看作业历史记录](chapter5/section3/subsection1/View job history.md)
          • [查看作业提交环境](chapter5/section3/subsection1/View the job submission environment.md)
          • [更新间隔](chapter5/section3/subsection1/Update interval.md)
          • [作业级别信息](chapter5/section3/subsection1/Job-level information.md)
        • [显示资源分配限制](chapter5/section3/subsection2/Display resource allocation limits.md)
          • [查看有关资源分配限制的信息](chapter5/section3/subsection2/View information about resource allocation limits.md)
  • Part IV 集群运维篇
    • Chapter 6 LSF 集群维护管理
      • [6.1 集群管理要点](chapter6/section1/Cluster management essentials.md)
        • [集群的使用](chapter6/section1/subsection1/Work with your cluster.md)
          • Viewing cluster information
          • Control daemons
          • Commands to reconfigure your cluster
          • Live reconfiguration
          • Adding cluster adminstrators
        • [主机节点的使用](chapter6/section1/subsection2/Working with hosts.md)
          • Host status
          • View host information
          • Control hosts
          • Connect to an execution host or container
          • Host names
        • [作业目录与数据](chapter6/section1/subsection3/Job directories and data.md)
          • Directory for job output
          • Specify a directory for job output
          • Temporary job directories
          • About flexible job CWD
          • About flexible job output directory
        • [作业通知](chapter6/section1/subsection4/Job notification.md)
          • Disable job email
          • Size of job email
      • [6.2 监视集群操作和运行状况](chapter6/section2/Monitoring cluster operations and health.md)
        • [监控集群性能](chapter6/section2/subsection1/Monitor cluster performance.md)
        • [监控作业信息](chapter6/section2/subsection2/Monitor job information.md)
        • [使用外部脚本监控应用](chapter6/section2/subsection3/Monitor applications by using external scripts.md)
        • [查看资源信息](chapter6/section2/subsection4/View resource information.md)
        • [查看用户和用户组的信息](chapter6/section2/subsection5/View user and user group information.md)
        • [查看队列信息](chapter6/section2/subsection6/View queue information.md)
      • [6.3 管理作业执行](chapter6/section3/Managing job execution.md)
        • [管理作业执行](chapter6/section3/subsection1/Managing job execution.md)
        • [作业文件假脱机](chapter6/section3/subsection2/Job file spooling.md)
        • [作业数据管理](chapter6/section3/subsection3/Job data management.md)
        • [作业调度与分配](chapter6/section3/subsection4/Job scheduling and dispatch.md)
        • [控制作业执行](chapter6/section3/subsection5/Control job execution.md)
        • [交互式作业和远程任务](chapter6/section3/subsection6/Interactive jobs and remote tasks.md)
      • [6.4 配置和共享工作资源](chapter6/section4/Configuring and sharing job resources.md)
        • [关于 LSF 资源](chapter6/section4/subsection1/About LSF resources.md)
        • [在 LSF 中代表作业资源](chapter6/section4/subsection2/Representing job resources in LSF.md)
        • [基于计划的调度与预留](chapter6/section4/subsection3/Plan-based scheduling and reservations.md)
        • [在 LSF 中向用户分配作业资源](chapter6/section4/subsection4/Distributing job resources to users in LSF.md)
      • [6.5 GPU 资源](chapter6/section5/GPU resources.md)
        • [启用 GPU 资源](chapter6/section5/subsection1/Enabling GPU features.md)
        • [监控 GPU 资源](chapter6/section5/subsection2/Monitoring GPU resources.md)
        • [提交和监视 GPU 作业](chapter6/section5/subsection3/Submitting and monitoring GPU jobs.md)
        • [使用 ELIM 的 GPU 功能](chapter6/section5/subsection4/GPU features using ELIM.md)
      • [6.6 配置容器](chapter6/section6/Configuring containers.md)
        • [LSF 与 Docker](chapter6/section6/subsection1/LSF with Docker.md)
        • [LSF 与 Shifter](chapter6/section6/subsection2/LSF with Shifter.md)
        • [LSF 与 Singularity](chapter6/section6/subsection3/LSF with Singularity.md)
      • [6.7 高吞吐量作业负载管理](chapter6/section7/High throughput workload administration.md)
        • [作业包](chapter6/section7/subsection1/Job packs.md)
        • [作业阵列](chapter6/section7/subsection2/Job arrays.md)
        • [公平共享调度](chapter6/section7/subsection3/Fairshare scheduling.md)
        • [有保证的资源池](chapter6/section7/subsection4/Guaranteed resource pools.md)
        • [保留内存和许可证资源](chapter6/section7/subsection5/Reserving memory and license resources.md)
      • [6.8 并行作业负载管理](chapter6/section8/Parallel workload administration.md)
        • [运行并行作业](chapter6/section8/subsection1/Running parallel jobs.md)
        • [提前预定](chapter6/section8/subsection2/Advance reservation.md)
        • [公平共享调度](chapter6/section8/subsection3/Fairshare scheduling.md)
        • [作业检查点与重启动](chapter6/section8/subsection4/Job checkpoint and restart.md)
        • [可检查和可重新运行作业的作业迁移](chapter6/section8/subsection5/Job migration for checkpointable and rerunnable job
        • [可调整作业](chapter6/section8/subsection6/Resizable jobs.md)
      • [6.9 LSF 中的安全性](chapter6/section9/Security in LSF.md)
        • [安全注意事项](chapter6/section9/subsection1/Security considerations.md)
        • [保证 LSF 集群的安全](chapter6/section9/subsection2/Secure your LSF cluster.md)
      • [6.10 进阶设定](chapter6/section10/Advanced configuration.md)
        • [错误与事件记录](chapter6/section10/subsection1/Error and event logging.md)
        • [事件产生](chapter6/section10/subsection2/Event generation.md)
        • [自定义批处理命令消息](chapter6/section10/subsection3/Customize batch command messages.md)
        • [LIM 如何确定主机型号与类型](chapter6/section10/subsection4/How LIM determines host models and types.md)
        • [共享文件访问](chapter6/section10/subsection5/Shared file access.md)
        • [共享的配置文件](chapter6/section10/subsection6/Shared configuration file content.md)
        • [认证与授权](chapter6/section10/subsection7/Authentication and authorization.md)
        • [处理作业异常](chapter6/section10/subsection8/Handle job exceptions.md)
        • [调节 CPU 参数](chapter6/section10/subsection9/Tune CPU factors.md)
        • [为完成的作业设置清理周期](chapter6/section10/subsection10/Set clean period for DONE jobs.md)
        • [启用基于主机的资源](chapter6/section10/subsection11/Enable host-based resources.md)
        • [全局公平共享调度](chapter6/section10/subsection12/Global fairshare scheduling.md)
        • [在 EGO 中管理 LSF](chapter6/section10/subsection13/Manage LSF on EGO.md)
        • [负载共享 X 应用](chapter6/section10/subsection14/Load sharing X applications.md)
        • [将 LSF 与 Etnus TotalView 调试器一起使用](chapter6/section10/subsection15/Using LSF with the Etnus TotalView
        • [将 LSF 主机名和 IP 地址注册到 LSF 服务器](chapter6/section10/subsection16/Register LSF host names and IP address
      • [6.11 性能调优](chapter6/sectio11/Performance tuning.md)
        • [对集群进行调优](chapter6/section11/subsection1/Tune your cluster.md)
        • [实现性能和可扩展性](chapter6/section11/subsection2/Achieve performance and scalability.md)
      • [6.12 能量感知调度](chapter6/section12/Energy aware scheduling.md)
        • [管理主机电源状态](chapter6/section12/subsection1/Managing host power states.md)
        • [CPU 频率管理](chapter6/section12/subsection2/CPU frequency management.md)
        • [自动 CPU 频率选择](chapter6/section12/subsection3/Automatic CPU frequency selection.md)
      • [6.13 LSF 多集群功能](chapter6/section13/LSF multicluster capability.md)
        • [LSF 多集群功能概述](chapter6/section13/subsection1/Overview of LSF multicluster capability.md)
        • [设置 LSF 多集群功能](chapter6/section13/subsection2/Set up LSF multicluster capability.md)
        • [作业转发模型](chapter6/section13/subsection3/Job forwarding model.md)
        • [资源租赁模型](chapter6/section13/subsection4/Resource leasing model.md)
      • [6.14 LSF 高级版](chapter6/section14/LSF Advanced Edition.md)
        • [LSF 高级版概述](chapter6/section14/subsection1/Overview of LSF Advanced Edition.md)
        • [设置 LSF 高级版](chapter6/section14/subsection2/Set up LSF Advanced Edition.md)
        • [配置 LSF Advanced Edition 功能](chapter6/section14/subsection3/Configure LSF Advanced Edition features.
        • [使用 LSF 高级版](chapter6/section14/subsection4/Using LSF Advanced Edition.md)
        • [LSF 高级版参考](chapter6/section14/subsection5/Reference for LSF Advanced Edition.md)
  • Chapter 7 参考文档
    • 7.1 命令参考
      • bacct
      • badmin
      • bapp
      • battach
      • battr
      • bbot
      • bchkpnt
      • bclusters
      • bconf
      • bdata
        • Synopsis
        • Subcommands
          • cache
          • chgrp
          • chmod
          • tags
          • showconf
          • connections
          • admin
        • [Help and version display](chapter7/section1/subsection1/Help and version display.md)
        • [See also](chapter7/section1/subsection1/See also.md)
      • bentags
      • bgadd
      • bgdel
      • bgmod
      • bgpinfo
      • bhist
      • bhosts
      • bhpart
      • bimages
      • bjdepinfo
      • bjgroup
      • bjobs
        • Categories
          • Category: filter
          • Category: format
          • Category: state
        • Options
          • -A
          • -a
          • -aff
          • -app
          • -aps
          • -cname
          • -d
          • -data
          • -env
          • -fwd
          • -G
          • -g
          • -gpu
          • -hms
          • -hostfile
          • -Jd
          • -json
          • -Lp
          • -l
          • -m
          • -N
          • -noheader
          • -o
          • -P
          • -p
          • -pe
          • -pei
          • -pi
          • -plan
          • -prio
          • -psum
          • -q
          • -r
          • -rusage
          • -s
          • -script
          • -sla
          • -ss
          • -sum
          • -U
          • -UF
          • -u
          • -W
          • -WF
          • -WL
          • -WP
          • -w
          • -X
          • -x
          • job_id
          • -h
          • -V
        • Description
      • bkill
      • bladmin
      • blaunch
      • blcollect
      • blcstat
      • blhosts
      • blimits
      • blinfo
      • blkill
      • blparams
      • blstat
      • bltasks
      • blusers
      • bmgroup
      • bmig
      • bmod
      • bparams
      • bpeek
      • bpost
      • bqueues
      • bread
      • brequeue
      • bresize
      • bresources
      • brestart
      • bresume
      • brlainfo
      • brsvadd
      • brsvdel
      • brsvjob
      • brsvmod
      • brsvs
      • brsvsub
      • brun
      • bsla
      • bslots
      • bstage
        • bstage in
        • bstage out
        • [Help and version display](chapter7/section1/subsection3/Help and version display.md)
        • [See also](chapter7/section1/subsection3/See also.md)
      • bstatus
      • bstop
      • bsub
        • Categories
          • Category: io
          • Category: limit
          • Category: notify
          • Category: pack
          • Category: properties
          • Category: resource
          • Category: schedule
          • Category: script
        • Options
          • -a
          • -alloc_flags
          • -app
          • -ar
          • -B
          • -b
          • -C
          • -c
          • -clusters
          • -cn_cu
          • -cn_mem
          • -core_isolation
          • -csm
          • -cwd
          • -D
          • -data
          • -datachk
          • -datagrp
          • -E
          • -Ep
          • -e
          • -env
          • -eo
          • -eptl
          • -ext
          • -F
          • -f
          • -freq
          • -G
          • -g
          • -gpu
          • -H
          • -hl
          • -hostfile
          • -I
          • -Ip
          • -IS
          • -ISp
          • -ISs
          • -Is
          • -IX
          • -i
          • -is
          • -J
          • -Jd
          • -jobaff
          • -jsdl
          • -jsdl_strict
          • -jsm
          • -json
          • -K
          • -k
          • -L
          • -Lp
          • -ln_mem
          • -ln_slots
          • -M
          • -m
          • -mig
          • -N
          • -Ne
          • -n
          • -notify
          • -network
          • -nnodes
          • -o
          • -oo
          • -outdir
          • -P
          • -p
          • -pack
          • -ptl
          • -Q
          • -q
          • -R
          • -r
          • -rn
          • -rnc
          • -S
          • -s
          • -sla
          • -smt
          • -sp
          • -stage
          • -step_cgroup
          • -T
          • -t
          • -ti
          • -tty
          • -U
          • -u
          • -ul
          • -v
          • -W
          • -We
          • -w
          • -wa
          • -wt
          • -XF
          • -x
          • -yaml
          • -Zs
          • command
          • job_script
          • LSB_DOCKER_PLACE_HOLDER
          • -h
          • -V
        • Description
      • bswitch
      • btop
      • bugroup
      • busers
      • bwait
      • ch
      • gpolicyd
      • lim
      • lsacct
      • lsacctmrg
      • lsadmin
      • lsclusters
      • lseligible
      • lsfinstall
      • lsfmon
      • lsfrestart
      • lsfshutdown
      • lsfstartup
      • lsgrun
      • lshosts
      • lsid
      • lsinfo
      • lsload
      • lsloadadj
      • lslogin
      • lsltasks
      • lsmake
      • lsmon
      • lspasswd
      • lsplace
      • lsportcheck
      • lsrcp
      • lsreghost (UNIX)
      • lsreghost (Windows)
      • lsrtasks
      • lsrun
      • lstcsh
      • pam
      • patchinstall
      • pversions (UNIX)
      • pversions (Windows)
      • ssacct
      • ssched
      • taskman
      • tspeek
      • tssub
      • wgpasswd
      • wguser
    • 7.2 配置参考
      • 配置文件
        • cshrc.lsf and profile.lsf
        • hosts
        • install.config
        • lim.acct
        • lsb.acct
        • lsb.applications
        • lsb.events
        • lsb.globalpolicies
        • lsb.hosts
        • lsb.modules
        • lsb.params
        • lsb.queues
        • lsb.reasons
        • lsb.resources
        • lsb.serviceclasses
        • lsb.threshold
        • lsb.users
        • lsf.acct
        • lsf.cluster
        • lsf.conf
        • lsf.datamanager
        • lsf.licensescheduler
        • lsf.shared
        • lsf.sudoers
        • lsf.task
        • setup.config
        • slave.config
      • 环境变量
        • [为作业执行而设置的环境变量](chapter7/section2/subsection2/Environment variables set for job execution.md)
        • [调整大小通知命令的环境变量](chapter7/section2/subsection2/Environment variables for resize notification command.
        • [会话调度程序的环境变量](chapter7/section2/subsection2/Environment variables for session scheduler.md)
        • [用于数据来源的环境变量](chapter7/section2/subsection2/Environment variables for data provenance.md)
        • [环境变量参考](chapter7/section2/subsection2/Environment variable reference.md)
    • 7.3 API 参考
  • Part V 功能拓展篇
    • Chapter 8 LSF 拓展
      • LSF Session Scheduler
      • LSF with Rational ClearCase
      • LSF on Cray
      • LSF with Apache Spark
      • LSF with Apache Hadoop
      • LSF with Cluster Systems Manager
      • LSF with IBM Cloud Private
      • LSF Job Step Manager
      • Submitting jobs using JSDL
      • LSF Simulator
  • Chapter 9 最佳实践与建议
    • [Accounting file management](https://www.ibm.com/support/knowledgecenter/SSWRJV_10.1.0/best_practice
    • Allocating CPUs as blocks for parallel jobs
    • [Cleaning up parallel job execution problems](https://www.ibm.com/support/knowledgecenter/SSWRJV_10.
    • Configuring IBM Aspera as a data transfer tool
    • [Customizing job query output format](https://www.ibm.com/support/knowledgecenter/SSWRJV_10.1.0/best
    • [Defining external host-based resources](https://www.ibm.com/support/knowledgecenter/SSWRJV_10.1.0/b
    • [Enforcing job memory and swap with Linux cgroups](https://www.ibm.com/support/knowledgecenter/SSWRJ
    • [Job access control](https://www.ibm.com/support/knowledgecenter/SSWRJV_10.1.0/best_practices/Job ac
    • Integration with AFS
    • [Maintaining cluster performance](https://www.ibm.com/support/knowledgecenter/SSWRJV_10.1.0/best_pra
    • Managing floating software licenses
    • [Optimizing LSF job processing with CPU frequency governors enabled](https://www.ibm.com/support/kno
    • OS partitioning and virtualization on Oracle Solaris and IBM AIX
    • [Placing jobs based on available job slots of hosts](https://www.ibm.com/support/knowledgecenter/SSW
    • [Running checksum to verify installation images](https://www.ibm.com/support/knowledgecenter/SSWRJV_
    • [Tracking job dependencies](https://www.ibm.com/support/knowledgecenter/SSWRJV_10.1.0/best_practices
    • [Understanding mbatchd performance metrics](https://www.ibm.com/support/knowledgecenter/SSWRJV_10.1.
    • [Using compute units for topology scheduling](https://www.ibm.com/support/knowledgecenter/SSWRJV_10.
    • [Using job directories](https://www.ibm.com/support/knowledgecenter/SSWRJV_10.1.0/best_practices/Usi
    • [Using lsmake to accelerate Android builds](https://www.ibm.com/support/knowledgecenter/SSWRJV_10.1.
    • [Using NVIDIA DGX systems with LSF](https://www.ibm.com/support/knowledgecenter/SSWRJV_10.1.0/best_p
    • Using ssh X11 forwarding
    • [Using the Python wrapper for LSF API](https://www.ibm.com/support/knowledgecenter/SSWRJV_10.1.0/bes
  • [Chapter 10 LSF 许可证调度程序](chapter10/LSF License Scheduler.md)
    • 介绍
      • 概览
      • [LSF License Scheduler 版本之间的差异](chapter10/section1/Differences between LSF License Scheduler edition
      • 词汇表
      • 架构
    • [安装和启动许可证调度程序](chapter10/section2/Installing and starting License Scheduler.md)
      • [安装 License Scheduler](chapter10/section2/subsection1/Install License Scheduler.md)
        • [安装之前](chapter10/section2/subsection1/Before you install.md)
        • [License Scheduler 设置脚本的作用](chapter10/section2/subsection1/What the License Scheduler setup script d
        • [使用 LSF (UNIX) 安装 License Scheduler](chapter10/section2/subsection1/Install License Scheduler with L
        • [在 Windows 上安装 License Scheduler](chapter10/section2/subsection1/Install License Scheduler on Window
          • [使用 LSF (Windows) 安装 License Scheduler](chapter10/section2/subsection1/Install License Scheduler wit
        • 故障排除
        • [配置 LSF License Scheduler 基础版](chapter10/section2/subsection1/Configure LSF License Scheduler Basic
      • [启动 License Scheduler](chapter10/section2/Start License Scheduler.md)
      • [License Scheduler 中的 LSF 参数](chapter10/section2/LSF parameters in License Scheduler.md)
      • [关于提交作业](chapter10/section2/About submitting jobs.md)
      • [配置更改之后](chapter10/section2/After configuration changes.md)
      • [将集群添加到 License Scheduler](chapter10/section2/Add a cluster to License Scheduler.md)
      • [配置多个管理员](chapter10/section2/Configure multiple administrators.md)
      • [升级 License Scheduler](chapter10/section2/Upgrade License Scheduler.md)
      • 防火墙
    • [LSF 许可证调度程序概念](chapter10/section3/LSF License Scheduler concepts.md)
      • [License Scheduler 模式](chapter10/section3/License Scheduler modes.md)
      • [项目组](chapter10/section3/Project groups.md)
      • [License Scheduler 中的服务域](chapter10/section3/Service domains in License Scheduler.md)
      • [发行政策](chapter10/section3/Distribution policies.md)
      • [项目模式抢占](chapter10/section3/subsection1/Project mode preemption.md)
        • [抢占限制](chapter10/section3/subsection1/Preemption restrictions.md)
        • [LSF 抢占与 License Scheduler 抢占](chapter10/section3/subsection1/LSF preemption with License Scheduler
      • [FlexNet 和 Reprise License Manager 的许可证使用情况](chapter10/section3/subsection2/License usage with FlexN
        • [已知许可要求](chapter10/section3/subsection2/Known license requirements.md)
        • [未知许可要求](chapter10/section3/subsection2/Unknown license requirements.md)
        • [项目模式](chapter10/section3/subsection2/Project mode.md)
        • [集群模式](chapter10/section3/subsection2/Cluster mode.md)
        • [保留的 FlexNet Manager 许可证](chapter10/section3/subsection2/Reserved FlexNet Manager licenses.md)
    • [配置许可证调度程序](chapter10/section4/Configuring License Scheduler.md)
      • [配置集群模式](chapter10/section4/Configure cluster mode.md)
      • [保证配置集群模式](chapter10/section4/Configure cluster mode with guarantees.md)
      • [项目模式与项目](chapter10/section4/Project mode with projects.md)
      • [项目模式可选设置](chapter10/section4/Project mode optional settings.md)
      • [项目组的项目模式](chapter10/section4/Project mode with project groups.md)
      • [配置快速调度项目模式](chapter10/section4/subsection1/Configure fast dispatch project mode.md)
        • [配置 lmremove 或 rlmremove 抢占](chapter10/section4/subsection1/Configure lmremove or rlmremove preempti
      • [基于时间的自动配置](chapter10/section4/Automatic time-based configuration.md)
      • 故障转移
        • [局域网的故障转移配置](chapter10/section4/subsection2/Failover provisioning for LANs.md)
        • [外网的故障转移配置](chapter10/section4/subsection2/Failover provisioning for WANs.md)
          • [在 WAN 中配置并启动 License Scheduler](chapter10/section4/subsection2/Configure and start License Schedule
          • [WAN 示例](chapter10/section4/subsection2/WAN example.md)
          • [主机和网络级别的服务供应](chapter10/section4/subsection2/Service provisioning at the host and network levels.md
        • [设置 fod](chapter10/section4/subsection2/Set up fod.md)
      • [用户认证](chapter10/section4/User authentication.md)
    • [查看信息和故障排除](chapter10/section5/Viewing information and troubleshooting.md)
      • [关于查看可用许可证](chapter10/section5/subsection1/About viewing available licenses.md)
        • [查看传递给作业的许可证服务器和许可证功能信息](chapter10/section5/subsection1/View license server and license feature info
        • [自定义动态许可证信息输出](chapter10/section5/subsection1/Customize dynamic license information output.md)
      • [关于错误日志](chapter10/section5/subsection2/About error logs.md)
        • [管理日志文件](chapter10/section5/subsection2/Manage log files.md)
        • [临时更改日志级别](chapter10/section5/subsection2/Temporarily change the log level.md)
      • 故障排除
        • [文件位置](chapter10/section5/subsection3/File locations.md)
        • [检查 blstat 是否支持 lmstat](chapter10/section5/subsection3/Check that lmstat is supported by blcollect.m
        • [除非您定义了 LSF License Scheduler elim,否则不要删除lsb.tokens](chapter10/section5/subsection3/Do not delete ls
    • 参考
      • lsf.licensescheduler
      • bladmin
      • blcollect
      • blcstat
      • blhosts
      • blinfo
      • blkill
      • blparams
      • blstat
      • bltasks
      • blusers
      • fod.conf
      • fodadmin
      • fodapps
      • fodhosts
      • fodid
      • taskman
  • Part VI 经验总结篇
    • Chapter 11
    • Chapter 12
  • 后记
  • 附录
  • 参考资料
由 GitBook 提供支持
在本页
  • Spectrum LSF: 高效的集群管理系统
  • 简单的使用
  • 图 1. LSF 结构图
  • 清单 1. 提交作业
  • 清单 2. 查看运行作业
  • 清单 3. 查看 LSF 系统信息
  • 基本概念
  • 图 2. 节点角色
  • 图 3. 节点分组
  • 图 4. 调度方式
  • 体系结构
  • 图 5. 体系结构
  • 图 6. 多集群结构
  • 资源调度
  • 清单 4. 查看节点资源负载信息
  • 清单 5. 提交内存需求的作业
  • 定制策略
  • 总结
  • 参考资源

这有帮助吗?

  1. Part I 入门介绍篇
  2. Chapter 1 LSF 介绍

1.1 LSF 简介

上一页Chapter 1 LSF 介绍下一页1.2 LSF 系统要求与兼容性

最后更新于4年前

这有帮助吗?

Spectrum LSF: 高效的集群管理系统

计算机通过执行程序,帮助科研人员进行科学研究。通常,计算机的使用者不关心程序的执行过程,他们只希望更快更有效地获取运算结果。而为了提供强大的计算能力,大量的计算资源以集群的形式出现。集群系统的使用和有效管理都面临着挑战。

LSF(Load Sharing Facility)是一款分布式集群管理系统软件,负责计算资源的管理和批处理作业的调度。它给用户提供统一的集群资源访问接口,让用户透明地访问整个集群资源。同时提供了丰富的功能和可定制的策略。LSF 具有良好的可伸缩性和高可用性,支持几乎所有的主流操作系统。它通常是高性能计算环境中不可或缺的基础软件。

LSF 虽然是一款商业软件,但它同时也提供免费的社区版供大家下载和使用。

简单的使用

LSF 的使用者可以大约分为两类,普通用户和集群系统管理员。普通用户可以通过命令,将计算程序提交给集群执行,获取计算结果。系统管理员可以通过配置文件和管理命令,管理集群以及统计计算资源的使用情况。

图 1. LSF 结构图

img

普通用户提交可执行程序或脚本给 LSF。LSF 将已提交的程序称为作业。作业在LSF 的队列 (Queue) 里排队 (PEND) ,等待调度。

清单 1. 提交作业

lsfrhel01 # bsub –R "linux" sleep 1000
Job <1> is submitted to default queue <normal>.
lsfrhel01 # bjobs
JOBID   USER    STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
1       tom     PEND  normal     lsfrhel01               *eep 1000  May  9 15:42

LSF 根据配置的调度策略,把作业分配到最合适的计算节点上执行 (RUN) 。用户可以通过命令行查看,控制作业的执行过程。除此之外,LSF 还为用户提供了作业修改,需求描述,作业控制等多种命令行工具。

清单 2. 查看运行作业

lsfrhel01 # bjobs
JOBID   USER    STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
1       tom     RUN   normal     lsfrhel01   lsfrhel02   *eep 1000  May  9 15:42

系统管理员通常需要了解整个集群系统中作业和资源的使用状况,LSF 提供的命令帮助管理员快速直观地看到系统概况:系统中队列的状态,机器的状态,作业的资源使用概况,等等。除此之外,LSF 还为管理员提供了丰富的集群配置,控制,管理等功能。

清单 3. 查看 LSF 系统信息

lsfrhel01 # bqueues normal
QUEUE_NAME      PRIO STATUS          MAX JL/U JL/P JL/H NJOBS  PEND   RUN  SUSP
normal           30  Open:Active       -    -    -    -     1     0     1     0

lsfrhel01 # bhosts
HOST_NAME          STATUS       JL/U    MAX  NJOBS    RUN  SSUSP  USUSP    RSV
lsfrhel01          ok              -      4      0      0      0      0      0
lsfrhel02          ok              -      8      1      1      0      0      0

lsfrhel01 # bacct
Accounting information about jobs that are:
  - submitted by users tom,
  - accounted on all projects.
  - completed normally or exited
  - executed on all hosts.
  - submitted to all queues.
  - accounted on all service classes.
------------------------------------------------------------------------------

SUMMARY:      ( time unit: second )
 Total number of done jobs:       1      Total number of exited jobs:     4
 Total CPU time consumed:       4.4      Average CPU time consumed:     0.9
 Maximum CPU time of a job:     4.3      Minimum CPU time of a job:     0.0
 Total wait time in queues: 276962.0
 Average wait time in queue:55392.4
 Maximum wait time in queue:276953.0      Minimum wait time in queue:    2.0
 Average turnaround time:     60739 (seconds/job)
 Maximum turnaround time:    276953      Minimum turnaround time:        12
 Average hog factor of a job:  0.00 ( cpu time / turnaround time )
 Maximum hog factor of a job:  0.00      Minimum hog factor of a job:  0.00
 Average expansion factor of a job:  55610.95 ( turnaround time / run time )
 Maximum expansion factor of a job:  276953.00
 Minimum expansion factor of a job:  1.00
 Total Run time consumed:      6981      Average Run time consumed:    1396
 Maximum Run time of a job:    6914      Minimum Run time of a job:       0
 Total throughput:           409.09 (jobs/hour)  during    0.01 hours
 Beginning time:       May  9 15:39      Ending time:          May  9 15:40

基本概念

LSF 是资源管理的工具,它管理的主要对象有三个方面:机器(节点),作业和用户。

一般情况下,集群中的机器都是对等的,称为服务节点(Sever Host)。它们既可以提交作业,也可以执行作业。按照职能的不同,服务节点可以有不同的身份。管理作业调度资源的节点称为主节点(Master host),一个集群只有一个主节点。对于一次作业提交来说,提交作业的节点为提交节点(Submission host),被分配并执行作业的节点是执行节点(Execution host)。

图 2. 节点角色

为了便于机器的管理,LSF 提供节点组(Host group)的概念。任意的机器集合可以被作为整体命名,通过名字在集群范围内整体引用。一种典型的用法是将节点按照内存大小进行分类:大内存节点组和小内存节点组。不同的作业可以请求不同的节点组,LSF 按照请求,分配该节点组中的机器来执行作业。节点组还有一个灵活的特性:为方便管理,同一台机器可以定义到不同的节点组。

图 3. 节点分组

作业占用机器资源进行计算。每一个机器被划分成若干个槽位(slot) 。每一个槽位通常可以容纳一个作业运行。 通常情况下,每一个槽位和一个CPU 核心(core)相对应。槽位是一个容易混淆的概念,为便于理解,可以将槽位等同于CPU 核心来看待。对于并行作业来说,比如MPI 作业,每一个都需要占用更多的槽位加速计算。

作业的管理是以队列(Queue)为单位的,调度的策略也是按照队列定制的。作为作业的容器,可以配置多个队列定制不同策略。LSF 按照队列的优先级,从高到低调度每一个队列中的作业,为其分配资源。高优先级队列的作业对资源的使用具有优先权。

图 4. 调度方式

用户是作业提交者,也是资源的真正使用者。对于资源和作业的管理,不少策略都是以用户为单位。为了更好管理用户,LSF 引入用户组(user group)。若干用户集合可以统一命名,并使用该命名统一引用。例如,一个人属于一个部门,一个部门可以作为一个用户组,这种情况下就可以使用部门名字命名和引用。

体系结构

LSF 采用传统的客户机服务器模式,主节点负责整个集群的管理,从节点负责管理运行其上的作业的管理。每一个服务节点包含三个后台进程:

  • Sbatchd

批处理作业管理进程。负责在本节点上执行作业,监控作业状态以及收集其使用的资源。同时根据用户请求或者系统策略触发,控制作业的状态,比如发送SIGSTOP 给作业、挂起作业运行等。

  • RES

远程执行服务进程。负责执行远程客户请求的任务,主要用于并行作业的远程任务启动、监控以及控制。

  • LIM

采集本节点的负载信息进程。将收集到的资源负载信息周期上报给主节点上的LIM。主节点的LIM 拥有整个集群资源状态,为其它服务提供集群系统范围内的资源当前快照。

主管理节点在这个基础上,包括两个额外的进程:

  • Mbatchd

集群管理服务进程。它是 LSF 的中心:通过主节点的 LIM 获取机器以及相关资源信息,处理远程用户的作业提交请求,委托 mbschd 将作业调度到相关资源上,发送调度结果到指定机器,并通过和 sbatchd 的交互,监控作业使用的资源,控制作业的执行过程。

  • Mbschd

调度策略服务进程。从 mbachd 获取作业和资源信息,根据定制策略,为 mbatchd 提供作业调度服务。

图 5. 体系结构

当一个新作业提交的时候,集群管理服务进程检查作业的合法性,并将作业放入到指定的队列中等待调度。经过调度的作业,将获得执行机器上的slot、内存等资源。LSF 负责保留相关资源并将作业指派到已分配机器上执行。作业的状态和实际使用的资源通过批处理作业管理进程报告给集群管理进程。

集群系统构建在分布式网络节点上,节点的失效和网路设备的故障都会导致集群系统的基础环境改变。集群系统的高可用性功能可以保证即使在底层设备故障,LSF 系统仍然可以提供可靠稳定的服务。LSF 采用主备模式实现系统的故障恢复。LSF 的主节点将运行时事件信息写入网络文件系统。当主节点失效后,相关备节点进行选举,选出新的主节点。新的主节点从事件信息文件中恢复作业信息、机器状态,最终获取集群控制权,恢复LSF 状态。

为了更进一步扩展 LSF 的资源管理范围和方式,在单一集群基础上,LSF 还提供多集群互联技术(Multi-Cluster)。多集群通过互联,共享跨集群资源,提供更强大的计算能力。下面是一种典型的多集群架构,集群 1 负责接收作业提交和转发,集群 2 和 集群 3 负责作业执行。

图 6. 多集群结构

资源调度

LSF 收集每一个节点的处理器、内存、交换区、临时存储区等资源信息。主节点掌握全局资源信息。资源的管理和调度以这些信息为基础。

清单 4. 查看节点资源负载信息

lsfrhel01 # lshosts
HOST_NAME      type    model  cpuf ncpus maxmem maxswp server RESOURCES
lsfrhel01    X86_64   PC6000 116.1     2   1.4G   1.4G    Yes (mg)
lsfrhel02    X86_64   PC6000 116.1     2   1.4G   1.4G    Yes ()
lsfrhel01 # lsload
HOST_NAME       status  r15s   r1m  r15m   ut    pg  ls    it   tmp   swp   mem
lsfrhel01           ok   0.4   0.0   0.0   0%   0.0   1   179   10G  1.4G  1.1G
lsfrhel02           ok   1.5   0.3   0.3   1%   0.1   2     1 2391M  1.2G  603M

作业在使用资源的时候,主要考虑三个方面:如何根据作业的资源描述选择合适的执行机器,如何预留机器资源减少运行时的资源竞争,以及如何限制作业对资源的使用避免作业过度消耗资源。

首先是选择执行机。每一个作业会有不同的资源需求。可以通过 LSF 定义的资源描述模式请求资源,运行节点由LSF 根据作业对资源描述来匹配。当一个作业需要一定量内存的时候,"select[mem>512]" 表示选择内存大于512M 的机器来运行作业。调度器为其选择拥有合适资源的机器。

其次是确保执行机上的资源分配。既然我们选择了大内存的机器,那么别人的作业也可以选择大内存的机器。如果很多作业都在大内存机器上运行,资源竞争会导致内存短缺,作业最终无法占用到请求的资源。为了更好的确保资源,我们需要在作业运行时保留这些资源不会再分配给别人的作业。"rusage[mem=512]" 表示保留 512M 内存给作业,节点当前可用内存将会有 512M 分配给该作业,节点可分配资源将减少512M 的内存。通过 LSF 的策略,可用内存的分配得到控制,已经保留的内存将不会再分配给其它的作业。

最后是保证资源不被过度消耗。资源的保留是通过 LSF 的策略保证,但是作业的进程在运行时,却尚未受 LSF 控制。我们需要在执行节点上,对作业的系统资源设置限制,保证作业(进程)本身不会吃掉过多的内存。通常我们可以设置一个资源上限,防止作业过度消耗资源。比如,内存限制 '1024M',防止作业使用超过1G 的内存。

清单 5. 提交内存需求的作业

$ bsub -M 1024 -R "select[mem>512] rusage[mem=512]" sleep 1000
Job <2> is submitted to default queue <normal>.
$ bjobs  -l 644

Job <644>, User <tom>, Project <default>, Status <RUN>, Queue <normal>, Command
                     <sleep 1000>
Wed Dec 28 16:04:00: Submitted from host <lsfrhel01 >, CWD <$HOME/workplace/tes
                     t>, Requested Resources <select[mem>512] rusage[mem=512]>;

 MEMLIMIT
      1 G
Wed Dec 28 16:04:00: Started 1 Task(s) on Host(s) <lsfrhel02>, Allocated 1 Slot
                    (s) on Host(s) <lsfrhel02>, Execution Home </home/tom>, Exe
                     cution CWD </home/tom/workplace/test>;
Wed Dec 28 16:05:00: Resource usage collected.
                     The CPU time used is 4 seconds.
                     MEM: 6 Mbytes;  SWAP: 0 Mbytes;  NTHREAD: 4
                     PGID: 23106;  PIDs: 23106 23108 23110

 SCHEDULING PARAMETERS:
           r15s   r1m  r15m   ut      pg    io   ls    it    tmp    swp    mem
 loadSched   -     -     -     -       -     -    -     -     -      -      -
 loadStop    -     -     -     -       -     -    -     -     -      -      -

 RESOURCE REQUIREMENT DETAILS:
 Combined: select[(mem>512) && (type == local)] order[r15s:pg] rusage[mem=512.0
                     0]
 Effective: select[(mem>512) && (type == local)] order[r15s:pg] rusage[mem=512.
                     00]

对于资源的选择、预留和限制,内存只是一个例子。 LSF 还支持很多种资源,比如 CPU、交换区、临时目录大小等等。虽然这些默认管理的资源始终是有限的,但是 LSF 还提供了资源管理的扩展机制。用户可以统过编写自己的 ELIM 来收集自定义的资源。比如,收集系统的网络带宽以及网络负载,作业可以通过资源描述,选择拥有相应带宽的节点执行作业。资源的种类很多,LSF 提供布尔类型、字符串类型和数字类型来描述多种多样的资源。

定制策略

LSF 提供了非常丰富的调度策略供 LSF 系统管理员选择配置。策略针对作业和资源,从提高资源利用率、优化资源分配、提高用户满意度等各个方面为资源的使用者和管理者提供可配置策略。

默认的策略是先来先服务(FCFS)。顾名思义,先提交的作业先调度,优先获得资源。排在后面的作业必须等待前面的作业运行完成才能开始。后提交作业可能在很长时间得不到机会运行。考虑到资源分配的公平问题,比如部门之间应该平等使用资源,公平共享(Fairshare)策略得以引入。通过配置以部门为单位的用户组平等分享资源,不同用户的作业优先考虑资源所有权。避免了先来先服务导致的资源不平等,从而优化资源分配。

公平共享是从资源分配公平性上考虑问题的,它达到的是一个最终资源使用公平的平衡。但是在使用过程中,如果其他人或者部门没有作业,那么整个集群的资源将会被分配给目前已经提交的作业。作业执行期间,即便新的作业拥有更多的资源优先使用权,也要等待其他作业执行完毕,释放资源后才能执行。这样在短时期内资源使用是不公平的。对于拥有资源使用权却无法执行的情况,资源保障(Resource Guarantee)策略可以为用户保留资源,随时可用。这是在牺牲资源利用率基础上提高用户满意度。

对于并行作业,通常要求很多的 slot,当系统资源紧张的时候,即使等待很久依然无法运行。当系统释放一个 slot 的时候,这个作业因为发现资源不够,便放弃对资源的优先权。排在后面的只需要一个 slot 的作业将获取资源执行。这个过程反复着,并行作业始终无法获取足够资源。为了解决这个问题引入了资源保留策略。虽然当前资源不够运行的,但是这个资源暂时被并行作业占有,等待后面不断释放的资源,直到 slot 满足作业的需求。

但是长时间的等待还是会浪费这些空闲资源,因此又加入回填策略。在不影响并行作业启动时间的前提下,可以将短作业优先调度到已经被保留的 slot 上。

对于特权或者紧急的用户或者应用,当系统资源完全使用的时候。为了尽快执行,抢占(Preemption)策略可以通过抢占已执行作业的资源,执行自己的作业。

除此之外,为了满足用户需求,LSF 提供了资源预留(Advanced Reservation)、SLA 等等。为了提高资源利用率,LSF 提供了NUMA绑定(Affinity)策略等等。对于详尽的策略,可以参考 LSF 管理员手册。LSF 的很多策略都可以自由组合,通过管理员的配置,最终形成丰富的,满足各种需求的定制策略。

即便所有的策略都不能满足你的要求,LSF 的调度策略还实现了插件机制。新的扩展可以通过 LSF 提供的API 实现新的策略。

总结

在高性能计算领域,作业管理系统是一种成熟的系统软件技术。LSF 作为其中的佼佼者,提供了统一的访问接口,丰富的调度策略,灵活的配置和部署。LSF 的体系结构和部署方式让它可以有效管理一定规模的集群系统,目前商业版可以支持多达数千台节点和数百万作业的管理。LSF 的故障恢复机制足以保证集群系统的高可用性。在分布式计算技术不断发展的今天,作为传统的批处理管理软件,依然发挥着重要的作用。

参考资源

  • 下载 IBM Spectrum LSF Community Edition,安装,试用LSF 的基本功能

  • 参考 IBM Spectrum LSF Knowledge Center,了解更多LSF 的使用和集群管理方法

  • 参考 IBM Spectrum LSF 首页,察看更多LSF 产品和技术的最新信息

img
img
img
img
img