<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.lustre.org/index.php?action=history&amp;feed=atom&amp;title=Lustre_NRS_Configuration</id>
	<title>Lustre NRS Configuration - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.lustre.org/index.php?action=history&amp;feed=atom&amp;title=Lustre_NRS_Configuration"/>
	<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Lustre_NRS_Configuration&amp;action=history"/>
	<updated>2026-06-27T06:02:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>http://wiki.lustre.org/index.php?title=Lustre_NRS_Configuration&amp;diff=5468&amp;oldid=prev</id>
		<title>Elliswilson: Created page with &quot;__TOC__  == Overview ==  The &#039;&#039;&#039;Network Request Scheduler (NRS)&#039;&#039;&#039; controls how Lustre servers order incoming RPCs for processing. By default, requests are handled in FIFO order, but NRS policies allow administrators to reorder requests to improve throughput, fairness, or implement quality-of-service (QoS) controls.  NRS is configured independently for each service partition (e.g., &lt;code&gt;ost_io&lt;/code&gt;, &lt;code&gt;mdt&lt;/code&gt;, &lt;code&gt;mdt_readpage&lt;/code&gt;, &lt;code&gt;ldlm_canceld&lt;/code...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Lustre_NRS_Configuration&amp;diff=5468&amp;oldid=prev"/>
		<updated>2026-04-30T16:31:02Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__TOC__  == Overview ==  The &amp;#039;&amp;#039;&amp;#039;Network Request Scheduler (NRS)&amp;#039;&amp;#039;&amp;#039; controls how Lustre servers order incoming RPCs for processing. By default, requests are handled in FIFO order, but NRS policies allow administrators to reorder requests to improve throughput, fairness, or implement quality-of-service (QoS) controls.  NRS is configured independently for each service partition (e.g., &amp;lt;code&amp;gt;ost_io&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mdt&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mdt_readpage&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ldlm_canceld&amp;lt;/code...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Network Request Scheduler (NRS)&amp;#039;&amp;#039;&amp;#039; controls how Lustre servers order incoming RPCs for processing. By default, requests are handled in FIFO order, but NRS policies allow administrators to reorder requests to improve throughput, fairness, or implement quality-of-service (QoS) controls.&lt;br /&gt;
&lt;br /&gt;
NRS is configured independently for each service partition (e.g., &amp;lt;code&amp;gt;ost_io&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mdt&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mdt_readpage&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ldlm_canceld&amp;lt;/code&amp;gt;). Most tuning focuses on &amp;lt;code&amp;gt;ost_io&amp;lt;/code&amp;gt;, which handles bulk data RPCs.&lt;br /&gt;
&lt;br /&gt;
For general tuning guidance, see [[Lustre Tuning]].&lt;br /&gt;
&lt;br /&gt;
== NRS Policy Types ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Policy&lt;br /&gt;
! Description&lt;br /&gt;
! Applicable Services&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;fifo&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| First-in, first-out (default)&lt;br /&gt;
| All&lt;br /&gt;
| No tunables. Requests processed in arrival order.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;crrn&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Client Round-Robin&lt;br /&gt;
| All&lt;br /&gt;
| Ensures each client gets a fair share of server time. Cycles through clients, processing a configurable number of requests per client before moving to the next.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;orr&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Object-based Round-Robin&lt;br /&gt;
| ost_io only&lt;br /&gt;
| Orders requests by object (file) and offset to optimize disk access patterns. Reduces seek overhead on HDDs.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;trr&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Target-based Round-Robin&lt;br /&gt;
| ost_io only&lt;br /&gt;
| Similar to ORR but operates at the target (OST) level rather than per-object. Good for mixed workloads with many files.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;tbf&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Token Bucket Filter&lt;br /&gt;
| All&lt;br /&gt;
| Advanced QoS policy. Rate-limits requests based on NID, JobID, UID/GID, or opcode. Supports multiple rules with priorities.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;delay&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| Delay (testing only)&lt;br /&gt;
| All&lt;br /&gt;
| Artificially delays requests. Used for testing and debugging only — never use in production.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Checking the Current NRS Policy ==&lt;br /&gt;
&lt;br /&gt;
To see which policy is active on the OSS &amp;lt;code&amp;gt;ost_io&amp;lt;/code&amp;gt; service:&lt;br /&gt;
&lt;br /&gt;
 lctl get_param ost.OSS.ost_io.nrs_policies&lt;br /&gt;
&lt;br /&gt;
Output shows each policy with its state:&lt;br /&gt;
&lt;br /&gt;
 regular_requests:&lt;br /&gt;
   - name: fifo&lt;br /&gt;
     state: started&lt;br /&gt;
   - name: crrn&lt;br /&gt;
     state: stopped&lt;br /&gt;
   - name: orr&lt;br /&gt;
     state: stopped&lt;br /&gt;
   ...&lt;br /&gt;
 high_priority_requests:&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
