Optix render kernels constantly reloading on Linux #73076

Closed
opened 2020-01-13 01:23:12 +01:00 by Christopher Burns · 21 comments

System Information
Operating system: Ubuntu 19.10
Graphics card: 2x2080ti (v440.44, CUDA 10.2)

Blender Version
Broken: 2.81a Linux
Worked: 2.81a Windows

Switching between Cycles and any other render mode, then back to Cycles (GPU), triggers a lengthy reload of render kernels (several minutes)

Works fine on Windows 10

Exact steps for others to reproduce the error

Using a computer with an RTX GPU

  1. Switch to Cycles (GPU) mode with OptiX enabled in settings
  2. Switch back to Solid
  3. Switch back to Cycles

... and so on

Note that the render kernels are re-loaded in each time and that it takes a long time (more than one minute each time)

Based on the default startup or an attached .blend file (as simple as possible).

**System Information** Operating system: Ubuntu 19.10 Graphics card: 2x2080ti (v440.44, CUDA 10.2) **Blender Version** Broken: 2.81a Linux Worked: 2.81a Windows Switching between Cycles and any other render mode, then back to Cycles (GPU), triggers a lengthy reload of render kernels (several minutes) Works fine on Windows 10 **Exact steps for others to reproduce the error** Using a computer with an RTX GPU 1. Switch to Cycles (GPU) mode with OptiX enabled in settings 2. Switch back to Solid 3. Switch back to Cycles ... and so on Note that the render kernels are re-loaded in each time and that it takes a long time (more than one minute each time) Based on the default startup or an attached .blend file (as simple as possible).

Added subscriber: @christopher.burns

Added subscriber: @christopher.burns

When I disable OptiX in settings, the problem goes away

When I disable OptiX in settings, the problem goes away

Added subscribers: @pmoursnv, @mano-wii

Added subscribers: @pmoursnv, @mano-wii

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

@christopher.burns, can you update the description and add the steps to reproduce the problem (including: enable OptiX)?

I don't have an Nvidia card to test.

@pmoursnv, is this something you can confirm?

From what I could understand, the steps to reproduce the problem are:

  • enable OptiX.
  • with the engine cycles, switch between rendered and any other render mode.
  • note this triggers a lengthy reload of render kernels.

I don't know if this is a known limitation.

@christopher.burns, can you update the description and add the steps to reproduce the problem (including: enable OptiX)? I don't have an Nvidia card to test. @pmoursnv, is this something you can confirm? From what I could understand, the steps to reproduce the problem are: - enable OptiX. - with the engine cycles, switch between rendered and any other render mode. - note this triggers a lengthy reload of render kernels. I don't know if this is a known limitation.
Member

Render kernels being reloaded when switching settings is normal, this happens with all APIs. The OptiX kernels are cached though, to avoid that taking a long time: On Windows in %LOCALAPPDATA%\NVIDIA\OptixCache, on Linux in /var/tmp/OptixCache_$USER.
Make sure this is the case. If not, try overriding the cache path with an environment variable called OPTIX_CACHE_PATH.

Render kernels being reloaded when switching settings is normal, this happens with all APIs. The OptiX kernels are cached though, to avoid that taking a long time: On Windows in `%LOCALAPPDATA%\NVIDIA\OptixCache`, on Linux in `/var/tmp/OptixCache_$USER`. Make sure this is the case. If not, try overriding the cache path with an environment variable called `OPTIX_CACHE_PATH`.

Added subscriber: @patrick-24

Added subscriber: @patrick-24

@pmoursnv I do see a 40MB cache7.db file in /var/tmp/OptixCache_chris, but the problem persists

@pmoursnv I do see a 40MB cache7.db file in /var/tmp/OptixCache_chris, but the problem persists

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'
Brecht Van Lommel changed title from Render kernels constantly reloading, taking a long time to Optix render kernels constantly reloading on Linux 2020-01-18 17:39:57 +01:00

Added subscriber: @brecht

Added subscriber: @brecht

@brecht @pmoursnv Is there some debug info or logs I can provide to help resolve this?

@brecht @pmoursnv Is there some debug info or logs I can provide to help resolve this?
Member

You can run Blender with --debug-cycles which should print a bunch of OptiX debug info to the console and contain information about whether caching was succesfull or not.

