Buckets and Environment Variables

I’ve done some googling and found how to set bucket size and bucket count with environment variables. Is there any way to do this for the CPU buckets in hybrid mode? Furthermore, is there any way to set bucket size per machine/per device?

My use case:
I’ve got five machines each with different hardware:

AMD 9950X, RTX 5090
AMD 9950X, RTX 3090ti
AMD 9950X, RTX 5070
AMD Threadripper 3995WX 64 Core, RTX 5070
AMD Threadripper first gen 16 Core, RTX 3060

I don’t even use the RTX 3060 machine for GPU rendering, but for the others, my 64 core machine is actually slower on the CPU side than my 9950X machines. It’d be very helpful if I could dial down the size of CPU buckets so I don’t end up with a bunch of buckets from that machine slowing down my network render.

Decreasing the GPU bucket size on my workstation (9950X, RTX 5090) to 32 pixels with the environment variable gives me the fast possible DR render speed I can accomplish on my current hardware, but I know I’d be able to squeeze even a little more speed out of it with a bit more control. I’ve noticed changing that bucket size changes the size of the CPU buckets proportionally, but I’d still like to have more fine control over it for particular scenes and use cases - particularly very complex scenes.

When rendering simple scenes, it doesn’t matter so much.

Any thoughts on this? I know it’s a bit of a hot button issue from my googling.

Not sure if we have a separate control for that. Tried changing the bucket size (of CPU buckets) while in GPU (via script), but it doesn’t seem to make a difference. They seem linked with the GPU bucket size.

Doubt it. This seems scene-specific, like the CPU bucket size (although the parameters for GPU bucket size aren’t exposed anywhere), hence why the slaves’ machines follow what’s given to them by the main workstation (tested it).

@Muhammed_Hamed will give you more details.

What kind of resolution and scenes do you render?
We can add a parameter to control CUDA-CPU bucket size if needed. Although in the default setting they works as fast as possible.
For GPU bucket size, it affects performance and GPU memory usage, hence we decided to disable it in the UI. If you tested and know what you are doing, feel free to change them. The GPU hardware needs big bucket size usually and 5 buckets per device.

On another note, it should be possible to have control over the slave bucket size if needed, let me know.

Best,
Muhammed

The resolution and scenes varies. In this particular case, I was rendering a rather large stylized city street scene with a lot of textures (in out of core mode, is its around 60GB that gets loaded into RAM), geo, and tyflow. I was rendering at 2560x1440 using the Nvidia denoiser in upscale mode. I know that I’m probably losing some performance on each of my GPUs by making the bucket size so small, but my utilization was still 97-100% the entire time - and any losses in performance were made up for in overall frame time gains by the slower network machines.

Question: if increasing the bucket size increases memory consumption, does it follow that decreasing the bucket size also decreases memory consumption? Interestingly, in this scene, I would randomly get crashes in my render before I changed the bucket size, but after lowering the bucket size I didn’t get one crash.

Correct, lowering the bucket size and bucket number reduces GPU memory usage. I think this is the reason it doesn’t crash
GPU usage is an average of some GPU resources, it doesn’t tell the full story. Keep your eye on GPU power consumption for your GPUs. It is how you know your GPU is being utilized fully

Best,
Muhammed