[Gluster-users] quick-read vs. io-cache - was Re: mod_glusterfs?
Krishna Srinivas
krishna at gluster.com
Thu Mar 25 00:11:54 UTC 2010
On Wed, Mar 24, 2010 at 10:38 AM, Ian Rogers
<ian.rogers at contactclean.com> wrote:
> On 23/03/2010 18:40, Raghavendra G wrote:
>>
>>
>> On Tue, Mar 23, 2010 at 5:05 PM, Ian Rogers <ian.rogers at contactclean.com
>> <mailto:ian.rogers at contactclean.com>> wrote:
>>
>> Yes I know, I reported that bug :-)
>>
>> If you're using io-cache then quick-read seems irrelevant as
>> io-cache has 128K pages internally.
>>
>>
>> io-cache and quick-read perform different functions. Normally while
>> reading a file, glusterfs (fuse) get following calls from VFS,
>>
>> lookup,
>> open,
>> read,
>> .
>> .
>> .
>> read,
>> flush,
>> close.
>>
>> But quick-read exploits an internal feature of glusterfs present in lookup
>> to get the entire file in lookup call itself. Hence open, read and close
>> calls are short-cut at quick-read itself and they don't reach server thereby
>> saving 3 transactions over network (probably more due to read).
>
> Is it possible for io-cache to detect if a file is smaller than the internal
> page size (or whatever the cut-off is) and then use the quick-read shortcut
> itself?
>
> In a LAMP situation I'd be wanting to use io-cache but there's also a lot of
> small files. Having both io-cache and the quick-read cache would just mean
> the files are double cached - using up twice the memory needed as well as an
> extra set of memory copies to shuffle things around.
Good point :) you will have this double cache problem if you use
iocache above quickread. But if you use quick read above iocache, only
quickread caches it (as iocache will never get any open/read calls for
the small files as quickread fetches all the data in the lookup call)
Hence to avoid the double caching problem always use quickread on top
of iocache. (i.e in the volfile quickread will be below iocache)
Krishna
>
> Because of this, and the no-total-size-limit bug in quick-read, I'd quite
> like quick-read to be deprecated and it's functionality added to io-cache
> rather than fixing the memory limit bug in quick-read.
>
> Regards,
>
> Ian
>
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://gluster.org/cgi-bin/mailman/listinfo/gluster-users
>
>
More information about the Gluster-users
mailing list