<?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_Client_Eviction_Guide</id>
	<title>Lustre Client Eviction Guide - 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_Client_Eviction_Guide"/>
	<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Lustre_Client_Eviction_Guide&amp;action=history"/>
	<updated>2026-10-27T23:21:10Z</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_Client_Eviction_Guide&amp;diff=5708&amp;oldid=prev</id>
		<title>Utopiabound: fix category typo</title>
		<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Lustre_Client_Eviction_Guide&amp;diff=5708&amp;oldid=prev"/>
		<updated>2026-09-30T07:45:36Z</updated>

		<summary type="html">&lt;p&gt;fix category typo&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:45, 30 September 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l141&quot;&gt;Line 141:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 141:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Troubleshooting]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Troubleshooting]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Operations]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Operations]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;HowTo&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Howto&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki_lustre_org:diff::1.12:old-5472:rev-5708 --&gt;
&lt;/table&gt;</summary>
		<author><name>Utopiabound</name></author>
	</entry>
	<entry>
		<id>http://wiki.lustre.org/index.php?title=Lustre_Client_Eviction_Guide&amp;diff=5472&amp;oldid=prev</id>
		<title>Elliswilson: Created page with &quot;== What Is Client Eviction? ==  Client eviction occurs when a Lustre server (MDS or OSS) forcibly revokes all locks and state held by a client. The server discards any knowledge of the client&#039;s cached data, and the client&#039;s dirty (unwritten) page cache for that target is &#039;&#039;&#039;discarded&#039;&#039;&#039;. Any in-flight or buffered writes that have not been acknowledged by the server are lost.  Eviction is a last-resort mechanism. It ensures that server resources (locks, open file handles,...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Lustre_Client_Eviction_Guide&amp;diff=5472&amp;oldid=prev"/>
		<updated>2026-04-30T17:40:40Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== What Is Client Eviction? ==  Client eviction occurs when a Lustre server (MDS or OSS) forcibly revokes all locks and state held by a client. The server discards any knowledge of the client&amp;#039;s cached data, and the client&amp;#039;s dirty (unwritten) page cache for that target is &amp;#039;&amp;#039;&amp;#039;discarded&amp;#039;&amp;#039;&amp;#039;. Any in-flight or buffered writes that have not been acknowledged by the server are lost.  Eviction is a last-resort mechanism. It ensures that server resources (locks, open file handles,...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== What Is Client Eviction? ==&lt;br /&gt;
&lt;br /&gt;
Client eviction occurs when a Lustre server (MDS or OSS) forcibly revokes all locks and state held by a client. The server discards any knowledge of the client&amp;#039;s cached data, and the client&amp;#039;s dirty (unwritten) page cache for that target is &amp;#039;&amp;#039;&amp;#039;discarded&amp;#039;&amp;#039;&amp;#039;. Any in-flight or buffered writes that have not been acknowledged by the server are lost.&lt;br /&gt;
&lt;br /&gt;
Eviction is a last-resort mechanism. It ensures that server resources (locks, open file handles, recovery slots) are not held indefinitely by a client that may be dead or unresponsive.&lt;br /&gt;
&lt;br /&gt;
== Causes of Eviction ==&lt;br /&gt;
&lt;br /&gt;
=== Lock Callback Timeout ===&lt;br /&gt;
&lt;br /&gt;
When the server needs to revoke a lock (e.g., because another client needs conflicting access), it sends a blocking callback (AST) to the lock holder. If the client does not respond within the lock callback timeout, the server evicts the client.&lt;br /&gt;
&lt;br /&gt;
The callback timeout is derived from the adaptive timeout mechanism or the static &amp;lt;code&amp;gt;obd_timeout&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
=== Ping Timeout ===&lt;br /&gt;
&lt;br /&gt;
Clients and servers exchange periodic ping messages. If the server does not receive a ping from a client within &amp;#039;&amp;#039;&amp;#039;1.5 × obd_timeout&amp;#039;&amp;#039;&amp;#039; seconds, it evicts the client. With the default &amp;lt;code&amp;gt;obd_timeout=100&amp;lt;/code&amp;gt;, this gives a ping deadline of 150 seconds.&lt;br /&gt;
&lt;br /&gt;
=== Server Shutdown ===&lt;br /&gt;
&lt;br /&gt;
When a server target is unmounted or the server node is shut down, all clients connected to that target are evicted. Clients detect this when they fail to reconnect and begin recovery.&lt;br /&gt;
&lt;br /&gt;
=== Network Failure ===&lt;br /&gt;
&lt;br /&gt;
Sustained network partitions between a client and a server lead to both ping timeouts and lock callback timeouts, resulting in eviction.&lt;br /&gt;
&lt;br /&gt;
=== Administrative Eviction ===&lt;br /&gt;
&lt;br /&gt;
Administrators can manually evict a specific client:&lt;br /&gt;
&lt;br /&gt;
 lctl --device $OSDNAME evict_client $CLIENT_NID&lt;br /&gt;
