summaryrefslogtreecommitdiffstats
path: root/xlators/performance
Commit message (Collapse)AuthorAgeFilesLines
* write-behind: set default window-size to 1MB.Raghavendra G2009-07-071-1/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* performance/write-behind - bug fix in open() and create().Basavanagowda Kanur2009-07-021-1/+5
| | | | | | | | open() & create() calls should reset frame->local to NULL. bz# 104 Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* enhancement in write-behindAmar Tumballi2009-06-301-13/+22
| | | | | | | | | Write calls should not be pushed to background only when the mandatory locking is enabled, in all other cases (eg: O_SYNC, O_DIRECT etc), we should not be 'caching' any data, but the calls can be pushed to the background Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* read-ahead: return with error code EBADF for fops on fds without file set in ↵Raghavendra G2009-06-111-11/+45
| | | | | | | | | | | their context. - since a successful open/create will _always_ set a pointer to ra_file_t in context of fd, this fix makes sense. - an example of operations on bad fd can be afr sending read on the child which was down during open. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* read-ahead: unwind with a return value of -1 and error code of ENOMEM on ↵Raghavendra G2009-06-111-0/+4
| | | | | | memory allocation for ra_file in open/create Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* removed unused option 'page-size' in io-cacheAmar Tumballi2009-06-091-5/+0
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* io-cache: prevent frames from getting woken up while page is getting validatedAnand Avati2009-06-031-1/+1
| | | | | | | | | | | | | | | | 1. A page will be put on the inode waitq if the 'freshness' has to be verified with an fstat() 2. while the fstat is in transit, other calls (like lookup) can update ioc_inode->tv, resetting the freshness (page still on inode waitq) 3. Another read request on the same page, after the updated freshness, will wake up the page frames neglecting the fact that the page is also waiting on the inode (waiting for the fstat completion) 4. once the page's frames are woken, the page becomes elegible for purging and can get destroyed for various reasons, leaving a destroyed page pointer in the inode's waitq 5. fstat returns and hits the destroyed page pointer causing a crash The fix is to all together disable cache hits when any page of the same inode is under validation. The otherwise cache hit will now be subjected to the ongoing validation by getting queued to the inode waitq. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* symlink-cache: fix return value of readlinkRaghavendra G2009-05-071-2/+2
| | | | | | | | | - sc_readlink wrongly returned strlen (link) + 1 when link was present in cache. - this fixes rt #828. Since fuse_readlink_cbk does link[op_ret] = '\0', there was a memory corruption. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* log level fixes in read-aheadAnand V. Avati2009-05-051-6/+6
|
* io-cache logging level fixesAnand V. Avati2009-05-054-33/+32
|
* io-threads: Clarify thread count rangeShehjar Tikoo2009-05-052-16/+23
| | | | | | | | | | | | | | | 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 <avati@amp.gluster.com>
* io-cache: indentation and logging fixesRaghavendra G2009-05-054-509/+426
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: indentation and logging fixesRaghavendra G2009-05-052-199/+250
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* write-behind: indentation and logging fixesRaghavendra G2009-04-301-158/+74
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* read-ahead: indentation and logging fixesRaghavendra G2009-04-302-105/+84
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add fxattrop fopShehjar Tikoo2009-04-221-666/+565
| | | | | | -- added some indentation fixes Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add xattrop fopShehjar Tikoo2009-04-221-0/+44
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add readdir fopShehjar Tikoo2009-04-221-0/+36
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add removexattr fopShehjar Tikoo2009-04-221-0/+45
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add fsetxattr fopShehjar Tikoo2009-04-221-0/+35
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add fgetxattr fopShehjar Tikoo2009-04-221-0/+34
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add getxattr fopShehjar Tikoo2009-04-221-0/+44
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add setxattr fopShehjar Tikoo2009-04-221-0/+45
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add statfs fopShehjar Tikoo2009-04-221-1/+34
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add fsyncdir fopShehjar Tikoo2009-04-221-0/+34
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add opendir fopShehjar Tikoo2009-04-221-0/+34
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Add link fopShehjar Tikoo2009-04-221-0/+37
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* iobuf - account with iobref_size() instead of iov_length (vector)Anand V. Avati2009-04-172-5/+9
|
* write-behind aggregate-size related changesRaghavendra G2009-04-161-15/+76
| | | | | | | | | | | This patch brings in following changes: 1. make aggregate-size as non-configurable and make it to be equal to maximum iobuf size. 2. best effort to write data in chunks of length as close to aggregate-size as possible but not greater than aggregate-size, since aggregate-size is made equal to Maximum size of iobuf. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* write-behind: adhere to coding guidelines.Raghavendra G2009-04-161-16/+32
| | | | | | - make sure lines are not greater than 80 characters in length Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* use ctx->page_size in all translators and transports instead of having their ↵Anand V. Avati2009-04-133-63/+3
| | | | | | own configurations Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Remove unnecessary call to pthread_attr_setstacksizeShehjar Tikoo2009-04-121-4/+0
| | | | | | | We do not need to explicitly set the stack size to its default value. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* updated performance/io-cache with new readv writev prototypesAnand V. Avati2009-04-123-34/+41
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* updated performance/io-threads with new readv writev prototypesAnand V. Avati2009-04-121-6/+10
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* update performance/read-ahead with new readv writev prototypesAnand V. Avati2009-04-123-21/+21
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* update performance/write-behind with new readv writev prototypesAnand V. Avati2009-04-121-18/+18
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* 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-102-1/+27
| | | | | | | | 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: Refactor un-ordered worker exit pathShehjar Tikoo2009-04-081-33/+17
| | | | | | | This is being done for the same reason as the previous refactoring for ordered threads. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Refactor ordered worker exit pathShehjar Tikoo2009-04-081-34/+25
| | | | | | | | | | | | | | This patch re-factors the exit path of an ordered worker on a time-out. Earlier we're checking for exit permission in such a way that required us to release and acquire the worker lock a second time in the worker loop opening a window wherein a new request could've been appended to the request queue. This patch makes the decision to exit while still holding on to the worker lock. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Cleaner stub destructionShehjar Tikoo2009-04-061-0/+3
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Sanity check worker thread idxShehjar Tikoo2009-04-061-20/+62
| | | | | | | | This patch adds sanity check for the ordered worker thread index returned from the inode's context. If the index is corrupted we STACK_UNWIND with ECANCELED. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Support autoscaling volfile optionsShehjar Tikoo2009-04-022-24/+104
| | | | | | | | | | | | | | | | | 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: Cleanup request queueing,thread firingShehjar Tikoo2009-04-021-30/+38
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Allow scaling to be switched offShehjar Tikoo2009-04-022-11/+73
| | | | | | | | 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-022-58/+182
| | | | | | | | | | | 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-022-98/+334
| | | | | | | | | | | | | | | | | | 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: Classify requests for threadpool typeShehjar Tikoo2009-04-021-26/+33
| | | | | | | | | | | | | | | | | New io-threads will serve requests through two separate threadpools. One thread pool for requests that must be ordered on a file that is open. so that the server can process the requests in the order they were entered in the requests queue, and not in the order the io-thread is able to send a request, which in turn is determined by how the thread gets scheduled. This can also be called the data-intensive ops thread pool. Second thread-pool for requests that dont care about ordering, i.e. requests like lookup, open, create, mkdir, etc. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for rename fopShehjar Tikoo2009-04-021-0/+55
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* io-threads: Wire in support for symlink fopShehjar Tikoo2009-04-021-0/+53
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>