<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/performance/io-threads/src/io-threads.h, branch v3.1.0qa4</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>Memory accounting changes</title>
<updated>2010-04-23T13:32:52+00:00</updated>
<author>
<name>Vijay Bellur</name>
<email>vijay@gluster.com</email>
</author>
<published>2010-04-22T13:33:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=582de0677da4be19fc6f873625c58c45d069ab1c'/>
<id>582de0677da4be19fc6f873625c58c45d069ab1c</id>
<content type='text'>
Memory accounting Changes. Thanks to Vinayak Hegde and Csaba Henk for their
contributions.

Signed-off-by: Vijay Bellur &lt;vijay@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 329 (Replacing memory allocation functions with mem-type functions)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Memory accounting Changes. Thanks to Vinayak Hegde and Csaba Henk for their
contributions.

Signed-off-by: Vijay Bellur &lt;vijay@gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 329 (Replacing memory allocation functions with mem-type functions)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329
</pre>
</div>
</content>
</entry>
<entry>
<title>io-threads: more fixes</title>
<updated>2010-02-27T17:34:04+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@gluster.com</email>
</author>
<published>2010-02-27T07:00:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=904fef5cfece1e6eb69510b7409efe779867ca0a'/>
<id>904fef5cfece1e6eb69510b7409efe779867ca0a</id>
<content type='text'>
* conditional for scaling up threads was wrong

* ETIMEDOUT check was performed wrongly

Signed-off-by: Anand V. Avati &lt;avati@blackhole.gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 583 (filesystem access hangs while deleting large files)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=583
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* conditional for scaling up threads was wrong

* ETIMEDOUT check was performed wrongly

Signed-off-by: Anand V. Avati &lt;avati@blackhole.gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 583 (filesystem access hangs while deleting large files)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=583
</pre>
</div>
</content>
</entry>
<entry>
<title>io-threads: single queue/multi-thread model</title>
<updated>2010-02-22T16:51:40+00:00</updated>
<author>
<name>Anand Avati</name>
<email>avati@gluster.com</email>
</author>
<published>2010-02-22T11:00:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=5ae4f11319de9a800a595175678762f9fc924755'/>
<id>5ae4f11319de9a800a595175678762f9fc924755</id>
<content type='text'>
This patch lets io-threads work with a single queue and multiple
threads work on picking the next request from the queue and process
it.

Whenever the number of pending requests in the queue double, a new
worker thread is spawned.

Workers expire after a (configurable) timeout of inactivity

Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@blackhole.gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 583 (filesystem access hangs while deleting large files)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=583
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch lets io-threads work with a single queue and multiple
threads work on picking the next request from the queue and process
it.

Whenever the number of pending requests in the queue double, a new
worker thread is spawned.

Workers expire after a (configurable) timeout of inactivity

Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@blackhole.gluster.com&gt;
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;

BUG: 583 (filesystem access hangs while deleting large files)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=583
</pre>
</div>
</content>
</entry>
<entry>
<title>Changed occurrences of Z Research to Gluster.</title>
<updated>2009-10-07T10:54:49+00:00</updated>
<author>
<name>Vijay Bellur</name>
<email>vijay@gluster.com</email>
</author>
<published>2009-10-05T23:59:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=0b1197defa255ee533e568c9534bc6a5b5aadc29'/>
<id>0b1197defa255ee533e568c9534bc6a5b5aadc29</id>
<content type='text'>
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>io-threads: Fix missed notification in sem_timedwait</title>
<updated>2009-06-11T13:29:17+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2009-06-10T01:25:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=1c4d58fe57162a5247356dc95aa6204f26cbf4fe'/>
<id>1c4d58fe57162a5247356dc95aa6204f26cbf4fe</id>
<content type='text'>
We're performing a calculation for skewing idle time
that resulted in a timespec.tv_nsec value becoming larger than
1000 million or less than 0, forcing sem_timedwait to return
with an EINVAL instead of waiting for a request notification
from sem_post in iot_notify_worker(). This resulted in a missed
notification that resulted in a hang followed by a timeout
on the protocol/client side.

This commit avoids the over- and under-flow in tv_nsec by
skewing the tv_sec value instead.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're performing a calculation for skewing idle time
that resulted in a timespec.tv_nsec value becoming larger than
1000 million or less than 0, forcing sem_timedwait to return
with an EINVAL instead of waiting for a request notification
from sem_post in iot_notify_worker(). This resulted in a missed
notification that resulted in a hang followed by a timeout
on the protocol/client side.

