# 节点选择

每次 LSF 尝试分配作业时，它都会检查哪些主机有资格运行该作业。

许多条件决定了节点是否符合条件:

* 主机调度窗口
* 作业的资源需求
* 队列的资源需求
* 队列中的节点列表
* 节点负载水平
* 节点的作业槽位限制
* 用户配额与用户限制

只有满足所有条件，主机节点才有资格运行作业。 如果队列中已有一个作业，并且该作业的合格主机可用，则该作业将放置在该主机上。 如果有多个主机符合条件，则根据作业和队列资源要求，在最佳主机上启动作业。

## 主机负载级别

如果主机的负载索引（例如r1m，pg，mem）的值，在配置的调度阈值之内，则该主机可用。 您可以配置两种调度阈值：主机和队列。 如果主机上的任何负载索引，超过相应的主机阈值或队列阈值，则该主机不符合运行任何作业的条件。

## 合格的主机

当 LSF 尝试放置作业时，它将获取所有主机的当前负载信息。

将每个主机上的负载级别，与在 lsb.hosts 的 Host 部分中，为该主机配置的调度阈值，以及在 lsb.queues 中配置的按队列调度阈值进行比较。

如果任何负载索引，超过其按队列或按主机调度的阈值，则不会在该主机上启动任何新作业。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://baiyongan.gitbook.io/lsf-handbook/part-ii-ji-chu-cao-zuo-pian/user_fundations/inside_workload_management/host_selection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
