BVH cache files not handled properly #40188

Closed
opened 2014-05-14 06:28:59 +02:00 by Shane Ambler · 20 comments

Blender Version
2.70a

Short description of error
Currently blender saves bvh cache files - generated when Cycles has Cache BVH enabled - to a folder called cache that is located at the same location as the config folder containing startup.blend.

Ideally blender should save temporary cache files to the location defined by the environment variable $TMP or it's default equivalent. For a saved blend file, creating the cache folder to be located in the same folder as the blend file could also be acceptable.

An option to specify the location could be an improvement, either in the Performance panel or within the File section of User Preferences. Another possibility is to define another environment variable that the user can set to specify the cache location.

**Blender Version** 2.70a **Short description of error** Currently blender saves bvh cache files - generated when Cycles has Cache BVH enabled - to a folder called cache that is located at the same location as the config folder containing startup.blend. Ideally blender should save temporary cache files to the location defined by the environment variable $TMP or it's default equivalent. For a saved blend file, creating the cache folder to be located in the same folder as the blend file could also be acceptable. An option to specify the location could be an improvement, either in the Performance panel or within the File section of User Preferences. Another possibility is to define another environment variable that the user can set to specify the cache location.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @sambler

Added subscriber: @sambler

Added subscriber: @tier777

Added subscriber: @tier777

Added subscriber: @mont29

Added subscriber: @mont29
Brecht Van Lommel was assigned by Sergey Sharybin 2014-05-14 13:02:03 +02:00

Added subscribers: @brecht, @Sergey

Added subscribers: @brecht, @Sergey

I don't really consider this is a bug, rather more like a design discusion. Would let @brecht to decide.

I don't really consider this is a bug, rather more like a design discusion. Would let @brecht to decide.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

It was done this way by design, the purpose was to allow caching BVHs when rendering an animation in the background or rerendering interactively, while at the same time not taking up too much disk space.

Saving it next to the .blend would give you many cache files, and saving it in the temporary folder is not correct when the file needs to be reused between different Blender runs.

Further, this feature will likely be removed when we optimize BVH building more.

It was done this way by design, the purpose was to allow caching BVHs when rendering an animation in the background or rerendering interactively, while at the same time not taking up too much disk space. Saving it next to the .blend would give you many cache files, and saving it in the temporary folder is not correct when the file needs to be reused between different Blender runs. Further, this feature will likely be removed when we optimize BVH building more.

@brecht: Thanks for stepping in! I also don't see this as an error.
For your info: Consumption of disk space was exactly the problem that prompted this request over on blender.stackexchange (see http://blender.stackexchange.com/q/9291/1259). But maybe the real issue there is why the cache was taking up so much space in the first place?

My original request also was not to put the cache next to the blend file but simply to be able to specify a location at all in case the default location is inconvenient...

@brecht: Thanks for stepping in! I also don't see this as an error. For your info: Consumption of disk space was exactly the problem that prompted this request over on blender.stackexchange (see http://blender.stackexchange.com/q/9291/1259). But maybe the real issue there is why the cache was taking up so much space in the first place? My original request also was not to put the cache next to the blend file but simply to be able to specify a location at all in case the default location is inconvenient...
Author

Probably of note is that "Cache BVH" sounds like an option that many people will just turn on without knowing or looking into when it offers a benefit. I'd say that a majority of animations won't benefit from it so there will be many users that end up with a cache file for every frame of every animation they have rendered.

With the cache files tucked away in a location that many users don't look at means they end up with a lot of stale cache files that won't be re-used. This also includes cache files from previous versions. Looking into this I found I still had cache files left over as far back as 2.64

Probably of note is that "Cache BVH" sounds like an option that many people will just turn on without knowing or looking into when it offers a benefit. I'd say that a majority of animations won't benefit from it so there will be many users that end up with a cache file for every frame of every animation they have rendered. With the cache files tucked away in a location that many users don't look at means they end up with a lot of stale cache files that won't be re-used. This also includes cache files from previous versions. Looking into this I found I still had cache files left over as far back as 2.64

Added subscriber: @EdwardBaker

Added subscriber: @EdwardBaker

I really think the fact that the cache is not deleted nor temporary is a very poor design choice. There are two very big reasons for this.

  1. There is no indication in Blender that the BVH is stored perpetually
  2. There is no clear cache button like there is for other cache (bake) solutions in Blender.

I literally just cleaned 94 Gigs of data off of my disk from several versions of Blender in my applications support folder (OS X). I couldn't figure out why I was suddenly losing around 45 Gigs of space. When I ran Disk Inventory X, I was stunned that that much was nothing but caches.

This needs to be changed or updated to let people know.

I really think the fact that the cache is not deleted nor temporary is a very poor design choice. There are two very big reasons for this. 1. There is no indication in Blender that the BVH is stored perpetually 2. There is no clear cache button like there is for other cache (bake) solutions in Blender. I literally just cleaned 94 Gigs of data off of my disk from several versions of Blender in my applications support folder (OS X). I couldn't figure out why I was suddenly losing around 45 Gigs of space. When I ran Disk Inventory X, I was stunned that that much was nothing but caches. This needs to be changed or updated to let people know.

Added subscriber: @zeauro

Added subscriber: @zeauro

IMO, if there is no intention to specify a render output different to tmp, I don't think there is intention to store bvh cache.

It should be at same location as render output instead of preferences location.

IMO, if there is no intention to specify a render output different to tmp, I don't think there is intention to store bvh cache. It should be at same location as render output instead of preferences location.

Added subscriber: @Mitchman

Added subscriber: @Mitchman

This seems to be a big issue with my workflow.

My C drive fills up with BVH cache files when I batch render overnight. I've got a big dedicated cache drive just for this purpose, but I can't get Blender to use it.

This seems to be a big issue with my workflow. My C drive fills up with BVH cache files when I batch render overnight. I've got a big dedicated cache drive just for this purpose, but I can't get Blender to use it.

It is a bit vague definition around "can't get Blender to use it". Cached BVH only helps for static objects.

If you feel like there's a bug somewhere please submit a separate report.

It is a bit vague definition around "can't get Blender to use it". Cached BVH only helps for static objects. If you feel like there's a bug somewhere please submit a separate report.

Added subscriber: @GeorgesDahdouh

Added subscriber: @GeorgesDahdouh

I understand that there are technical reasons to store BVH cache in a specific location, but is it possible at least to make clearing the cashe doable from within Blender UI? TBH, adding it as an option sounds reasonable and more functional than just burrying it in a specific mandatory folder where many users don't know about, keep wondering what's consuming my hard drive space? There could be a warning that changing BVH cache folder might affect other operations. Or otherwise a reminder note that BVH cache is stored in location X on your hard drive.
Thank you.

I understand that there are technical reasons to store BVH cache in a specific location, but is it possible at least to make clearing the cashe doable from within Blender UI? TBH, adding it as an option sounds reasonable and more functional than just burrying it in a specific mandatory folder where many users don't know about, keep wondering what's consuming my hard drive space? There could be a warning that changing BVH cache folder might affect other operations. Or otherwise a reminder note that BVH cache is stored in location X on your hard drive. Thank you.
Author

This was closed and is no longer relevant. From 2.77 there is no bvh disk cache used.

See dfadf18659 and 97a3fa17d6

This was closed and is no longer relevant. From 2.77 there is no bvh disk cache used. See dfadf18659 and 97a3fa17d6
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
9 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#40188
No description provided.