<div dir="ltr"><div dir="ltr">On Fri, Feb 1, 2019 at 1:25 PM Poornima Gurusiddaiah &lt;<a href="mailto:pgurusid@redhat.com">pgurusid@redhat.com</a>&gt; wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Can the threads be categorised to do certain kinds of fops?</div></blockquote><div><br></div><div>Could be, but creating multiple thread groups for different tasks is generally bad because many times you end up with lots of idle threads which waste resources and could increase contention. I think we should only differentiate threads if it&#39;s absolutely necessary.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"> Read/write affinitise to certain set of threads, the other metadata fops to other set of threads. So we limit the read/write threads and not the metadata threads? Also if aio is enabled in the backend the threads will not be blocked on disk IO right? </div></blockquote><div><br></div><div>If we don&#39;t block the thread but we don&#39;t prevent more requests to go to the disk, then we&#39;ll probably have the same problem. Anyway, I&#39;ll try to run some tests with AIO to see if anything changes.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto">All this is based on the assumption that large number of parallel read writes make the disk perf bad but not the large number of dentry and metadata ops. Is that true?</div></div></blockquote><div><br></div><div>It depends. If metadata is not cached, it&#39;s as bad as a read or write since it requires a disk access (a clear example of this is the bad performance of &#39;ls&#39; in cold cache, which is basically metadata reads). In fact, cached data reads are also very fast, and data writes could go to the cache and be updated later in background, so I think the important point is if things are cached or not, instead of if they are data or metadata. Since we don&#39;t have this information from the user side, it&#39;s hard to tell what&#39;s better. My opinion is that we shouldn&#39;t differentiate requests of data/metadata. If metadata requests happen to be faster, then that thread will be able to handle other requests immediately, which seems good enough.</div><div><br></div><div>However there&#39;s one thing that I would do. I would differentiate reads (data or metadata) from writes. Normally writes come from cached information that is flushed to disk at some point, so this normally happens in the background. But reads tend to be in foreground, meaning that someone (user or application) is waiting for it. So I would give preference to reads over writes. To do so effectively, we need to not saturate the backend, otherwise when we need to send a read, it will still need to wait for all pending requests to complete. If disks are not saturated, we can have the answer to the read quite fast, and then continue processing the remaining writes.</div><div><br></div><div>Anyway, I may be wrong, since all these things depend on too many factors. I haven&#39;t done any specific tests about this. It&#39;s more like a brainstorming. As soon as I can I would like to experiment with this and get some empirical data.</div><div><br></div><div>Xavi</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Poornima</div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr">On Fri, Feb 1, 2019, 5:34 PM Emmanuel Dreyfus &lt;<a href="mailto:manu@netbsd.org" target="_blank">manu@netbsd.org</a> 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">On Thu, Jan 31, 2019 at 10:53:48PM -0800, Vijay Bellur wrote:<br>
&gt; Perhaps we could throttle both aspects - number of I/O requests per disk<br>
<br>
While there it would be nice to detect and report  a disk with lower than<br>
peer performance: that happen sometimes when a disk is dying, and last<br>
time I was hit by that performance problem, I had a hard time finding<br>
the culprit.<br>
<br>
-- <br>
Emmanuel Dreyfus<br>
<a href="mailto:manu@netbsd.org" rel="noreferrer" target="_blank">manu@netbsd.org</a><br>
_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" rel="noreferrer" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="https://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer noreferrer" target="_blank">https://lists.gluster.org/mailman/listinfo/gluster-devel</a><br>
</blockquote></div></div>
</blockquote></div></div>