<div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>this is an update containing some work done regarding performance and consistency during latest weeks. We&#39;ll try to build a complete list of all known issues and track them through this email thread. Please, let me know of any performance issue not included in this email so that we can build and track all of them.</div><div><br></div><div><b><font size="4">New improvements</font></b></div><div><br></div><div>While testing performance on Red Hat products, we have identified a problem in the way eager-locking was working on replicate volumes for some scenarios (virtualization and database workloads were affected). It caused an unnecessary amount of finodelk and fxattrop requests, that was increasing latency of write operations.</div><div><br></div><div>This has already been fixed with patches [1] and [2].</div><div><br></div><div>We have also identified some additional settings that provide better performance for database workloads. A patch [3] to update the default database profile with the new settings has been merged.</div><div><br></div><div>Combining all these changes (AFR fix and settings), pgbench performance has improved ~300% on bare metal using NVME, and a random I/O fio test running on VM has also improved more than 300%.</div><div><br></div><div><b><font size="4">Known issues</font></b></div><div><br></div><div>We have identified two issues in fuse mounts:</div><div><ul><li style="margin-left:15px">Becasue of selinux in client machine, a getxattr request is sent by fuse before each write request. Though it adds some latency, currently this request is directly answered by fuse xlator when selinux is not enabled in gluster (default setting).<br></li></ul><ul><li style="margin-left:15px">When <i>fopen-keep-cache</i> is enabled (default setting), kernel fuse sends stat requests before each read. Even disabling fopen-keep-cache, fuse still sends half of the stat requests. This has been tracked down to the atime update, however mounting a volume with noatime doesn&#39;t help to solve the issue because kernel fuse doesn&#39;t correctly handle noatime setting.</li></ul></div><div>Some other issues are detected:</div><div><ul><li style="margin-left:15px">Bad performance of write-behind when stat and writes to the same file are mixed. Right now, when a stat is received, all previous cached writes are flushed before processing the new request. The same happens for reads when it overlaps with a cached previous write. This makes write-behind useless in this scenario.</li></ul></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div dir="ltr"><div><b>Note</b>: fuse is currently sending stat requests before reads (see previous known issue), making reads almost as problematic as stat requests.</div></div></blockquote></blockquote><div dir="ltr"><div><ul><li style="margin-left:15px">Self-heal seems to be slow. It&#39;s still being investigated but there are some indications that we have a considerable amount of contention in io-threads. This contention could be the cause of some other performance issues, but we&#39;ll need to investigate more about this. There is already some work [4] trying to reduce it.</li></ul></div><div><ul><li style="margin-left:15px">&#39;ls&#39; performance is not good in some cases. When the volume has many bricks, &#39;ls&#39; performance tends to degrade. We are still investigating the cause, but one important factor is that DHT sends readdir(p) requests to all its subvolumes, This means that &#39;ls&#39; will run at the speed of the slower of the bricks. If any brick has an issue, or a spike in load, even if it&#39;s transitory, it will have a bad impact in &#39;ls&#39; performance. This can be alleviated by enabling parallel-readdir and readdir-ahead option.</li></ul></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div dir="ltr"><div><div><b>Note</b>: There have been reports that enabling parallel-readdir causes some entries to apparently disappear after some time (though they are still present on the bricks). I&#39;m not aware of the root cause yet.</div></div></div></blockquote></blockquote><div dir="ltr"><div><ul><li style="margin-left:15px">The number of threads in a server is quite high when multiple bricks are present, even if brick-mux is used. There are some efforts [5] trying to reduce this number.</li></ul></div><div><br></div><div><font size="4"><b>New features</b></font></div><div><br></div><div>We have recently started the design [6] of a new caching infrastructure that should provide much better performance, specially for small files or metadata intensive workloads. It should also provide a safe infrastructure to keep cached information consistent on all clients.</div><div><br></div><div>This framework will make caching features available to any xlator that could need them in an easy and safe way.</div><div><br></div><div>The current thinking is that current existing caching xlators (mostly md-cache, io-cache and write-behind) will probably be reworked as a single complete caching xlator, since this makes things easier.</div><div><br></div><div>Any feedback or ideas will be highly appreciated.</div><div><br></div><div>Xavi</div><div><br></div><div>[1] <a href="https://review.gluster.org/21107" target="_blank">https://review.gluster.org/21107</a><br></div><div>[2] <a href="https://review.gluster.org/21210" target="_blank">https://review.gluster.org/21210</a></div><div>[3] <a href="https://review.gluster.org/21247" target="_blank">https://review.gluster.org/21247</a></div><div>[4] <a href="https://review.gluster.org/21039" target="_blank">https://review.gluster.org/21039</a></div><div>[5] <a href="https://review.gluster.org/20859" target="_blank">https://review.gluster.org/20859</a></div><div>[6] <a href="https://docs.google.com/document/d/1elX-WZfPWjfTdJxXhgwq37CytRehPO4D23aaVowtiE8/edit?usp=sharing" target="_blank">https://docs.google.com/document/d/1elX-WZfPWjfTdJxXhgwq37CytRehPO4D23aaVowtiE8/edit?usp=sharing</a></div></div></div>