Each service has two queues:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;regular_requests (reg)&amp;#039;&amp;#039;&amp;#039; — normal priority RPCs&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;high_priority_requests (hp)&amp;#039;&amp;#039;&amp;#039; — high-priority RPCs (e.g., lock callbacks)&lt;br /&gt;
&lt;br /&gt;
== Enabling an NRS Policy ==&lt;br /&gt;
&lt;br /&gt;
To set a policy on the regular queue:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_policies=&amp;quot;trr reg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To set a policy on the high-priority queue:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_policies=&amp;quot;crrn hp&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To set a policy on both queues:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_policies=&amp;quot;orr both&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To revert to FIFO:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_policies=&amp;quot;fifo reg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; Only one policy can be active per queue at a time. Enabling a new policy automatically stops the previous one.&lt;br /&gt;
&lt;br /&gt;
== CRR-N (Client Round-Robin) ==&lt;br /&gt;
&lt;br /&gt;
CRR-N ensures fairness across clients by cycling through them in round-robin order.&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_policies=&amp;quot;crrn reg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Tunable: &amp;#039;&amp;#039;&amp;#039;quantum&amp;#039;&amp;#039;&amp;#039; — number of RPCs to process per client before rotating.&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_crrn_quantum=16&lt;br /&gt;
&lt;br /&gt;
Default quantum is 16. Higher values improve throughput for individual clients at the cost of fairness.&lt;br /&gt;
&lt;br /&gt;
== ORR (Object-based Round-Robin) ==&lt;br /&gt;
&lt;br /&gt;
ORR reorders RPCs to access the same object (file) sequentially by offset, reducing disk seeks:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_policies=&amp;quot;orr reg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is most effective on HDD-backed OSTs with large sequential file workloads.&lt;br /&gt;
&lt;br /&gt;
== TRR (Target-based Round-Robin) ==&lt;br /&gt;
&lt;br /&gt;
TRR operates like ORR but groups requests at the target level rather than per-object:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_policies=&amp;quot;trr reg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
TRR is better suited for mixed workloads where many different files are accessed concurrently.&lt;br /&gt;
&lt;br /&gt;
== TBF (Token Bucket Filter) ==&lt;br /&gt;
&lt;br /&gt;
TBF is the most flexible NRS policy, providing QoS controls based on client identity. It uses a token bucket algorithm to rate-limit request processing.&lt;br /&gt;
&lt;br /&gt;
=== Enabling TBF ===&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_policies=&amp;quot;tbf reg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Rate-Limiting by NID ===&lt;br /&gt;
&lt;br /&gt;
Limit a specific client to 100 RPCs/second:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_tbf_rule=\&lt;br /&gt;
   &amp;quot;start slow_client nid={10.0.1.50@tcp} rate=100&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Limit a subnet:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_tbf_rule=\&lt;br /&gt;
   &amp;quot;start slow_subnet nid={10.0.2.[0-255]@tcp} rate=50&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Rate-Limiting by JobID ===&lt;br /&gt;
&lt;br /&gt;
Limit a specific job:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_tbf_rule=\&lt;br /&gt;
   &amp;quot;start limit_backup jobid={backup_job.*} rate=200&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This requires JobID to be enabled on clients (&amp;lt;code&amp;gt;lctl set_param jobid_var=procname_uid&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Rate-Limiting by UID ===&lt;br /&gt;
&lt;br /&gt;
Limit a specific user:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_tbf_rule=\&lt;br /&gt;
   &amp;quot;start limit_user uid={1001} rate=50&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Compound Rules ===&lt;br /&gt;
&lt;br /&gt;
TBF supports compound expressions combining NID, JobID, UID, and GID:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_tbf_rule=\&lt;br /&gt;
   &amp;quot;start limit_user_on_net nid={10.0.1.[0-255]@tcp}&amp;amp;uid={1001} rate=25&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Listing TBF Rules ===&lt;br /&gt;
&lt;br /&gt;
 lctl get_param ost.OSS.ost_io.nrs_tbf_rule&lt;br /&gt;
&lt;br /&gt;
=== Removing a TBF Rule ===&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_tbf_rule=&amp;quot;stop slow_client&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Default Rule ===&lt;br /&gt;
&lt;br /&gt;
The built-in &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039; rule applies to all requests not matched by any explicit rule. You can change its rate:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param ost.OSS.ost_io.nrs_tbf_rule=\&lt;br /&gt;
   &amp;quot;change default rate=500&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Rules are evaluated in priority order (most recently added first). The default rule always has the lowest priority.&lt;br /&gt;
&lt;br /&gt;
== Applying NRS to MDS Services ==&lt;br /&gt;
&lt;br /&gt;
NRS policies also apply to MDT services:&lt;br /&gt;
&lt;br /&gt;
 lctl get_param mds.MDS.mdt.nrs_policies&lt;br /&gt;
 lctl set_param mds.MDS.mdt.nrs_policies=&amp;quot;tbf reg&amp;quot;&lt;br /&gt;
 lctl set_param mds.MDS.mdt.nrs_tbf_rule=\&lt;br /&gt;
   &amp;quot;start limit_metadata nid={10.0.3.[0-255]@tcp} rate=1000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Making NRS Settings Persistent ==&lt;br /&gt;
&lt;br /&gt;
NRS settings applied via &amp;lt;code&amp;gt;lctl set_param&amp;lt;/code&amp;gt; do not survive a restart. To make them persistent:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param -P ost.OSS.ost_io.nrs_policies=&amp;quot;tbf reg&amp;quot;&lt;br /&gt;
 lctl set_param -P ost.OSS.ost_io.nrs_tbf_rule=\&lt;br /&gt;
   &amp;quot;start slow_subnet nid={10.0.2.[0-255]@tcp} rate=50&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Lustre Tuning]]&lt;br /&gt;
* [[Lustre Monitoring and Statistics Guide]]&lt;br /&gt;
* [[Lustre Health Checks]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administration]]&lt;br /&gt;
[[Category:Performance]]&lt;br /&gt;
[[Category:Tuning]]&lt;/div&gt;</summary>
		<author><name>Elliswilson</name></author>
	</entry>
</feed>