summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-threads/src/io-threads.h
Commit message (Collapse)AuthorAgeFilesLines
* io-threads: Reduce default min and max threadsShehjar Tikoo2009-04-101-2/+2
| | | | | | | | Going by the memory usage for each threads, it is prudent to have lower number of threads by default and let users who understand the memory consequences increase the thread count for themselves. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Use non-default thread stack sizeShehjar Tikoo2009-04-101-0/+6
| | | | | | | | The default stack size on Linux is around 8 MiB for each thread. This is clearly too high for our purpose. This commit reduces the stack size down to 1 MiB. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Support autoscaling volfile optionsShehjar Tikoo2009-04-021-4/+4
| | | | | | | | | | | | | | | | | This commit finally makes the autoscaling feature visible to the user. Know that we're now using two separate thread-pools, one for data requests, called ordered thread-pool in io-threads, and the other for meta-data requests, called un-ordered thread-pool. We do not expose this information to the user to keep io-threads simple. Consequently, when the user specifies a min-threads and max-threads value, the number of threads assigned to each pool is equal, i.e. both pools start with their min threads set to half of the option "min-threads" and both scale up their threads at most up to half of option "max-threads". Volfile options will be added to the wiki and user-guide. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Allow scaling to be switched offShehjar Tikoo2009-04-021-1/+18
| | | | | | | | The default is also to provide no scaling. For both, ordered and unordered request pools, when scaling is off, we maintain atleast the minimum number of threads specified in the volfile. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add ordered threadpool state and codeShehjar Tikoo2009-04-021-0/+20
| | | | | | | | | | | Now we have the remaining fops going through the ordered thread-pool. To route a request through ordered thread, we use iot_schedule_ordered(..) and the worker thread for ordered requests is iot_worker_ordered(..) Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add un-ordered thread-pool.Shehjar Tikoo2009-04-021-0/+33
| | | | | | | | | | | | | | | | | | This commit adds everything needed to: a. Get un-ordered request going through the un-ordered thread-pool. This happens through, the iot_schedule_unordered(..). The unordered thread-pool consists of thread running the iot_worker_unordered(..) function. b. Make threads in the un-ordered thread pool start-up and exit depending on the thread state. Note that at this point the requests that need ordering are still going through iot_schedule(..). Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* IO-threads Cleanup: Remove useless data structures.Shehjar Tikoo2009-03-171-22/+0
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* IO-threads Cleanup: Change workers list to dynamically allocated arrayShehjar Tikoo2009-03-171-2/+1
| | | | | | | | | | Worker threads were represented as a list in iot_conf_t which made us traverse the list of workers in order to decide which thread gets the request. Now we represent the workers as a dynamically allocated array so that we can just index into the array to schedule the file. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* IO-threads Cleanup: Change request queue into a struct list_headShehjar Tikoo2009-03-171-5/+8
| | | | | | | | This patch changes the per-thread request queue from a custom circular linked list, into the standard list.h list which is easier to understand and has a cleaner interface. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* updated copyright header to extend copyright upto 2009Basavanagowda Kanur2009-02-261-1/+1
| | | | | | updated copyright header to include 2009. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Reduce iothreads requests queue lock granularity.Shehjar Tikoo2009-02-191-1/+1
| | | | | | | | | | | iot_queue() and iot_dequeue() functions were using a io-threads translator-wide lock which would be contended for by every worker thread waiting for IO requests. This patch reduces the granularity by turning the lock into a per-worker lock. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Remove conf->cache_size checksShehjar Tikoo2009-02-191-2/+0
| | | | | | | | Since we're not dependent on this io-thread internal state(i.e. cache_size and current_size) to rate limit requests, we can remove these two data members and code that checks for these. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Remove dead code.Shehjar Tikoo2009-02-191-7/+0
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Added all filesVikas Gorur2009-02-181-0/+99