ID:106721
 
Resolved
A long-running server that never fully shut down could build up too many cache files over time.
BYOND Version:478
Operating System:FreeBSD
Web Browser:
Applies to:Dream Daemon
Status: Resolved (480)

This issue has been resolved.
During extended uptime of DreamDaemon, $HOME/.byond/cache will fill up with lots of files. Given enough time, there will be hundreds of thousands of files in the cache directory.

There are a couple things I'd like to suggest:

1. Cleanup of cache items that are no longer needed.

2. Extend the cache directory structure, eg:

$HOME/.byond/cache/1/1/11C8C4F8 vs $HOME/.byond/cache/11C8C4F8
$HOME/.byond/cache/7/D/7D7FF906 vs $HOME/.byond/cache/7D7FF906

This solves cleanup issues where there are far too many files to effectively clean up this directory manually (gotta love rm complaining about too many arguments).

3. Add a DreamDaemon option (or env variable) that allows setting of a custom cache directory instead of using $HOME/.byond/cache.

(are there collision issues when two servers are actively using the same cache directory? I don't know -- I started giving my servers a custom $HOME to make it easier to handle)
Any chance this could have an effect on CPU usage?
It shouldn't. The files were properly closed, but they weren't being deleted until exit. Now they'll be deleted upon closure (which is usually immediate).