You can run Blender with `--debug-cycles` which should print a bunch of OptiX debug info to the console and contain information about whether caching was succesfull or not.

W0120 08:39:19.912971 26901 device_optix.cpp:242] Failed to search the cache. file is not a database
Statement is SELECT size, value FROM cache_info INNER JOIN cache_data ON cache_info.key=cache_data.key WHERE cache_info.key='ptx-7258589-> > key0777dac09f5fa2654d1e18a439740e29-sm_75-rtc1-drv440.44' LIMIT 1;
I0120 08:39:19.912991 26901 device_optix.cpp:245] Cache miss for key: ptx-7258589-key0777dac09f5fa2654d1e18a439740e29-sm_75-rtc1-drv440.44
W0120 08:40:32.332262 26901 device_optix.cpp:242] Could not query the database size: file is not a database

Deleting the cache.db file seems to have resolved the issue. I'm running multiple blender versions (2.81, 2.82, 2.83), if that matters

> W0120 08:39:19.912971 26901 device_optix.cpp:242] Failed to search the cache. file is not a database > Statement is SELECT size, value FROM cache_info INNER JOIN cache_data ON cache_info.key=cache_data.key WHERE cache_info.key='ptx-7258589-> > key0777dac09f5fa2654d1e18a439740e29-sm_75-rtc1-drv440.44' LIMIT 1; > I0120 08:39:19.912991 26901 device_optix.cpp:245] Cache miss for key: ptx-7258589-key0777dac09f5fa2654d1e18a439740e29-sm_75-rtc1-drv440.44 > W0120 08:40:32.332262 26901 device_optix.cpp:242] Could not query the database size: file is not a database Deleting the cache.db file seems to have resolved the issue. I'm running multiple blender versions (2.81, 2.82, 2.83), if that matters
Member

Changed status from 'Needs Triage' to: 'Resolved'

Changed status from 'Needs Triage' to: 'Resolved'
Patrick Mours self-assigned this 2020-01-20 17:54:55 +01:00
Member

It's generally good practice to delete the cache when updating drivers. Your cache got corrupted for some reason (could have been a driver update that changed the format, or just an incomplete write because an OptiX app crashed, ...). Either way, this is not a Blender bug, but rather related to how caching works in OptiX itself.
Glad to hear it is resolved now, so closing this. Let me know if you run into issues again in the future.

It's generally good practice to delete the cache when updating drivers. Your cache got corrupted for some reason (could have been a driver update that changed the format, or just an incomplete write because an OptiX app crashed, ...). Either way, this is not a Blender bug, but rather related to how caching works in OptiX itself. Glad to hear it is resolved now, so closing this. Let me know if you run into issues again in the future.

Blender should just delete the cache if it's corrupt or unreadable for any reason

Blender should just delete the cache if it's corrupt or unreadable for any reason
Member

Maybe I should have clarified this before: The cache is not created by Blender. It is created an managed by OptiX (for all OptiX applications).
Blender doesn't now if it is corrupt or not (which by itself is an unlikely event, you just got really unfortunate here). There being a cache is opaque and hidden behind the OptiX API. Blender cannot and should not do anything about it.

Maybe I should have clarified this before: The cache is not created by Blender. It is created an managed by OptiX (for all OptiX applications). Blender doesn't now if it is corrupt or not (which by itself is an unlikely event, you just got really unfortunate here). There being a cache is opaque and hidden behind the OptiX API. Blender cannot and should not do anything about it.

Added subscriber: @Funnybob

Added subscriber: @Funnybob

In my case, it rebuilds every time I change a settings in the shader. I added a brightness contrast node. If I change any of the two parameters, it reloads. It's unusable. 2.90.0

In my case, it rebuilds every time I change a settings in the shader. I added a brightness contrast node. If I change any of the two parameters, it reloads. It's unusable. 2.90.0

Added subscriber: @Hekhen

Added subscriber: @Hekhen

I think I got a solution for this issue.

I changed the Memory Cache Limit, under Video Sequencer from 4096 to 16384. this seems to have fixed my issue.

image.png

I think I got a solution for this issue. I changed the Memory Cache Limit, under Video Sequencer from 4096 to 16384. this seems to have fixed my issue. ![image.png](https://archive.blender.org/developer/F10465317/image.png)
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
5 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#73076
No description provided.