summaryrefslogtreecommitdiffstats
path: root/xlators/performance
Commit message (Collapse)AuthorAgeFilesLines
...
* performance/stat-prefetch: implement procedure sp_process_inode_ctx.Raghavendra G2009-10-071-0/+93
| | | | | | | | | | | | | - this procedure processes inode_ctx to make decisions like whether the current procedure can continue (i.e., inode is already looked up), or the procedure has to initiate/wait for lookup on the path. It also sets up the frame->local and adds the stub corresponding to current fop if needed. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 284 (performance actually decreases for 'ls -l' on a directory containing large number of files with stat-prefetch loaded) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=284
* performance/stat-prefetch: use op_errno instead of errno to store error code.Raghavendra G2009-10-071-147/+253
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 284 (performance actually decreases for 'ls -l' on a directory containing large number of files with stat-prefetch loaded) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=284
* performance/stat-prefetch: Add support code to implement lookup-behind.Raghavendra G2009-10-072-22/+203
| | | | | | | | | | | | | - change sp_lookup and sp_lookup_cbk to support sending lookups when needed. lookups might need to be sent in fops like open, chmod, chown etc which operate on a path, since the actual lookup sent to stat-prefetch by its parent xlators is not propagated down the xlator tree if the path is cached. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 284 (performance actually decreases for 'ls -l' on a directory containing large number of files with stat-prefetch loaded) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=284
* performance/stat-prefetch: remove lookup-behind in sp_lookup.Raghavendra G2009-10-071-56/+4
| | | | | | | | | | | | - lookup-behind should be done on-demand basis, in fops like open instead of in sp_lookup itself. This would reduce network traffic between client and server related to lookup, if the only use of lookup was to fetch stat structure. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 284 (performance actually decreases for 'ls -l' on a directory containing large number of files with stat-prefetch loaded) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=284
* added few missing options in translator's option arrayAmar Tumballi2009-10-071-1/+4
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-0715-16/+16
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* performance/stat-prefetch: Add accounting of cache hits and misses.Raghavendra G2009-10-072-0/+17
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 284 (performance actually decreases for 'ls -l' on a directory containing large number of files with stat-prefetch loaded) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=284
* performance/stat-prefetch: optimizations to sp_lookup.Raghavendra G2009-10-071-1/+12
| | | | | | | | | | | - if stat cache cannot be found for a path in its parent inode and the path is a directory, we can get the cache from the inode corresponding to path and look for "." in that cache. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 284 (performance actually decreases for 'ls -l' on a directory containing large number of files with stat-prefetch loaded) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=284
* performance/stat-prefetch: change behaviour of sp_lookup when xattr_req is ↵Raghavendra G2009-10-071-7/+27
| | | | | | | | | | | | | not NULL. - if the xattr_req is empty (fuse just creates an empty dictionary and sends along lookup) we can still use the cache prefetched during readdir, since we need not fill the reply dictionary. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 284 (performance actually decreases for 'ls -l' on a directory containing large number of files with stat-prefetch loaded) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=284
* performance/stat-prefetch: change the cache to use rbtree based hashtable ↵Raghavendra G2009-10-073-36/+46
| | | | | | | | | instead of list for caching dentries. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 284 (performance actually decreases for 'ls -l' on a directory containing large number of files with stat-prefetch loaded) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=284
* performance/stat-prefetch: fix memory leaksRaghavendra G2009-10-071-57/+14
| | | | | | | | | | | | | | | | | | - sp_cache_get_inode uses fd_lookup which internally increases the refcount of fd by 1. This needs to be unrefed once we get the cache. - for directories, stat is stored in the inode context in sp_lookup_cbk. but, while doing so, no check was being done for the presence of context in inode, resulting in leak of memory equal to sizeof (struct stat) when multiple lookups happened on the directory. stat was needed to serve the postparent member during lookup. postparent stat is needed only in releases having NFS related changes and hence removing code present to get postparent. - path constructed in sp_readdir was not freed. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 257 (Backport stat-prefetch to 2.0) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=257
* write-behind: check for NULL file pointer in flush callbackAnand Avati2009-09-241-1/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 260 (ls on booster VMP results in error: "File descriptor in bad state") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=260
* performance/write-behind: Add NULL checks for file pointer.Raghavendra G2009-09-241-83/+104
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 260 (ls on booster VMP results in error: "File descriptor in bad state") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=260
* performance/write-behind: Add a NULL check for request->stub before checking ↵Raghavendra G2009-09-241-1/+2
| | | | | | | | | | | | | | | | | request->stub->fop. - for non-write wind requests, the request structure outlives the stub. The call stub is destroyed when stack is wound but request is destroyed only when the reply has come. (for writes, both stub and request are destroyed when refcount becomes 0, which happens only when the write operation is stack unwound and a reply for the write operation has come from underlying translators, for non-write unwind requests the request is first destroyed before resuming the stub). Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 280 (simple stripe, with write-behind set up, when dbench is run client crashes.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=280
* performance/write-behind: store currently aggregated data size in wb_fileRaghavendra G2009-09-231-27/+30
| | | | | | | | | | - this helps us to not traverse the request list whenever we need currently aggregated data in the queue Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: store the current window size in wb_file.Raghavendra G2009-09-231-44/+40
| | | | | | | | | | - this would increase the performance since we don't have to traverse the request list every time we need the current window size. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: reduce usage of iov_length.Raghavendra G2009-09-231-47/+27
| | | | | | | | | | - request structure now holds a member write_size which is initialised at the time of request creation and used later. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: add option "enable-trickling-writes".Raghavendra G2009-09-221-22/+41
| | | | | | | | | | | | | | - With this option enabled, writes are stack-wound even though not enough data is aggregated, provided there are no write-requests which are stack-wound but reply is yet to come. The reason behind this option is to make use of the network, which is relatively free (with no writes or replies in transit). However, with non-standard block-sizes of writes the performance can actually degrade. Hence making this configurable. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: reduce traversal of request list during wb_mark_winds.Raghavendra G2009-09-221-35/+28
| | | | | | | | | | | | | | | | - move all the decision making code to __wb_can_wind. - don't continue traversing the request list, once we know any of the following conditions are true: * requests other than write are present in queue. * writes are happening at non-contiguous offsets. * there are no write requests, which are wound to server but not yet received the reply. * enough data is aggregated for writing. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: reduce list-traversal during wb_mark_unwindsRaghavendra G2009-09-221-13/+19
| | | | | | | | | | - don't traverse entire request list to get the window-size, instead break when current window size becomes greater than configured limit. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: remove redundant traversal of write-requests in ↵Raghavendra G2009-09-221-3/+5
| | | | | | | | | | | | the wind list in wb_sync. - no need of getting the total_count of number of requests in the list. Even if there is a single request, we need to sync it. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: Aggregate adjacent contiguous write-buffers into ↵Raghavendra G2009-09-221-1/+77
| | | | | | | | | single iobuf. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/write-behind: fine-tune logic of wb_mark_windsRaghavendra G2009-09-221-65/+14
| | | | | | | | | | | | | | | - remove wb_mark_wind_aggregegate_size_aware, since wb_mark_wind_all does the same work (with check for whether current aggregated data size is greater than the configured limit before calling it). Moreover, wb_mark_wind_aggregate_size_aware called __wb_get_aggregate_size redundantly, thereby reducing the performance, since for small sized large number of writes, traversing the list of requests takes significant amount of time. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 276 (write behind needs to be optimized.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=276
* performance/quick-read: refine logic of qr_readv.Raghavendra G2009-09-221-3/+14
| | | | | | | | | | - An extra vector was being allocated when the number of bytes being read from cache were equal to the iobuf size. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 274 (Memory corruption in Apache running on booster) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=274
* performance/quick-read: optimizations to lookupRaghavendra G2009-09-221-24/+49
| | | | | | | | | | | - qr_lookup not to send request for file-content if the cache is already present during revalidates. - flush the cache in qr_lookup_cbk if the cache is not in sync with the file. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 273 (Code review and optimize quick-read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=273
* performance/quick-read: make a comment more explicit.Raghavendra G2009-09-221-2/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 273 (Code review and optimize quick-read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=273
* performance/quick-read: checking for qr_file in inode-context and creating ↵Raghavendra G2009-09-221-30/+45
| | | | | | | | | if not present should be atomic. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 273 (Code review and optimize quick-read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=273
* performance/quick-read: refine the logic in qr_lookup.Raghavendra G2009-09-221-40/+54
| | | | | | | | | | | | | - a new size has to be set in xattr_req only if (quick-read is configured with a maximum file size limit && ((xattr_req does not have a request key for getting content) || (the size requested in xattr_req is not equal to configured size in quick-read))) Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 273 (Code review and optimize quick-read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=273
* performance/write-behind: check for the presence of context only in fds not ↵Raghavendra G2009-09-221-6/+12
| | | | | | | | | opened on directories. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 260 (ls on booster VMP results in error: "File descriptor in bad state") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=260
* performance/quick-read: access glusterfs_ctx from xlator instead of using ↵Raghavendra G2009-09-171-1/+1
| | | | | | | | | | | | | | glusterfs_get_ctx - since glusterfs_get_ctx gets the global context pointer, there can be problems in a multithreaded application running on libglusterfsclient doing multiple glusterfs_inits. Hence use context specific to the current xlator tree stored in each xlator object. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 240 (segmentation fault in qr_readv) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=240
* io-cache: fix table->max_pri to 1 as the lowest priorityAnand Avati2009-09-161-1/+2
| | | | | | | | | | | | | patch http://patches.gluster.com/patch/1319/ breaks when no priority is mentioned in the config. the patch makes ioc_get_priority() return 1 as the value when no priority is given, but ioc_get_priority_list() was still returning 0 as the max_pri (maximum priority) which would result in lru list heads not getting initialized Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 261 (support for disabling caching of certain files) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=261
* 2.0.6 patch for io-cache pattern-matched non-cachingStephan von Krawczynski2009-09-151-5/+23
| | | | | | | | | | | | | | | | | | Hello all, here is a small feature patch. Its intention is to give the user more control over the files performance/io-cache really caches. If the user knows exactly which files should be cached and which shouldn't there is currently no way to tell glusterfs _not_ to cache certain pattern. This patch allows you to disable caching by setting the priority of a pattern to "0". If you do not give any priority option it works just like before and caches everything. Honestly I am not totally sure that disabling caching works the way we did it, please comment. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 261 (support for disabling caching of certain files) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=261
* backporting quick read to 2.0Raghavendra G2009-09-145-1/+2361
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 238 (Backport quick-read to 2.0 release) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=238
* backport stat-prefetch from 2.1Raghavendra G2009-09-134-385/+1763
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 257 (Backport stat-prefetch to 2.0) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=257
* performance/write-behind: hold locks when accessing members of wb_file.Raghavendra G2009-09-081-17/+75
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 243 (Hold locks when accessing members of wb_file_t.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=243
* performance/write-behind: communicate back the errors in writes to servers ↵Raghavendra G2009-09-081-1/+12
| | | | | | | | | in the next immediate writes from application. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 242 (If any of the writes fail, write-behind should not wait till the fd is closed for reporting errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=242
* read-ahead: use O_ACCMODE for checking file access modes.Raghavendra G2009-08-171-2/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 196 (write-behind window size getting set to 0.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=196
* write-behind: use O_ACCMODE while checking for O_RDONLY in flags.Raghavendra G2009-08-171-2/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 196 (write-behind window size getting set to 0.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=196
* 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>