I was plugging away at various tasks yesterday when I received a fun notification from Windows:
“You have low disk space on C:”
This isn’t unusual, as I have an SSD on my C: drive and have to clean it up every now again. I was surprised because I had just freed up 5-6 GB and was wondering what byte goblins were after my precious disk space this time.
The Redis Disk Goblin
I fired up WinDirStat, and low and behold, Tableau Server was the culprit! Specifically, the temp folder had two 1.5 GB files in it named RedisQFork_99999.dat.
I had been doing some Tableau Server testing on my local computer and realized that these must be cache files for the new Redis cache server in Tableau Server 9.0. I did, however, note that these files delete when Tableau Server stops.
Reclaiming My Disk Space
I thought, “Surely I’ll be able to configure the location of the temp directory.” It took a little bit of searching, but I found the service.temp.dir setting in the workgroup.yml file.
I shut down Tableau Server, changed this setting to my D: drive, restarted Tableau Server and VOILA! Everything in the temp folder moved to the new specified location on my D: drive. Oh, wait ... everything BUT the Redis heap file. It was still hanging out on my C: drive, just chillin’.
Oh, Redis Config, Where Art Thou?
Sigh. It was a bit deflating, but I was too far in to go back. I needed that disk space, and my OCD need to find and destroy the problem had kicked in.
I called my homeboy Google and said, “what’s up with Redis heap files.” He let me in on a secret: Heap file location was configurable on the command line when starting Redis.
I assumed that there was a file that kicked off all the Tableau processes and was right. It’s called tasks.yml. In there, you’ll find the command line for Redis:
command: "\"d:/Program Files/Tableau/Tableau Server/9.0/redis/bin/redis-server.exe\" \"C:/ProgramData/Tableau/Tableau Server/data/tabsvc/config/redis.conf\" --logfile \"C:/ProgramData/Tableau/Tableau Server/data/tabsvc/logs/cacheserver/redis_0.log\" --dir \"C:/ProgramData/Tableau/Tableau Server/data/tabsvc/cacheserver\" --heapdir\" C:/ProgramData/Tableau/Tableau Server/data/tabsvc/temp\" --dbfilename redisdb_0.rdb --port 6379"
There are actually two command lines, one for each Redis cache. I stopped Tableau Server, modified the –heapdir location and restarted Tableau Server.
And this time, it was for reals. We got the payoff! I had my 3 GB and was feeling good. Then I thought, “I need to get a bigger SSD drive. This is ridiculous!”