&lt;br /&gt;
This is sometimes used to unstick a server waiting on a misbehaving client during recovery.&lt;br /&gt;
&lt;br /&gt;
== Detecting Eviction ==&lt;br /&gt;
&lt;br /&gt;
=== Client-Side Detection ===&lt;br /&gt;
&lt;br /&gt;
Check the kernel log (dmesg) on the client:&lt;br /&gt;
&lt;br /&gt;
 dmesg | grep -i evict&lt;br /&gt;
&lt;br /&gt;
Typical messages:&lt;br /&gt;
&lt;br /&gt;
 Lustre: testfs-MDT0000-mdc-ffff8800deadbeef: server evicted this client; invalidating state&lt;br /&gt;
 Lustre: testfs-OST0001-osc-ffff8800deadbeef: server evicted this client; invalidating state&lt;br /&gt;
&lt;br /&gt;
=== Server-Side Detection ===&lt;br /&gt;
&lt;br /&gt;
Check the recovery status on the server:&lt;br /&gt;
&lt;br /&gt;
 lctl get_param *.*.recovery_status&lt;br /&gt;
&lt;br /&gt;
Look for &amp;lt;code&amp;gt;evicted_clients&amp;lt;/code&amp;gt; counts and the list of connected vs. recovered clients.&lt;br /&gt;
&lt;br /&gt;
Server-side kernel log also records evictions:&lt;br /&gt;
&lt;br /&gt;
 dmesg | grep -i evict&lt;br /&gt;
&lt;br /&gt;
== Impact of Eviction ==&lt;br /&gt;
&lt;br /&gt;
=== Data Loss Risk ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Buffered writes that have not been flushed to the server are lost.&amp;#039;&amp;#039;&amp;#039; This is the most critical consequence. If an application writes data, receives a successful &amp;lt;code&amp;gt;write()&amp;lt;/code&amp;gt; return code, but the data is still in the client page cache when eviction occurs, that data is silently discarded.&lt;br /&gt;
&lt;br /&gt;
After eviction the client returns &amp;lt;code&amp;gt;-EIO&amp;lt;/code&amp;gt; (Input/output error) on subsequent operations to the affected target.&lt;br /&gt;
&lt;br /&gt;
=== The write() Return Code Problem ===&lt;br /&gt;
&lt;br /&gt;
The POSIX &amp;lt;code&amp;gt;write()&amp;lt;/code&amp;gt; system call succeeds as soon as data is copied into the kernel page cache — it does &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; wait for data to reach the server. This means:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;write()&amp;lt;/code&amp;gt; returns success even though data may be lost on eviction.&lt;br /&gt;
* Applications &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; call &amp;lt;code&amp;gt;fsync()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;fdatasync()&amp;lt;/code&amp;gt; and check its return code to confirm data durability.&lt;br /&gt;
* Applications &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; check &amp;lt;code&amp;gt;close()&amp;lt;/code&amp;gt; return codes, as &amp;lt;code&amp;gt;close()&amp;lt;/code&amp;gt; flushes remaining dirty pages.&lt;br /&gt;
&lt;br /&gt;
This is not specific to Lustre — it is POSIX behavior — but Lustre&amp;#039;s distributed nature makes eviction-induced data loss more likely than on local file systems.&lt;br /&gt;
&lt;br /&gt;
=== Application Impact ===&lt;br /&gt;
&lt;br /&gt;
* Applications receive &amp;lt;code&amp;gt;-EIO&amp;lt;/code&amp;gt; on the next operation after eviction.&lt;br /&gt;
* Open file descriptors become invalid for the evicted target.&lt;br /&gt;
* NFS re-exports over Lustre may return stale file handle errors.&lt;br /&gt;
* MPI jobs typically abort when any rank receives an I/O error.&lt;br /&gt;
&lt;br /&gt;
== Prevention ==&lt;br /&gt;
&lt;br /&gt;
=== Tune obd_timeout ===&lt;br /&gt;
&lt;br /&gt;
Increase &amp;lt;code&amp;gt;obd_timeout&amp;lt;/code&amp;gt; to give clients more time to respond. The default is 100 seconds. Large-scale systems or sites with known network variability often increase this:&lt;br /&gt;
&lt;br /&gt;
On servers and clients:&lt;br /&gt;
&lt;br /&gt;
 lctl set_param timeout=300&lt;br /&gt;
