8 Replies Latest reply on Mar 15, 2018 10:07 AM by shrikant.patil.2

    How does Tableau Caching actually works?

    Charles Brett

      Hi Folks!

       

      Tableau Server Version Used: 10.1

       

      I've been trying to fully understand how caching works in Tableau Server. My understanding is that Tableau caches the required queries when those dashboards are viewed and kept until the specified cache time in Tableau Server Configuration (Image below). However, those cached items will be removed if many other dashboards are loaded after that (assuming cache size is limited). I understand that cache will be invalidated for other reason as well but if we focus on this, is it possible to increase the cache size so the cache will be kept longer regardless of other dashboards are accessed?

      caching_522x473.png

      The practical question I have is,

      My server has many dashboards but I have several key dashboards that require faster loading times than the other. For this reason, I'm using the subscription feature to warm up the cache. However, since other dashboards are also used frequently I have many instances where my key dashboards are taking longer to load. The things I see that can be improved are,

       

      1. Increase the subscription interval during peak hours
      2. Increase cache time specified in Tableau Server Configuration
      3. Increase cache size to manage the load ( does not have any documentation regarding this on Tableau Documentation)

       

      I want to understand if the latter 2 approaches are viable or not. The questions boil down to the following,

       

      1. If I increase the cache time will it have any impact? I'm asking this because if my understanding is correct, frequent use of other dashboards would kick them out of the cache regardless of the specified time.
      2. Is it possible to increase the cache size? I have seen this thread: Cache Sizes which talks about several server configurations exposed to change cache size. I see that they are not documented on Tableau. Does anybody have any idea if they actually have any impact on caching?

       

      Note: Improvements to dashboards are considered and followed upon. I want to understand what improvements can be done to increase cache hit rate for the key dashboards.

       

      Thank you for your time,

      Charlie

        • 1. Re: How does Tableau Caching actually works?
          Toby Erkson

          Increasing RAM is another option

          How much do you have and why can't it be increased?

          • 2. Re: How does Tableau Caching actually works?
            Charles Brett

            Hi Toby,

             

            I have no problem with increasing RAM. currently, I have 32gb Ram. My question is, will increasing ram alone reflect cache size improvements or is it restricted by the settings I have mentioned in the post?

            • 3. Re: How does Tableau Caching actually works?
              Toby Erkson

              Using Tableau's rule-of-thumb of 8GB/core that would indicate you have 4 cores.  If you have 8+ cores then you are severely under resourced.  How your Server is set up (e.g. how often you have caching set for in the Configure Tableau Server) can make a difference before twiddling with the inner-working switches.  Yes, Tableau is, at best, vague about those internal settings.

               

              I don't fully understand how caching works, however, I'm going to call out Russell Christopher as he's far more intimate than I with the inner workings of Tableau Server.

              • 4. Re: How does Tableau Caching actually works?
                adam.fenemore-jones

                Tableau as far as I know haven't made any comments or commitments regarding a feature that would allow you to query what Tableau has cached and any metadata round that (I asked specifically at the London Tableau on Tour Conference 2017). Come to think about it I should have a browse of Ideas and add it in there if its not already a thing.

                 

                As for how the cache works, well its not well documented as far as I can tell. From the information I have the server cache works as follows (corrections for inaccuracies/out of data info please community!)

                • Server cache is split down into four layers - Tile Cache, Model Cache, Abstract Cache and Query Cache
                • Tile Cache: Cache of server side renders of workbooks & views. Used when the server shows static flat versions of views & thumbnails when navigating around. This cache is shared amongst all users who touch them (so not session specific). Probably taxes the vizql process a lot to produce these items so saves a large amount of processing to have them cached because these are commonly touched by a lot of users. Tableau will supposedly do some dark magic with default views and hiding some views behind a pre-rendered image(s) until its interacted with. Think of this as a static snapshot cache of your default views.
                • Model Cache: "Next cache level down" from Tile Cache. Cache of data used to regenerate Tile Cache, but could be utilised on either the server or on the client-side. This is only used when there are no user filters in play. There's one Model cache per vizql process and is internal to the vizql processes.
                • Abstract Cache: Data taken (included blended data) from Data sources is stored here. This cache can be pre-warmed (aka. Sith Techniques) by hitting visualisations (subscriptions work, as would API calls) because this cache is shared across visualisations. Filters, as always, aren't taken into account. Explaining the difference between this and the query cache is tricky but I think of it as though Tableau is trying to cache column data that exists in your visualisations, rather than a full data set.
                • Query Cache - Native: The last place that Server will look before going away to the data source local to the server (or desktop). This is a store of data (the results sets) that's already been queried against a specific data sources already. Again, if a filter changes then the Native Cache can't be leveraged in a useful way. Queries against the native cache must match exactly before results can be pulled from there. This cache can be leveraged in desktop too.
                • Query Cache - External: The last place that Server will look before going away to whatever external data source you're using. It is distributed across several of the background processes on server (and exists in desktop specifically for file-based data sources only). If server or desktop has to go away to an external data source (like a database table) this cache is consulted first, just like the native cache. This cache will live for 12 hours unless you specify a value in your Server Configuration settings (or choose the Refresh More Often option). In general, this is the only Cache that the Server Configuration tool has any control over. To my knowledge.

                 

                Honestly, if you're looking for a faster performing report post cache warming i'd recommend trying to simplify you report design as much as possible. Remove filters and parameters that aren't commonly used, work with optimised extracts published to the server and only keep essential actions. The simpler a view is the more the server will be able to leverage it's cached data. I'd love to get the above clarified somewhere in at least published documentation (or a link to it if it exists!). Above has been mostly sourced from presentations and discussions @ tableau ontour conference

                 

                Note; I would expect this to change a lot when hyper arrives.

                2 of 2 people found this helpful
                • 5. Re: How does Tableau Caching actually works?
                  adam.fenemore-jones

                  Credit to Gaetan Bailby for all his help on this topic and his super useful presentation & Q&A session

                  • 6. Re: How does Tableau Caching actually works?
                    Charles Brett

                    Awesome! Thank you so much for the informative run down on how caching works. Any clue about how cache size work?

                    • 7. Re: How does Tableau Caching actually works?
                      adam.fenemore-jones

                      Unfortunately I have no information about these cache size settings change the behaviour of the various caches in server, I'd be guessing as to their function.