<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/performance/io-threads, branch master</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>xlators: prefer libglusterfs time API</title>
<updated>2020-09-07T12:56:45+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2020-09-03T08:17:07+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=c696144b3690f7ed8cf04a8b51ca601f45e427ad'/>
<id>c696144b3690f7ed8cf04a8b51ca601f45e427ad</id>
<content type='text'>
Prefer timespec_now_realtime() and gf_time() over clock_gettime()
and time(), use gf_tvdiff() and gf_tsdiff() where appropriate,
drop unused time_elapsed() and leftovers in 'struct posix_private'.

Change-Id: Ie1f0229df5b03d0862193ce2b7fb91d27b0981b6
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Updates: #1002
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prefer timespec_now_realtime() and gf_time() over clock_gettime()
and time(), use gf_tvdiff() and gf_tsdiff() where appropriate,
drop unused time_elapsed() and leftovers in 'struct posix_private'.

Change-Id: Ie1f0229df5b03d0862193ce2b7fb91d27b0981b6
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Updates: #1002
</pre>
</div>
</content>
</entry>
<entry>
<title>xlator/performance/io-threads: structure logging</title>
<updated>2020-01-06T08:40:52+00:00</updated>
<author>
<name>yatipadia</name>
<email>ypadia@redhat.com</email>
</author>
<published>2019-12-17T07:25:02+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=26fe6106762f6aea910d477d1c37e645797884e1'/>
<id>26fe6106762f6aea910d477d1c37e645797884e1</id>
<content type='text'>
convert gf_msg() to gf_smsg()

Change-Id: I35c6f62c346a75ecb22cd3a4346ad4dc48f09a91
Updates: #657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
convert gf_msg() to gf_smsg()

Change-Id: I35c6f62c346a75ecb22cd3a4346ad4dc48f09a91
Updates: #657
</pre>
</div>
</content>
</entry>
<entry>
<title>Detach iot_worker to release its resources</title>
<updated>2019-07-15T04:43:34+00:00</updated>
<author>
<name>Liguang Li</name>
<email>liguang.lee6@gmail.com</email>
</author>
<published>2019-06-21T04:18:58+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d509f480b2d85dc86f027edc4c9badf79b5eb62f'/>
<id>d509f480b2d85dc86f027edc4c9badf79b5eb62f</id>
<content type='text'>
When iot_worker terminates, its resources have not been reaped, which
will consumes lots of memory.

Detach iot_worker to automically release its resources back to the
system.

fixes: bz#1729107
Change-Id: I71fabb2940e76ad54dc56b4c41aeeead2644b8bb
Signed-off-by: Liguang Li &lt;liguang.lee6@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When iot_worker terminates, its resources have not been reaped, which
will consumes lots of memory.

Detach iot_worker to automically release its resources back to the
system.

fixes: bz#1729107
Change-Id: I71fabb2940e76ad54dc56b4c41aeeead2644b8bb
Signed-off-by: Liguang Li &lt;liguang.lee6@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>io-threads.c: Potentially skip a lock.</title>
<updated>2019-03-12T03:09:33+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-02-27T20:05:51+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=3e36060b13a86ea4e39fb717dc7f59aacd47bf4f'/>
<id>3e36060b13a86ea4e39fb717dc7f59aacd47bf4f</id>
<content type='text'>
Before going into the lock, verify stub_cnt != 0.
Otherwise, let's skip this code.

Unrelated, switch a CALLOC to MALLOC, as we
initialize all members right away. This allocation
is done also under lock, so also should help a bit.

Compile-tested only!
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: Ie2fe6adff41ae4969abff95eff945b54e1a01d32
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before going into the lock, verify stub_cnt != 0.
Otherwise, let's skip this code.

Unrelated, switch a CALLOC to MALLOC, as we
initialize all members right away. This allocation
is done also under lock, so also should help a bit.

Compile-tested only!
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: Ie2fe6adff41ae4969abff95eff945b54e1a01d32
</pre>
</div>
</content>
</entry>
<entry>
<title>io-threads: Prioritize fops with NO_ROOT_SQUASH pid</title>
<updated>2019-03-05T13:55:21+00:00</updated>
<author>
<name>Susant Palai</name>
<email>spalai@redhat.com</email>
</author>
<published>2019-02-20T10:22:55+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f5c3b1727f55ffaa3dcdb3c3a09b968ebb45dbb2'/>
<id>f5c3b1727f55ffaa3dcdb3c3a09b968ebb45dbb2</id>
<content type='text'>
There was 30% regression observed in mkdir path with commit
b139bc58eb504adf5ef81658896c9283ae21f390. On analysis it is found
that io-threads xlator deprioritzes fops with all -ve pid.

