During the Tableau Conference I took some time out to attend a very odd session: Tableau Like a Sith.
Two masked gentlemen complete with Star Wars style robes explained “evil” ways to use Tableau. The grainy photo below is the only evidence these guys actually exist.
They got into cache warming, and as someone who focuses a bunch on Tableau Server the subject was pretty interesting to me.
Here are the highlights of what was said.
- Cache warming is hard
- Why? Because each viz to be cached must “hit” each VizqlServer process on your server before it’ll be dependably in cache for everyone
- It’s also impossible to force a particular workbook execution to occur on the VizqlServer process of your choice
- Some folks think that using tabcmd export or tabcmd get against a report will cache it. Wrong. The Application Server process is used for this work, and interactive rendering normally occurs within VizqlServer
- Based on the announcement made during the keynote around a future where the VizqlServer cache is shared, this approach won’t be as relevant moving forward
The quick-and-dirty tool that was shown is pretty simple: It executes any number of reports x times each every y minutes. Doing so gradually gets each workbook “on” all your VizqlServer processes until they are cached across the board. By the way, Interworks has an “industrial strength” solution if you want something dependable and supported by someone.
The following slide was shown to demonstrate what happened when the warmer executed a single dashboard using SQL Server as a data source every 15 minutes. In this case, the Tableau Server was quite small – a single i5 4-core processor. You can see that this box was running 3 different VizqlServer processes – this is overkill. I’d normally run 1 or (max) 2 on a similar box.
“Lord Flashypants” explained that this configuration was chosen on purpose to make across-the-board caching harder to achieve. In addition, he lowered two settings:
• wgserver.session_idle_limit lowered: 240 to 10
• vizqlserver.session.expiry.timeout lowered: 30 to 10
Lowering these setting allowed the sessions created by the “automated user” to be cleaned up more quickly, therefore allowing a new session to be bootstrapped when the user logged in later. When this happens, we hope the new session get created on a different VizqlServer process, therefore warming its cache. I probably wouldn’t do this in the real world. I’d keep these settings at higher values and have the tool execute reports at longer intervals than 15-45 minutes.
He also configured his machine to totally clear the cache every hour-and-a-half.
As you can see, it generally takes a while to get a report cached across all processes. Once that is done, things are fast until the cache is cleared and you start all over again.
You can download this little bit of nastiness here: https://github.com/DarthFlashyPants/sith-cache-warmer
Want to play with our demos? Please do:
Here’s what they do:
- Launchers: Various ways to launch vizzes. Pretty straight forward.
- Refreshers: Two mechanisms to automatically refresh vizzes - using a simple timer against a single viz, or multiple timers against multiple (duplicate) vizzes that refresh in a cadence and flip back and forth to create a more seamless transition (no spinners, no grey glass during refresh)
- Story Telling: Clippy! Clippy-as-avatar and guide. Make sure to click on a city OTHER than Adventure games to see him correct you.
- Responsive Tableau Vizzes: (Great on an iPad). Change the size of your browser and watch how a single viz refactors itself based on how much real estate is available
- Tables in the East: The Tableau Game: Mario-like console game where you try and make “Tables” a profitable category while driving behavior in a Tableau viz
- TabChat: You’ll need two for this demo. Get a buddy to login with you and start start selecting marks, changing filters, etc. Choose which changes your friend made to apply to “your” viz
And where is the source code? It’s here:
https://github.com/Kovner/TITETG // Tableau Game
https://github.com/Kovner/tabChat //Tableau Chat
https://github.com/russch/YouDidWhat2014 // Russell’s 6 examples
Sold out show, but never fear. it was recorded. The source code for the application we demonstrated can be downloaded here. Enjoy.
Tip of the day via Vish Raparthi. Thanks, Vish!
Are you doing something like creating and/or querying a site or user on Tableau with the REST API? Running into unexplainable 400 errors?
Make sure that you’re properly encoding any special symbols like ' :
Many tools & libraries will take care of this encoding for you (Postman, for example). However some libraries don’t. If this is the case, you may need to replace your single-quote symbol (or any other offensive character) with something like ' or other appropriate stand-in.
"The only Venn Diagram you’ll never need" - from Reddit.
Then Tableau wants to talk to you! Please reach out to me on Twitter, LinkedIn or via the contact page.
We want to understand your experiences around setup, performance, and so on for future improvement planning