This commit avoids the over- and under-flow in tv_nsec by
skewing the tv_sec value instead.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>io-threads: Change mutexes/condvars to spinlocks/semaphores</title>
<updated>2009-05-20T18:44:49+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2009-05-19T12:42:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=693e4f912b618d35b85fe6521d87fb7f683421d0'/>
<id>693e4f912b618d35b85fe6521d87fb7f683421d0</id>
<content type='text'>
It seems that use of mutexes is resulting in pretty high thread
sleep and wake-up cost. What is worse, if a worker thread has
acquired a  lock, there is a possibility of the main glusterfs thread
being put to sleep. We change the use of mutexes into spinlock.
At the same time, we cannot anymore use condvars for notification since
the condvar interface depends on mutexes itself. Semaphores come to
out rescue. Luckily, even the pthread semaphores have a timedwait
interface to allow our idle worker threads to make an exit decision.

Further, it is possible that spinlocks are not available on all systems
so all this is curtained behind #defines so we can fall back to
mutexes and condvars implementation.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It seems that use of mutexes is resulting in pretty high thread
sleep and wake-up cost. What is worse, if a worker thread has
acquired a  lock, there is a possibility of the main glusterfs thread
being put to sleep. We change the use of mutexes into spinlock.
At the same time, we cannot anymore use condvars for notification since
the condvar interface depends on mutexes itself. Semaphores come to
out rescue. Luckily, even the pthread semaphores have a timedwait
interface to allow our idle worker threads to make an exit decision.

Further, it is possible that spinlocks are not available on all systems
so all this is curtained behind #defines so we can fall back to
mutexes and condvars implementation.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>io-threads: Reduce default max for threads to 64</title>
<updated>2009-05-20T18:42:25+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2009-05-19T12:42:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=62a920642a54eac6e4b24a3590f17d628202a210'/>
<id>62a920642a54eac6e4b24a3590f17d628202a210</id>
<content type='text'>
We've had complaints from users who've used
autoscaling option with default settings for min and
max threads, about high memory consumption because of
the large default value for max-threads.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We've had complaints from users who've used
autoscaling option with default settings for min and
max threads, about high memory consumption because of
the large default value for max-threads.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>io-threads: Support mem-pool allocator for iot_request_t</title>
<updated>2009-05-20T18:40:01+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@gluster.com</email>
</author>
<published>2009-05-19T12:42:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=9a916de3f35dbbfe4399696891a0937d650bf72e'/>
<id>9a916de3f35dbbfe4399696891a0937d650bf72e</id>
<content type='text'>
This commit brings in support for allocation of iot_request_t's
in io-threads through the use of the mem-pool. We're hoping
that the overheads of hundreds and thousands of small allocations
can be avoided through this.

The important point to note is that the memory pool is not
for the translator as a whole but there is one small memory
pool for each worker thread. Not only does that help us
avoid malloc overheads for small allocations like iot_request_t
but also avoid contention on the heap data structures when multiple
threads want an iot_request_t from the pool.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit brings in support for allocation of iot_request_t's
in io-threads through the use of the mem-pool. We're hoping
that the overheads of hundreds and thousands of small allocations
can be avoided through this.

The important point to note is that the memory pool is not
for the translator as a whole but there is one small memory
pool for each worker thread. Not only does that help us
avoid malloc overheads for small allocations like iot_request_t
but also avoid contention on the heap data structures when multiple
threads want an iot_request_t from the pool.

Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>io-threads: Add graceful shutdown of worker threads</title>
<updated>2009-05-20T18:37:37+00:00</updated>
<author>
<name>Raghavendra G</name>
<email>raghavendra@zresearch.com</email>
</author>
<published>2009-05-15T05:50:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=ef0af3ca33a007f2aae2016cc27b6d828367c987'/>
<id>ef0af3ca33a007f2aae2016cc27b6d828367c987</id>
<content type='text'>
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Anand V. Avati &lt;avati@dev.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>io-threads: Clarify thread count range</title>
<updated>2009-05-05T06:39:34+00:00</updated>
<author>
<name>Shehjar Tikoo</name>
<email>shehjart@zresearch.com</email>
</author>
<published>2009-05-02T09:07:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=9aea45a0e1338a10558c4f3f434d172c4bc8c209'/>
<id>9aea45a0e1338a10558c4f3f434d172c4bc8c209</id>
<content type='text'>
This patch cleans up io-threads behaviour regarding the
range values that can be specified for min-threads
and max-threads. THe major change is that the min threads
have been reduced to 2 to signify that io-threads needs minimum
two threads for its operation, while keeping the default number of
threads at 16. The idea is to decouple the default thread count
from the minimum thread count.

Note to Avati:
This applies over Raghu's indentation and logging take-3 patch.

Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch cleans up io-threads behaviour regarding the
range values that can be specified for min-threads
and max-threads. THe major change is that the min threads
have been reduced to 2 to signify that io-threads needs minimum
two threads for its operation, while keeping the default number of
threads at 16. The idea is to decouple the default thread count
from the minimum thread count.

Note to Avati:
This applies over Raghu's indentation and logging take-3 patch.

Signed-off-by: Anand V. Avati &lt;avati@amp.gluster.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
