<div dir="ltr">Our current workaround was to use the following command on the MGS with Lustre 2.12.5 that include the patches in LU-12651 and LU-12759 (we were using a patched 2.12.4 a few months ago):<div><div>lctl set_param -P osc.*.grant_shrink=0</div><div><br></div><div>We could not find the root cause of the underlying problem, dynamic grant shrinking seems to be useful when the OSTs are running out of free space. </div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 28, 2020 at 11:47 PM Tung-Han Hsieh &lt;<a href="mailto:thhsieh@twcp1.phys.ntu.edu.tw">thhsieh@twcp1.phys.ntu.edu.tw</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear Simon,<br>
<br>
Thank you very much for your hint. Yes, you are right. We compared<br>
the grant size of two client by (running in each client):<br>
<br>
        lctl get_param osc.*.cur_grant_bytes<br>
<br>
- Client A: It has run the following large data transfer for over 36 hrs.<br>
<br>
        while [ 1 ]; do<br>
            tar cf - /home/large/data | ssh remote_host &quot;cat &gt; /dev/null&quot;<br>
        done<br>
<br>
  The value of &quot;cur_grant_bytes&quot; is 796134.<br>
<br>
- Client B: It is almost idling during the action of Client A.<br>
<br>
  The value of &quot;cur_grant_bytes&quot; is 1715863552.<br>
