<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:27:43 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-2731] Speed up the run time of &quot;stop_services&quot; function in lustre init script</title>
                <link>https://jira.whamcloud.com/browse/LU-2731</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The &quot;stop_services&quot; function in the lustre init script can be sped up if it parallelizes the teardown of each service. This can have a huge positive performance impact on the time it takes to bring down a Lustre server. I wrote a patch to demonstrate this, and tested it on a Lustre 2.1 based OSS with up to 32 ldiskfs OSTs.&lt;/p&gt;

&lt;p&gt;First the patch to the init script:                                             &lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;diff --git i/lustre/scripts/lustre w/lustre/scripts/lustre                      
index b97951f..eeb5941 100644                                                   
--- i/lustre/scripts/lustre                                                     
+++ w/lustre/scripts/lustre                                                     
@@ -498,6 +498,7 @@ stop_services ()                                            
 {                                                                              
        local labels=$*                                                         
        local result=0                                                          
+       local pids=&quot;&quot;                                                           
        local dir dev label                                                     
                                                                               
        for label in $labels; do                                                
@@ -512,9 +513,22 @@ stop_services ()                                           
                        # no error                                              
                        continue                                                
                fi                                                              
+                                                                               
                echo &quot;Unmounting $dir&quot;                                          
-               umount $dir || result=2                                         
+               umount $dir &amp;amp;                                                   
+                                                                               
+               if [ -z &quot;$pids&quot; ]; then                                         
+                       pids=&quot;$!&quot;                                               
+               else                                                            
+                       pids=&quot;$pids $!&quot;                                         
+               fi                                                              
        done                                                                    
+                                                                               
+       # wait for all umount processes to complete, report any errors          
+       for pid in $pids; do                                                    
+               wait $pid || result=2                                           
+       done                                                                    
+                                                                               
        # double check!                                                         
        for label in $labels; do                                                
                if mountpt_is_active $label; then                               
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;                                                                      

&lt;p&gt;The testing I performed shows this patch considerably improves the time it takes to &quot;stop&quot; the OSS. The raw numbers are below.&lt;/p&gt;

&lt;p&gt;Here is the timing information I gathered using the &lt;tt&gt;time&lt;/tt&gt; command when running &lt;tt&gt;/etc/init.d/lustre start&lt;/tt&gt; and &lt;tt&gt;/etc/init.d/lustre stop&lt;/tt&gt;:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;$ time /etc/init.d/lustre start # (w/o patch)&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;  $ time /etc/init.d/lustre start # (w/o patch)

+-----------+------------+-----------+-----------+                              
| # of OSTs |    real    |    user   |    sys    |                              
+-----------+------------+-----------+-----------+                              
|      1    | 0m  2.184s | 0m 0.162s | 0m 0.077s |                              
|      2    | 0m  4.285s | 0m 0.281s | 0m 0.148s |                              
|      4    | 0m  8.508s | 0m 0.500s | 0m 0.302s |                              
|      8    | 0m 16.961s | 0m 1.017s | 0m 0.568s |                              
|     16    | 0m 33.884s | 0m 1.964s | 0m 1.176s |                              
|     32    | 1m  7.744s | 0m 3.986s | 0m 2.280s |                              
+-----------+------------+-----------+-----------+                              
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;                                                                      


&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;$ time /etc/init.d/lustre stop # (w/o patch)&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;  $ time /etc/init.d/lustre stop # (w/o patch)

+-----------+------------+-----------+-----------+                              
| # of OSTs |    real    |    user   |    sys    |                              
+-----------+------------+-----------+-----------+                              
|     1     | 0m  4.758s | 0m 0.072s | 0m 0.030s |                              
|     2     | 0m  9.018s | 0m 0.118s | 0m 0.049s |                              
|     4     | 0m 18.813s | 0m 0.185s | 0m 0.083s |                              
|     8     | 0m 37.586s | 0m 0.337s | 0m 0.141s |                              
|    16     | 1m 16.092s | 0m 0.597s | 0m 0.263s |                              
|    32     | 2m 37.550s | 0m 1.181s | 0m 0.403s |                              
+-----------+------------+-----------+-----------+                              
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;                                                                    

&lt;p&gt;Here is the timing information gathered the same way as above, but with my patch applied (all else being equal):&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;$ time /etc/init.d/lustre start # (w/ patch)&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;  $ time /etc/init.d/lustre start # (w/ patch)

+-----------+------------+-----------+-----------+                              
| # of OSTs |    real    |    user   |    sys    |                              
+-----------+------------+-----------+-----------+                              
|      1    | 0m  2.183s | 0m 0.158s | 0m 0.083s |                              
|      2    | 0m  4.282s | 0m 0.274s | 0m 0.153s |                              
|      4    | 0m  8.519s | 0m 0.510s | 0m 0.303s |                              
|      8    | 0m 16.966s | 0m 1.019s | 0m 0.583s |                              
|     16    | 0m 33.878s | 0m 1.984s | 0m 1.154s |                              
|     32    | 1m  7.745s | 0m 3.944s | 0m 2.322s |                              
+-----------+------------+-----------+-----------+                              
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;                                                                      


&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;$ time /etc/init.d/lustre stop # (w/ patch)&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;  $ time /etc/init.d/lustre stop # (w/ patch)

+-----------+------------+-----------+-----------+                              
| # of OSTs |    real    |    user   |    sys    |                              
+-----------+------------+-----------+-----------+                              
|      1    | 0m  4.566s | 0m 0.075s | 0m 0.023s |                              
|      2    | 0m  4.857s | 0m 0.105s | 0m 0.070s |                              
|      4    | 0m  4.777s | 0m 0.175s | 0m 0.064s |                              
|      8    | 0m  5.449s | 0m 0.323s | 0m 0.153s |                              
|     16    | 0m  5.862s | 0m 0.606s | 0m 0.208s |                              
|     32    | 0m  6.307s | 0m 1.183s | 0m 0.811s |                              
+-----------+------------+-----------+-----------+                              
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;                 

&lt;p&gt;This is a &lt;b&gt;drastic&lt;/b&gt; improvement in the time it takes for &lt;tt&gt;/etc/init.d/lustre stop&lt;/tt&gt; to complete as the number of OSTs increases.&lt;/p&gt;</description>
                <environment></environment>
        <key id="17400">LU-2731</key>
            <summary>Speed up the run time of &quot;stop_services&quot; function in lustre init script</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="emoly.liu">Emoly Liu</assignee>
                                    <reporter username="prakash">Prakash Surya</reporter>
                        <labels>
                    </labels>
                <created>Thu, 31 Jan 2013 17:55:58 +0000</created>
                <updated>Fri, 22 Mar 2013 18:52:03 +0000</updated>
                            <resolved>Fri, 22 Mar 2013 18:52:03 +0000</resolved>
                                    <version>Lustre 2.4.0</version>
                    <version>Lustre 2.1.4</version>
                                    <fixVersion>Lustre 2.4.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="51580" author="prakash" created="Thu, 31 Jan 2013 18:24:40 +0000"  >&lt;p&gt;Please see: &lt;a href=&quot;http://review.whamcloud.com/5235&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/5235&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="51684" author="pjones" created="Mon, 4 Feb 2013 01:25:35 +0000"  >&lt;p&gt;Thanks for the patch Prakash!&lt;/p&gt;



&lt;p&gt;Emoly&lt;/p&gt;

&lt;p&gt;Could you please take care of this patch?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="51686" author="emoly.liu" created="Mon, 4 Feb 2013 01:32:44 +0000"  >&lt;p&gt;OK.&lt;/p&gt;</comment>
                            <comment id="54685" author="pjones" created="Fri, 22 Mar 2013 18:52:03 +0000"  >&lt;p&gt;Landed for 2.4&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzvifb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6635</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>