Print

Print


Hi Wilko,

Your answers were very helpful.  I better understand the cache 
directive, but I am curious if anyone has used largish partitions to 
create a cache?

Our partitions will be 6.5TB (XFS) and I am a little dubious about using 
such a large partition to support a cache.  In the scenario that you 
outline all of the files would reside in the base directory of the cache 
directory (/xrd/cache01 or /xrd/cache02).  I am concerned that the 
directory would have a large number of files which might result in 
slower access to files because the way that linux deals with large 
directories.


Another alternative is to use LVM to create one large partition, but I 
will need to look at the load balancing issues when some servers have 
twice as much storage than others.

Any and all advice or experience is appreciated,

Patrick





Wilko Kroeger wrote:
> 
> Hello Patrick
> 
> Fabrizio answered already most of the question. I just have a few comments.
> 
> If you have more then one partition that an xrootd server should serve 
> you should use the cache directive.
> The cache is working by placing a file in a cache directory and creating 
> a link between this file and the proper file name. For example:
> if the file name is /xrd/test/d1/file1 and your you use the the cache 
> directive
> ooss.cache /xrd*
> the file would be put (lets pick cache xrd2) into
>    /xrd2/%xrd%test%d1%file1
> and a link is created:
>> ls -l /xrd/test/d1/file1 ->  /xrd2/%xrd%test%d1%file1
> 
> As you can see there are no directories in the cache. The file name in 
> the cache is the proper file name with all '/' replaced by '%'.
> 
> 
> As xrootd will export /xrd you have to create a /xrd directory. I guess 
> this will not be in the '/' root partition but in one of you data 
> partition (/xrd1 /xrd2) and therefore you will need a link.
>  /xrd -> /xrd1
> 
> However, in this case, doing an 'ls /xrd' would list all files in /xrd1 
> which could be quite large depending how many files you have. Therefore, 
> you might want to have a link like
>  /xrd -> /xrd1/xrd
> In this case 'ls /xrd' would not list the files in the /xrd1 cache.
> 
> Another possibility would be to make the cache directories a little bit 
> more explicit. Mount your two partitions as:
> /xrd
> /xrd/cache1
> and create the directory
> /xrd/cache0
> and then use
> ooss.cache /xrd/cache*
> 
> I hope these comments helped a little bit.
> 
>   Cheers,
>       Wilko
> 
> 
> 
> On Wed, 7 Nov 2007, Patrick McGuigan wrote:
> 
>> Hi,
>>
>> I am setting up an xrootd cluster for the first time and I have a 
>> question about the oss.cache directive.
>>
>> Some of my data servers have two partitions (and some have one) that I 
>> want to use for storage.  Is it true that the oss.cache directive MUST 
>> be used to put two partitions into service?  How is load balancing 
>> (based on space) managed on caches versus partitions?  Are there any 
>> performance penalties to using the cache directive?
>>
>> Finally, when a directory is created within a cache, does the 
>> directory get created on both partitions?
>>
>>
>>
>> If the partition on a one mount server is /xrd1 and the partitions on 
>> dual-mount server are /xrd1 and /xrd2, would the following snippet 
>> from the config file be appropriate:
>>
>>
>> #
>> #
>> olb.path rw /xrd
>> #
>> oss.cache public /xrd*
>> #
>> xrootd.fslib /opt/xrootd/lib/libXrdOfs.so
>> xrootd.export /xrd
>>
>>
>>
>> I am expecting this to create a global namespace rooted at /xrd that 
>> is writable and would use both partitions of dual-mount data server.
>>
>>
>>
>> Thanks for any information,
>>
>> Patrick
>>