You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "John Plevyak (JIRA)" <ji...@apache.org> on 2012/05/01 18:23:50 UTC

[jira] [Created] (TS-1238) RAM cache hit rate unexpectedly low

John Plevyak created TS-1238:
--------------------------------

             Summary: RAM cache hit rate unexpectedly low
                 Key: TS-1238
                 URL: https://issues.apache.org/jira/browse/TS-1238
             Project: Traffic Server
          Issue Type: Bug
          Components: Cache
    Affects Versions: 3.1.3
            Reporter: John Plevyak
            Assignee: John Plevyak
             Fix For: 3.1.4


The RAM cache is not getting the expected hit rate.  Looks like there are a couple issues.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1238) RAM cache hit rate unexpectedly low

Posted by "John Plevyak (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266934#comment-13266934 ] 

John Plevyak commented on TS-1238:
----------------------------------

I agree that such a configuration would be more convenient.  Before this patch it was 1 with LRU and 3 with CLFUS.   With this patch you can do 1 or 2 with LRU (where 2 was the default in 2.0 and 1 was the default in 3.0) and 2 or 3 with CLFUS (where in 3.0 the default was 3).  The higher number occurs when the seen_filter is ON.  What would be interesting to see is 1) if LRU is better with 1 or 2 and 2) if CLFUS with 2 is better (or worse) than LRU with 2.  This bug is basically that LRU @ 1 > CLFUS @ 3 for some workloads.   Ultimately, easier configuration and some guidelines or better yet, auto-tuning would be the objective.
                
> RAM cache hit rate unexpectedly low
> -----------------------------------
>
>                 Key: TS-1238
>                 URL: https://issues.apache.org/jira/browse/TS-1238
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 3.1.3
>            Reporter: John Plevyak
>            Assignee: John Plevyak
>             Fix For: 3.1.4
>
>         Attachments: TS-1238-jp-1.patch
>
>
> The RAM cache is not getting the expected hit rate.  Looks like there are a couple issues.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1238) RAM cache hit rate unexpectedly low

Posted by "Bryan Call (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266717#comment-13266717 ] 

Bryan Call commented on TS-1238:
--------------------------------

I will coordinate the testing of the patch, but it might take a couple days.  I will shoot for Friday right now looking at my schedule.

I had a feeling that it might have to do with the seen filter since it doesn't take effect until the cache is full.  It might be nice to have a configuration option on how many hits you need before it is promoted to ram cache.  On some workings sets having this configured to 1 might be better.
                
> RAM cache hit rate unexpectedly low
> -----------------------------------
>
>                 Key: TS-1238
>                 URL: https://issues.apache.org/jira/browse/TS-1238
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 3.1.3
>            Reporter: John Plevyak
>            Assignee: John Plevyak
>             Fix For: 3.1.4
>
>         Attachments: TS-1238-jp-1.patch
>
>
> The RAM cache is not getting the expected hit rate.  Looks like there are a couple issues.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1238) RAM cache hit rate unexpectedly low

Posted by "Bryan Call (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13277202#comment-13277202 ] 

Bryan Call commented on TS-1238:
--------------------------------

You can ignore the information about the average object size.  That was for disk cache.  I don't know what I was thinking at the time...

After a couple days the CFLUS is getting about the same cache hit ratio as LRU.  In a five minute period it is too hard to tell.  Sometimes it is better or worse by ~.1%.

It would be nice to have a stat for the number of times that cache fails to get a lock.  I would assume there are different locks for RAM and disk cache?  Also, it is my understanding that if Traffic Server can't get a lock it will retry a configurable number of times and go to the origin server.  It might be nice to have a stat for when this happens too.

                
> RAM cache hit rate unexpectedly low
> -----------------------------------
>
>                 Key: TS-1238
>                 URL: https://issues.apache.org/jira/browse/TS-1238
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 3.1.3
>            Reporter: John Plevyak
>            Assignee: John Plevyak
>             Fix For: 3.1.4
>
>         Attachments: TS-1238-jp-1.patch
>
>
> The RAM cache is not getting the expected hit rate.  Looks like there are a couple issues.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1238) RAM cache hit rate unexpectedly low

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270768#comment-13270768 ] 

Leif Hedstrom commented on TS-1238:
-----------------------------------