Some context in to the no-root-squash pid requirement:
DHT xlator does some of the internal fops with root privileges. This is
needed so that operations like layout healing should not be abandoned
because a non root user is operating.  If root-squash option is enabled
the layout set operation looses its root privilege as server xlator
converts the uid and pid to random numbers. Hence, the above mentioned
commit converted pid to GF_CLIENT_PID_NO_ROOT_SQUASH to continue fops
as root.

Combining the above I am proposing not to deprioritize fops with
no-root-squash pid.

Change-Id: I54d056c01b25729304a77f9242fbaff39c5672ba
fixes: bz#1676430
Signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There was 30% regression observed in mkdir path with commit
b139bc58eb504adf5ef81658896c9283ae21f390. On analysis it is found
that io-threads xlator deprioritzes fops with all -ve pid.

Some context in to the no-root-squash pid requirement:
DHT xlator does some of the internal fops with root privileges. This is
needed so that operations like layout healing should not be abandoned
because a non root user is operating.  If root-squash option is enabled
the layout set operation looses its root privilege as server xlator
converts the uid and pid to random numbers. Hence, the above mentioned
commit converted pid to GF_CLIENT_PID_NO_ROOT_SQUASH to continue fops
as root.

Combining the above I am proposing not to deprioritize fops with
no-root-squash pid.

Change-Id: I54d056c01b25729304a77f9242fbaff39c5672ba
fixes: bz#1676430
Signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: implement a global thread pool</title>
<updated>2019-02-18T02:58:24+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2019-01-24T17:44:06+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=dddcf52020004d98f688ebef968de51d76cbf9a6'/>
<id>dddcf52020004d98f688ebef968de51d76cbf9a6</id>
<content type='text'>
This patch implements a thread pool that is wait-free for adding jobs to
the queue and uses a very small locked region to get jobs. This makes it
possible to decrease contention drastically. It's based on wfcqueue
structure provided by urcu library.

It automatically enables more threads when load demands it, and stops
them when not needed. There's a maximum number of threads that can be
used. This value can be configured.

Depending on the workload, the maximum number of threads plays an
important role. So it needs to be configured for optimal performance.
Currently the thread pool doesn't self adjust the maximum for the
workload, so this configuration needs to be changed manually.

For this reason, the global thread pool has been made optional, so that
volumes can still use the thread pool provided by io-threads.

To enable it for bricks, the following option needs to be set:

   config.global-threading = on

This option has no effect if bricks are already running. A restart is
required to activate it. It's recommended to also enable the following
option when running bricks with the global thread pool:

   performance.iot-pass-through = on

To enable it for a FUSE mount point, the option '--global-threading'
must be added to the mount command. To change it, an umount and remount
is needed. It's recommended to disable the following option when using
global threading on a mount point:

   performance.client-io-threads = off

To enable it for services managed by glusterd, glusterd needs to be
started with option '--global-threading'. In this case all daemons, like
self-heal, will be using the global thread pool.

Currently it can only be enabled for bricks, FUSE mounts and glusterd
services.

The maximum number of threads for clients and bricks can be configured
using the following options:

   config.client-threads
   config.brick-threads

These options can be applied online and its effect is immediate most of
the times. If one of them is set to 0, the maximum number of threads
will be calcutated as #cores * 2.

Some distributions use a very old userspace-rcu library (version 0.7)
for this reason, some header files from version 0.10 have been copied
into contrib/userspace-rcu and are used if the detected version is 0.7
or older.

An additional change has been made to io-threads to prevent that threads
are started when iot-pass-through is set.

Change-Id: I09d19e246b9e6d53c6247b29dfca6af6ee00a24b
updates: #532
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements a thread pool that is wait-free for adding jobs to
the queue and uses a very small locked region to get jobs. This makes it
possible to decrease contention drastically. It's based on wfcqueue
structure provided by urcu library.

It automatically enables more threads when load demands it, and stops
them when not needed. There's a maximum number of threads that can be
used. This value can be configured.

Depending on the workload, the maximum number of threads plays an
important role. So it needs to be configured for optimal performance.
Currently the thread pool doesn't self adjust the maximum for the
workload, so this configuration needs to be changed manually.

For this reason, the global thread pool has been made optional, so that
volumes can still use the thread pool provided by io-threads.

To enable it for bricks, the following option needs to be set:

   config.global-threading = on

This option has no effect if bricks are already running. A restart is
required to activate it. It's recommended to also enable the following
option when running bricks with the global thread pool:

   performance.iot-pass-through = on

