Excessive Camera Raw Scratch File Allocation in Lightroom 9.6 – AI Masking Exhausts Available Disk Space
Excessive Camera Raw Scratch File Allocation in Lightroom 9.6 – AI Masking Exhausts Available Disk Space
I am experiencing a similar issue with Lightroom Desktop, where Camera Raw generates excessive temporary scratch files (cr_sdk_), rapidly consuming available internal SSD storage and eventually causing application or system instability.
System configuration:
-
MacBook Pro 15-inch, 2018 (MacBookPro15,1)
-
Intel Core i7-8750H, 2.2 GHz, 6-core
-
16 GB DDR4 RAM
-
AMD Radeon Pro 555X, 4 GB dedicated VRAM
-
256 GB internal SSD
-
macOS 14.8.7 (23J520)
-
Lightroom 9.6 MAS x64
-
Build: 20260923-1659-a32d844
-
Internal Camera Raw: 18.7 [2743]
Steps to reproduce:
-
Open Lightroom Desktop.
-
Open an existing edited photograph from a stack of six Nikon D850 RAW photographs (45.7 MP).
-
Select the masking tool on a photograph containing multiple existing masks.
-
Monitor available SSD storage and Camera Raw scratch-file allocation.
No additional masks or editing adjustments are necessary to reproduce the issue. Simply opening the photograph and selecting the masking tool is sufficient.
Measured results:
| Metric | Before | After |
|---|---|---|
| Internal SSD usage | 219.19 GB | 245.52 GB |
| Available storage | 31.50 GB | 5.17 GB |
| RAM usage | 7.70 GB | 11.56 GB |
| Swap usage | 1.14 GB | 2.59 GB |
| Memory pressure | Green | Green |
Total additional disk consumption was 26.33 GB, while swap usage increased by only 1.45 GB.
Using the macOS lsof command to monitor Camera Raw scratch files, I recorded the following sequential measurements:
| Scratch-file entries | Reported size |
|---|---|
| 1 | 0.0 GB |
| 1 | 0.1 GB |
| 7 | 13.9 GB |
| 8 | 15.8 GB |
| 7 | 14.1 GB |
| 7 | 14.2 GB |
| 11 | 23.6 GB |
| 12 | 24.1 GB |
The file sizes are estimates based on open-file listings, but the increase is consistent with independently measured SSD consumption.
Additional troubleshooting and observations:
-
Lightroom's photo cache is limited to 5 GB.
-
Lightroom is confirmed to be using the dedicated AMD Radeon GPU.
-
GPU initialization and compute support are successful.
-
Lightroom reported peak physical memory usage of approximately 6.36 GB.
-
Camera Raw reported virtual memory usage of 691 MB out of 6,144 MB.
-
macOS memory pressure remained green throughout the observed measurements.
-
The Camera Raw diagnostic log confirms GPU-based ML inference with persistent model loading enabled, but contains no detailed scratch-file allocation statistics.
These observations suggest that the excessive disk usage is associated with Camera Raw scratch-file allocation rather than the configured photo cache or macOS swap memory.
Requested engineering investigation:
-
Determine why Camera Raw allocates and retains approximately 24 GB of temporary scratch files when opening the masking panel on a single photograph.
-
Investigate whether existing AI masks trigger unnecessary processing or inefficient scratch-file retention.
-
Implement more aggressive reclamation or reuse of temporary scratch-file storage.
-
Consider implementing a configurable scratch-file storage limit.
-
Provide an option to designate an external SSD for Camera Raw scratch-file storage, similar to Photoshop's scratch-disk configuration.
-
Identify any available workaround or recommended Lightroom version that does not exhibit this behavior.
This issue makes Lightroom effectively unusable on my computer for certain photographs, even when sufficient RAM is available and the photo cache is restricted.
I would appreciate having this issue escalated directly to the Lightroom and Camera Raw engineering teams for investigation.
