Print

Print


Hi Alastair,

Yes, we know that the memory caching proxy is somewhat slower than the 
disk caching proxy. That largely comes about due to the offset to memory 
location translation since the memory cache is essentially implementing 
a virtual address space architecture in software which is not cheap.

That said, the options are contradictory to the cache so it does the best 
it can. Assuming the download uses 2mb reads (does it?) and you are 
reading a full 1GB file with a cache limit of 2MB the cache is told to 
immediately evict the page that it has just read with no chance of 
pre-reading the next 2MB page. So, no I/O can be overlapped and it has to 
immediately reclaim the page after serving the data to honor the 
subsequent read. That will definitely slow it down and I would expect the 
transfer rate to be about 1/2 of the expected rate (which is what you 
see).

As for why this does not occur when you use a regular filesystem is likely 
because a regular filesystem will do prereads on its own and much of the 
loss is hidden as it will effectively be a memory to memory copy between 
the cache and the server.

You may want to add 'preread 1' which will preread the next page. Of 
course, feel free to use a larger value to see if it further improves 
things. Note that prereads bypass the cache limit, however the page it 
will not prevent early eviction of the page just previously read as the 
maximum allowed in 2MB.

Hope that makes it somewhat clearer.

Andy

On Thu, 1 Jul 2021, Alastair Dewhurst - STFC UKRI wrote:

> Hi All
>
> Tom Byrne and James Walder have been doing some detailed analysis of the performance of different XCache (in front of Ceph) at RAL[1,2].  We feel we understand what the disk cache is doing fairly well, however the  memory proxy has unexpected behaviour.  The most obvious example of this is when the request is for data larger than the max2cache.  In a situation like this, we believe the proxy should passthrough the request and we should effectively get the download speed without a proxy.  What we are actually observing is a throughput decrease of around 40%.
>
> The cache settings are:
> pss.cache max2cache 2m pagesize 2m size 17g
>
> If we disable the cache and download a 1GB file we will get ~130MB/s 
speed from Echo.  If we enable that line that same 1GB download will go at ~70MB/s.  If we try the same test with a normal file system behind it, there is very little difference between the download speeds, with or without the memory cache on.
>
> In general the memory proxy seems to be a bit less performant than the disk cache.   In some use cases you would expect memory to come out on top but it doesn?t., although these are harder to describe.
>
> For the memory passthrough, is our understanding of how it works correct?  Is there any obvious explanation for the issue we are seeing?  Are there any additional settings that we should be looking at?  Any other thoughts?
>
> Thanks
>
> Alastair
>
>
> [1] https://indico.cern.ch/event/1052334/contributions/4422229/attachments/2269798/3854559/xrootd5_wn_performance.pdf
> [2] https://indico.cern.ch/event/1052335/contributions/4422250/attachments/2269537/3862394/20210630_WNXrootd5_studies.pdf
> This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. Opinions, conclusions or other information in this message and attachments that are not related directly to UKRI business are solely those of the author and do not represent the views of UKRI.
>
>
> ########################################################################
> Use REPLY-ALL to reply to list
>
> To unsubscribe from the XROOTD-L list, click the following link:
> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1
>

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1