<br>
If this is the reason that hit the I/O performance of Client A seriously,<br>
is it possible to maintain it at a constant value at least for the head<br>
node (since the head node is the most probable one to have large and long<br>
time data I/O of the whole cluster, especially for a data center) ?<br>
<br>
I would be also like to ask: Why this value has to be dynamically adjusted ?<br>
<br>
Thank you very much for your comment in advance.<br>
<br>
Best Regards,<br>
<br>
T.H.Hsieh<br>
<br>
On Wed, Oct 28, 2020 at 02:00:21PM -0400, Simon Guilbault wrote:<br>
&gt; Hi, we had a similar performance problem on our login/DTNs node a few<br>
&gt; months ago, the problem was the grant size was shrinking and was getting<br>
&gt; stuck under 1MB. Once under 1MB, the client had to send every request to<br>
&gt; the OST using sync IO.<br>
&gt; <br>
&gt; Check the output of the following command:<br>
&gt; lctl get_param osc.*.cur_grant_bytes<br>
&gt; <br>
&gt; On Wed, Oct 28, 2020 at 12:08 AM Tung-Han Hsieh &lt;<br>
&gt; <a href="mailto:thhsieh@twcp1.phys.ntu.edu.tw" target="_blank">thhsieh@twcp1.phys.ntu.edu.tw</a>&gt; wrote:<br>
&gt; <br>
&gt; &gt; Dear All,<br>
&gt; &gt;<br>
&gt; &gt; Sorry that I am not sure whether this mail was successfully posted to<br>
&gt; &gt; the lustre-discuss mailing list or not. So I resent it again. Please<br>
&gt; &gt; ignore it if you already read it before.<br>
&gt; &gt;<br>
&gt; &gt; ===========================================================================<br>
&gt; &gt;<br>
&gt; &gt; Dear Andreas,<br>
&gt; &gt;<br>
&gt; &gt; Thank you very much for your kindly suggestions. These days I got a chance<br>
&gt; &gt; to follow your suggestions for the test. This email is to report the<br>
&gt; &gt; results<br>
&gt; &gt; I have done so far. What I have done were:<br>
&gt; &gt;<br>
&gt; &gt; 1. Upgrade one client (with Infiniband) to Lustre 2.13.56_44_gf8a8d3f<br>
&gt; &gt;    (obtained from github). The compiling information is:<br>
&gt; &gt;<br>
&gt; &gt;    - Linux kernel 4.19.123.<br>
&gt; &gt;    - Infiniband MLNX_OFED_SRC-4.6-1.0.1.1.<br>
&gt; &gt;    - ./configure --prefix=/opt/lustre \<br>
&gt; &gt;                  --with-o2ib=/path/of/mlnx-ofed-kernel-4.6 \<br>
&gt; &gt;                  --disable-server --enable-mpitests=no<br>
&gt; &gt;    - make<br>
&gt; &gt;    - make install<br>
&gt; &gt;<br>
&gt; &gt; 2. We mounted the lustre file system (lustre MDT/OST servers: version<br>
&gt; &gt;    2.12.4 with Infiniband with ZFS backend) by this command:<br>
&gt; &gt;<br>
&gt; &gt;    - mount -t lustre -o flock mdt@o2ib:/chome /home<br>
&gt; &gt;<br>
&gt; &gt; 3. The script to simulate large data transfer is following:<br>
&gt; &gt;    (the directory &quot;/home/large/data&quot; contains 758 files, each size 600MB)<br>
&gt; &gt;<br>
&gt; &gt;    while [ 1 ]; do<br>
&gt; &gt;        tar cf - /home/large/data | ssh remote_host &quot;cat &gt; /dev/null&quot;<br>
&gt; &gt;    done<br>
&gt; &gt;<br>
&gt; &gt;    ps. Note that this scenario is common in a large data center, while<br>
&gt; &gt;        some users transferring large data out of the data center through<br>
&gt; &gt;        the head node; while other users might copy files and do their<br>
&gt; &gt;        normal works in the same head node.<br>
&gt; &gt;<br>
&gt; &gt; 4. During the data transfer in the background, I occationally ran this<br>
&gt; &gt;    command in the same client to test whether there is any abnormality<br>
&gt; &gt;    in I/O performance (where /home/dir1/file has size 600MB):<br>
&gt; &gt;<br>
&gt; &gt;    cp /home/dir1/file /home/dir2/<br>
&gt; &gt;<br>
&gt; &gt;    In the beginning this command can complete in about 1 sec. But after<br>
&gt; &gt;    around 18 hours (not exactly, because the test ran overnight while<br>
&gt; &gt;    I was sleeping), the problem appeared. The time to complete the same<br>
&gt; &gt;    cp command was more than 1 minute.<br>
&gt; &gt;<br>
&gt; &gt;    During the test, I am sure that the whole cluster was idling. The MDT<br>
&gt; &gt;    and OST servers did not have other loading. The CPU usage of the testing<br>
&gt; &gt;    client was below 0.3.<br>
&gt; &gt;<br>
&gt; &gt;    Then I stopped the test, and let the whole system completely idle. But<br>
&gt; &gt;    after 3 hours, the I/O abnormality of the same &quot;cp&quot; command was still<br>
&gt; &gt;    there. Only after I unmounted /home and remounted /home, the abnormality<br>
&gt; &gt;    of &quot;cp&quot; recovered to normal.<br>
&gt; &gt;<br>
&gt; &gt; Before and after remounting /home (which I call &quot;reset&quot;), I did the<br>
&gt; &gt; following tests:<br>
&gt; &gt;<br>
&gt; &gt; 1. Using &quot;top&quot; to check the memory usage:<br>
&gt; &gt;<br>
&gt; &gt; Before reset:<br>
&gt; &gt; =====================================<br>
&gt; &gt; top - 10:43:15 up 35 days, 52 min,  3 users,  load average: 0.00, 0.00,<br>
&gt; &gt; 0.00<br>
&gt; &gt; Tasks: 404 total,   1 running, 162 sleeping,   0 stopped,   0 zombie<br>
&gt; &gt; %Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,<br>
&gt; &gt; 0.0 st<br>
&gt; &gt; KiB Mem : 13232632+total, 13000131+free,   647784 used,  1677220 buff/cache<br>
&gt; &gt; KiB Swap: 15631240 total, 15631240 free,        0 used. 13076376+avail Mem<br>
&gt; &gt;<br>
&gt; &gt; After reset:<br>
&gt; &gt; =====================================<br>
&gt; &gt; top - 10:48:02 up 35 days, 57 min,  3 users,  load average: 0.04, 0.01,<br>
&gt; &gt; 0.00<br>
&gt; &gt; Tasks: 395 total,   1 running, 159 sleeping,   0 stopped,   0 zombie<br>
&gt; &gt; %Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,<br>
&gt; &gt; 0.0 st<br>
&gt; &gt; KiB Mem : 13232632+total, 12946539+free,   675948 used,  2184976 buff/cache<br>
&gt; &gt; KiB Swap: 15631240 total, 15631240 free,        0 used. 13073571+avail Mem<br>
&gt; &gt;<br>
&gt; &gt;    It seems that most of the memory were in &quot;free&quot; state. The amount of<br>
&gt; &gt;    hidden memory was neglectable. So I did not further investigate the<br>
&gt; &gt;    amount of slab memory.<br>
&gt; &gt;<br>
&gt; &gt; 2. Using &quot;strace&quot; with the following commands:<br>
&gt; &gt;<br>
&gt; &gt;    - Before reset (took 1 min of each cp):<br>
&gt; &gt;      strace -c -o /tmp/log2-err.txt cp /home/dir1/file /home/dir2/<br>
&gt; &gt;<br>
&gt; &gt;    - After reset (took 1 sec of each cp):<br>
&gt; &gt;      strace -c -o /tmp/log2-reset.txt cp /home/dir1/file /home/dir2/<br>
&gt; &gt;<br>
&gt; &gt;    From the log files, the major time consuming was read and write<br>
&gt; &gt; syscalls.<br>
&gt; &gt;    The others are neglectable.<br>
&gt; &gt;<br>
&gt; &gt;    % time     seconds  usecs/call     calls    errors syscall<br>
&gt; &gt;    ------ ----------- ----------- --------- --------- ----------------<br>
&gt; &gt;    (Before reset)<br>
&gt; &gt;     71.46    0.278424        1920       145           write<br>
&gt; &gt;     28.06    0.109322         705       155           read<br>
&gt; &gt;    (After reset)<br>
&gt; &gt;     52.92    0.299091        2063       145           write<br>
&gt; &gt;     46.85    0.264777        1708       155           read<br>
&gt; &gt;<br>
&gt; &gt;    Before reset, since we have done the cp test for the same file a<br>
&gt; &gt;    few times, the file was already cached. So the reading time is<br>
&gt; &gt;    smaller before reset than that after reset (since after reset /home<br>
&gt; &gt;    was remounted).<br>
&gt; &gt;<br>
&gt; &gt;    Hence from this result, the time of syscalls looks normal. The<br>
&gt; &gt;    performance drop seems occuring in other places.<br>
&gt; &gt;<br>
&gt; &gt; Now I haven&#39;t done the investigation of Lustre kernel debug log by enabling<br>
&gt; &gt; Lustre debug=-1. We will find another chance to do it.<br>
&gt; &gt;<br>
&gt; &gt; Up to now, any comments or suggestions are very welcome.<br>
&gt; &gt;<br>
&gt; &gt; Thanks for your help in advance.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Best Regards,<br>
&gt; &gt;<br>
&gt; &gt; T.H.Hsieh<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Thu, Oct 08, 2020 at 01:32:53PM -0600, Andreas Dilger wrote:<br>
&gt; &gt; &gt; On Oct 8, 2020, at 10:37 AM, Tung-Han Hsieh &lt;<br>
&gt; &gt; <a href="mailto:thhsieh@twcp1.phys.ntu.edu.tw" target="_blank">thhsieh@twcp1.phys.ntu.edu.tw</a>&gt; wrote:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Dear All,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; In the past months, we encountered several times of Lustre I/O<br>
&gt; &gt; abnormally<br>
&gt; &gt; &gt; &gt; slowing down. It is quite mysterious that there seems no problem on the<br>
&gt; &gt; &gt; &gt; network hardware, nor the lustre itself since there is no error message<br>
&gt; &gt; &gt; &gt; at all in MDT/OST/client sides.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Recently we probably found a way to reproduce it, and then have some<br>
&gt; &gt; &gt; &gt; suspections. We found that if we continuously perform I/O on a client<br>
&gt; &gt; &gt; &gt; without stop, then after some time threshold (probably more than 24<br>
&gt; &gt; &gt; &gt; hours), the additional file I/O bandwidth of that client will be<br>
&gt; &gt; shriked<br>
&gt; &gt; &gt; &gt; dramatically.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Our configuration is the following:<br>
&gt; &gt; &gt; &gt; - One MDT and one OST server, based on ZFS + Lustre-2.12.4.<br>
&gt; &gt; &gt; &gt; - The OST is served by a RAID 5 system with 15 SAS hard disks.<br>
&gt; &gt; &gt; &gt; - Some clients connect to MDT/OST through Infiniband, some through<br>
&gt; &gt; &gt; &gt;  gigabit ethernet.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Our test was focused on the clients using infiniband, which is<br>
&gt; &gt; described<br>
&gt; &gt; &gt; &gt; in the following:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; We have a huge (several TB) amount of data stored in the Lustre file<br>
&gt; &gt; &gt; &gt; system to be transferred to outside network. In order not to exhaust<br>
&gt; &gt; &gt; &gt; the network bandwidth of our institute, we transfer the data with<br>
&gt; &gt; limited<br>
&gt; &gt; &gt; &gt; bandwidth via the following command:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; rsync -av --bwlimit=1000 &lt;data_in_Lustre&gt;<br>
&gt; &gt; &lt;out_side_server&gt;:/&lt;out_side_path&gt;/<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; That is, the transferring rate is 1 MB per second, which is relatively<br>
&gt; &gt; &gt; &gt; low. The client read the data from Lustre through infiniband. So during<br>
&gt; &gt; &gt; &gt; data transmission, presumably there is no problem to do other data I/O<br>
&gt; &gt; &gt; &gt; on the same client. On average, when copy a 600 MB file from one<br>
&gt; &gt; directory<br>
&gt; &gt; &gt; &gt; to another directory (both in the same Lustre file system), it took<br>
&gt; &gt; about<br>
&gt; &gt; &gt; &gt; 1.0 - 2.0 secs, even when the rsync process still working.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; But after about 24 hours of continuously sending data via rsync, the<br>
&gt; &gt; &gt; &gt; additional I/O on the same client was dramatically shrinked. When it<br>
&gt; &gt; happens,<br>
&gt; &gt; &gt; &gt; it took more than 1 minute to copy a 600 MB from somewhere to another<br>
&gt; &gt; place<br>
&gt; &gt; &gt; &gt; (both in the same Lustre) while rsync is still running.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Then, we stopped the rsync process, and wait for a while (about one<br>
&gt; &gt; &gt; &gt; hour). The I/O performance of copying that 600 MB file returns normal.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Based on this observation, we are suspecting that whether there is a<br>
&gt; &gt; &gt; &gt; hidden QoS mechanism built in Lustre ? When a process occupies the I/O<br>
&gt; &gt; &gt; &gt; bandwidth for a long time and exceeded some limits, does Lustre<br>
&gt; &gt; automatically<br>
&gt; &gt; &gt; &gt; shrinked the I/O bandwidth for all processes running in the same<br>
&gt; &gt; client ?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I am not against such QoS design, if it does exist. But the amount of<br>
&gt; &gt; &gt; &gt; shrinking seems to be too large for infiniband (QDR and above). Then<br>
&gt; &gt; &gt; &gt; I am further suspecting that whether this is due to that our system is<br>
&gt; &gt; &gt; &gt; mixed with clients in which some have infiniband but some do not ?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Could anyone help to fix this problem ? Any suggestions will be very<br>
&gt; &gt; &gt; &gt; appreciated.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; There is no &quot;hidden QOS&quot;, unless it is so well hidden that I don&#39;t know<br>
&gt; &gt; &gt; about it.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; You could investigate several different things to isolate the problem:<br>
&gt; &gt; &gt; - try with a 2.13.56 client to see if the problem is already fixed<br>
&gt; &gt; &gt; - check if the client is using a lot of CPU when it becomes slow<br>
&gt; &gt; &gt; - run strace on your copy process to see which syscalls are slow<br>
&gt; &gt; &gt; - check memory/slab usage<br>
&gt; &gt; &gt; - enable Lustre debug=-1 and dump the kernel debug log to see where<br>
&gt; &gt; &gt;   the process is taking a long time to complete a request<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; It is definitely possible that there is some kind of problem, since this<br>
&gt; &gt; &gt; is not a very common workload to be continuously writing to the same file<br>
&gt; &gt; &gt; descriptor for over a day.  You&#39;ll have to do the investigation on your<br>
&gt; &gt; &gt; system to isolate the source of the problem.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Cheers, Andreas<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; lustre-discuss mailing list<br>
&gt; &gt; <a href="mailto:lustre-discuss@lists.lustre.org" target="_blank">lustre-discuss@lists.lustre.org</a><br>
&gt; &gt; <a href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org" rel="noreferrer" target="_blank">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a><br>
&gt; &gt;<br>
</blockquote></div>