To enable it for a FUSE mount point, the option '--global-threading'
must be added to the mount command. To change it, an umount and remount
is needed. It's recommended to disable the following option when using
global threading on a mount point:

   performance.client-io-threads = off

To enable it for services managed by glusterd, glusterd needs to be
started with option '--global-threading'. In this case all daemons, like
self-heal, will be using the global thread pool.

Currently it can only be enabled for bricks, FUSE mounts and glusterd
services.

The maximum number of threads for clients and bricks can be configured
using the following options:

   config.client-threads
   config.brick-threads

These options can be applied online and its effect is immediate most of
the times. If one of them is set to 0, the maximum number of threads
will be calcutated as #cores * 2.

Some distributions use a very old userspace-rcu library (version 0.7)
for this reason, some header files from version 0.10 have been copied
into contrib/userspace-rcu and are used if the detected version is 0.7
or older.

An additional change has been made to io-threads to prevent that threads
are started when iot-pass-through is set.

Change-Id: I09d19e246b9e6d53c6247b29dfca6af6ee00a24b
updates: #532
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: make gf_thread_create() easier to use</title>
<updated>2019-02-01T09:37:20+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2019-01-24T17:31:10+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=4674678951a1315975d66016fb55c49100b7819f'/>
<id>4674678951a1315975d66016fb55c49100b7819f</id>
<content type='text'>
This patch creates a specific function to set the thread name using a
string format and a variable argument list, like printf().

This function is used to set the thread name from gf_thread_create(),
which now accepts a variable argument list to create the full name. It's
not necessary anymore to use a local array to build the name of the
thread. This is done automatically.

Change-Id: Idd8d01fd462c227359b96e98699f8c6d962dc17c
Updates: bz#1193929
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch creates a specific function to set the thread name using a
string format and a variable argument list, like printf().

This function is used to set the thread name from gf_thread_create(),
which now accepts a variable argument list to create the full name. It's
not necessary anymore to use a local array to build the name of the
thread. This is done automatically.

Change-Id: Idd8d01fd462c227359b96e98699f8c6d962dc17c
Updates: bz#1193929
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>performance/io-threads: Improve debuggability in statedump</title>
<updated>2019-01-07T19:33:01+00:00</updated>
<author>
<name>Vijay Bellur</name>
<email>vbellur@redhat.com</email>
</author>
<published>2018-11-16T17:56:35+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=86f5d75c70a5fa6f1790b17d12d56fd8b37b9ddd'/>
<id>86f5d75c70a5fa6f1790b17d12d56fd8b37b9ddd</id>
<content type='text'>
statedump from io-threads lacked information to understand the number of
running threads &amp; number of requests in each priority queue. This patch
addresses that.

Sample statedump output w/ this patch:

current_high_priority_threads=7
current_normal_priority_threads=9
current_low_priority_threads=0
current_least_priority_threads=0
fast_priority_queue_length=32
normal_priority_queue_length=45

Also, changed the wording for least priority queue in
iot_get_pri_meaning().

Change-Id: Ic5f6391a15cc28884383f5185fce1cb52e0d10a5
fixes: bz#1664124
Signed-off-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
statedump from io-threads lacked information to understand the number of
running threads &amp; number of requests in each priority queue. This patch
addresses that.

Sample statedump output w/ this patch:

current_high_priority_threads=7
current_normal_priority_threads=9
current_low_priority_threads=0
current_least_priority_threads=0
fast_priority_queue_length=32
normal_priority_queue_length=45

Also, changed the wording for least priority queue in
iot_get_pri_meaning().

Change-Id: Ic5f6391a15cc28884383f5185fce1cb52e0d10a5
fixes: bz#1664124
Signed-off-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>multiple-files: clang-scan fixes</title>
<updated>2018-12-31T06:45:17+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2018-12-28T04:26:20+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=63088d8225df025e03a0ea0a0d8fdc3e8e9b9b08'/>
<id>63088d8225df025e03a0ea0a0d8fdc3e8e9b9b08</id>
<content type='text'>
updates: bz#1622665
Change-Id: I9f3a75ed9be3d90f37843a140563c356830ef945
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
updates: bz#1622665
Change-Id: I9f3a75ed9be3d90f37843a140563c356830ef945
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>all: add xlator_api to many translators</title>
<updated>2018-12-06T07:54:28+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2018-11-28T04:35:39+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=340e58f9b3bcdfe4314da65e592dcd5c2daf6fd9'/>
<id>340e58f9b3bcdfe4314da65e592dcd5c2daf6fd9</id>
<content type='text'>
Fixes: #164
Change-Id: I93ad6f0232a1dc534df099059f69951e1339086f
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: #164
Change-Id: I93ad6f0232a1dc534df099059f69951e1339086f
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