&lt;br /&gt;
Note: This was historically called &amp;lt;code&amp;gt;obd_timeout&amp;lt;/code&amp;gt;.  Larger values increase recovery time after genuine failures, so choose a value that balances tolerance and recovery speed.&lt;br /&gt;
&lt;br /&gt;
=== Enable Adaptive Timeouts ===&lt;br /&gt;
&lt;br /&gt;
Adaptive timeouts (enabled by default since Lustre 2.x) dynamically adjust timeouts based on observed RPC latency. Verify they are enabled:&lt;br /&gt;
&lt;br /&gt;
 lctl get_param at_max&lt;br /&gt;
 lctl get_param at_min&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;at_max=0&amp;lt;/code&amp;gt;, adaptive timeouts are disabled and the static &amp;lt;code&amp;gt;obd_timeout&amp;lt;/code&amp;gt; is used. Ensure &amp;lt;code&amp;gt;at_max&amp;lt;/code&amp;gt; is set to a reasonable value (default is 600).&lt;br /&gt;
&lt;br /&gt;
=== Network Reliability ===&lt;br /&gt;
&lt;br /&gt;
* Monitor network health between clients and servers.&lt;br /&gt;
* Ensure LNet routes are redundant where possible (see [[Multi-Rail LNet]]).&lt;br /&gt;
* Avoid oversubscribing network switches serving Lustre traffic.&lt;br /&gt;
* Use dedicated Lustre networks to avoid contention with other traffic.&lt;br /&gt;
&lt;br /&gt;
=== Client Health ===&lt;br /&gt;
&lt;br /&gt;
A client under heavy memory pressure or CPU starvation may fail to respond to lock callbacks in time. Monitor client nodes for:&lt;br /&gt;
&lt;br /&gt;
* High memory usage and swapping (prevents timely RPC processing).&lt;br /&gt;
* CPU saturation (kernel threads cannot run).&lt;br /&gt;
* Long interrupt storms or driver issues on the network interface.&lt;br /&gt;
&lt;br /&gt;
== Remediation After Eviction ==&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Check application status:&amp;#039;&amp;#039;&amp;#039; Determine whether the application detected the I/O error. Check application logs and exit codes.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Check data integrity:&amp;#039;&amp;#039;&amp;#039; If the application did not &amp;lt;code&amp;gt;fsync()&amp;lt;/code&amp;gt; before eviction, recently written data may be lost. Verify output files.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Remount the client:&amp;#039;&amp;#039;&amp;#039; In many cases the client automatically reconnects. If errors persist, unmount and remount:&lt;br /&gt;
#: &amp;lt;code&amp;gt;umount /mnt/lustre &amp;amp;&amp;amp; mount -t lustre $MGSNID:/$FSNAME /mnt/lustre&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Investigate root cause:&amp;#039;&amp;#039;&amp;#039; Determine why the eviction happened:&lt;br /&gt;
#* Network outage? Check switch logs, LNet status (&amp;lt;code&amp;gt;lctl get_param nis&amp;lt;/code&amp;gt;).&lt;br /&gt;
#* Overloaded client? Check memory and CPU metrics at the time of eviction.&lt;br /&gt;
#* Server issue? Check server logs and recovery status.&lt;br /&gt;
#* Slow copytool or HSM activity blocking locks?&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Review timeout tuning:&amp;#039;&amp;#039;&amp;#039; If evictions are recurring, consider adjusting &amp;lt;code&amp;gt;obd_timeout&amp;lt;/code&amp;gt; and adaptive timeout parameters.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Lustre Common Mistakes]] — common pitfalls including write handling&lt;br /&gt;
* [[Lustre Recovery Overview]] — how Lustre recovers from failures&lt;br /&gt;
* [[Lustre Resiliency  Understanding Lustre Message Loss and Tuning for Resiliency]]&lt;br /&gt;
* [[Lustre Timeout Hierarchy]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Troubleshooting]]&lt;br /&gt;
[[Category:Operations]]&lt;br /&gt;
[[Category:HowTo]]&lt;/div&gt;</summary>
		<author><name>Elliswilson</name></author>
	</entry>
</feed>