Is this committed and fixed on trunk? Or are we pending more changes? I'm trying to get a handle on 3.1.4 release, so we can get a 3.2 release out "soon"...
                
> RAM cache hit rate unexpectedly low
> -----------------------------------
>
>                 Key: TS-1238
>                 URL: https://issues.apache.org/jira/browse/TS-1238
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 3.1.3
>            Reporter: John Plevyak
>            Assignee: John Plevyak
>             Fix For: 3.1.4
>
>         Attachments: TS-1238-jp-1.patch
>
>
> The RAM cache is not getting the expected hit rate.  Looks like there are a couple issues.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1238) RAM cache hit rate unexpectedly low

Posted by "John Plevyak (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13276422#comment-13276422 ] 

John Plevyak commented on TS-1238:
----------------------------------

I think the problem is that the LRU cache doesn't account for its overhead, while the CLFUS cache does which puts it at an unfair disadvantage in terms of relative true memory used per byte allocated.  The CLFUS cache is much better behaved when the working set is larger than the RAM cache size and it supports compression.  I am going to commit this fix and leave CLFUS as the default and file another bug to fix the accounting for ram in the LRU cache.   I think this will make the performance comparable in the best case and better in worse cases.
                
> RAM cache hit rate unexpectedly low
> -----------------------------------
>
>                 Key: TS-1238
>                 URL: https://issues.apache.org/jira/browse/TS-1238
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 3.1.3
>            Reporter: John Plevyak
>            Assignee: John Plevyak
>             Fix For: 3.1.4
>
>         Attachments: TS-1238-jp-1.patch
>
>
> The RAM cache is not getting the expected hit rate.  Looks like there are a couple issues.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1238) RAM cache hit rate unexpectedly low

Posted by "John Plevyak (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271042#comment-13271042 ] 

John Plevyak commented on TS-1238:
----------------------------------

It isn't committed.   Bryan was going to try it out.  It changes one of the
defaults (probably for the better) for RAM caching, but I wanted to give
him a chance to take a look.  I'll see if I can figure it out myself as
well.  It should be a very safe change.



                
> RAM cache hit rate unexpectedly low
> -----------------------------------
>
>                 Key: TS-1238
>                 URL: https://issues.apache.org/jira/browse/TS-1238
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 3.1.3
>            Reporter: John Plevyak
>            Assignee: John Plevyak
>             Fix For: 3.1.4
>
>         Attachments: TS-1238-jp-1.patch
>
>
> The RAM cache is not getting the expected hit rate.  Looks like there are a couple issues.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TS-1238) RAM cache hit rate unexpectedly low

Posted by "Bryan Call (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13274771#comment-13274771 ] 

Bryan Call commented on TS-1238:
--------------------------------

I am running a patched version of 3.1.3 in production right now. It is busy filling up the ram cache.

Since we are already running 3.1.3 in production and using LRU, I thought it would be a better A/B test to patch 3.1.3 instead of using HEAD and introducing more variables.

                
> RAM cache hit rate unexpectedly low
> -----------------------------------
>
>                 Key: TS-1238
>                 URL: https://issues.apache.org/jira/browse/TS-1238
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 3.1.3
>            Reporter: John Plevyak
>            Assignee: John Plevyak
>             Fix For: 3.1.4
>
>         Attachments: TS-1238-jp-1.patch
>
>
> The RAM cache is not getting the expected hit rate.  Looks like there are a couple issues.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TS-1238) RAM cache hit rate unexpectedly low

Posted by "John Plevyak (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Plevyak updated TS-1238:
-----------------------------

    Attachment: TS-1238-jp-1.patch

Add new option to disable/enable the seen_filter in the RAM cache.  Fix reporting of RAM cache hits to HTTP.  Fix for LRU cache.  Add back in seen_filter to LRU (disabled by default).  Disable seen filter by default for CLFUS.
                
> RAM cache hit rate unexpectedly low
> -----------------------------------
>
>                 Key: TS-1238
>                 URL: https://issues.apache.org/jira/browse/TS-1238
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 3.1.3
>            Reporter: John Plevyak
>            Assignee: John Plevyak
>             Fix For: 3.1.4
>
>         Attachments: TS-1238-jp-1.patch
>
>
> The RAM cache is not getting the expected hit rate.  Looks like there are a couple issues.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira