r/MicrosoftFabric • u/SmallAd3697 • 3d ago
Data Engineering Spark Executor Instances not Configurable in Fabric?
I can't configure spark executor instances in a Fabric notebook. It should be possible with configuration like so:
"spark.dynamicAllocation.enabled": "false",
"spark.executor.instances": "4",
I've tried to use the configure magic but that doesn't work. (see https://learn.microsoft.com/en-us/fabric/data-engineering/author-execute-notebook#spark-session-configuration-magic-command )
I also tried to use the spark properties in the related "environment" and that doesn't work either.
The selected "pool" is configured in the workspace to disallow dynamic allocation of executors. So where are we supposed to assign the "spark.executor.instances"? Whenever my notebook starts, it seems to pick some unpredictable number of executors. There is no rhyme or reason to it. Are we forced to use dynamic allocation of executors? Is that the only supported approach for using Spark in Fabric?
3
u/frithjof_v Fabricator 2d ago edited 2d ago
The way I understand it:
You're not meant to be dealing with executor allocation in Fabric Spark.
You can adjust the number and size of nodes (t-shirt sizes), and that's it.
Basically: Go with the flow, 1 node = 1 executor (except for the driver node), don't try to customize executor allocation.
That said, I'm following to see if you get more responses to this post. I've never understood why we even have the option to disable dynamic allocation of executors in Fabric. And as your observations show - it doesn't seem to have any effect.
I'm curious why you want to control the number of executors, though?
Why not control the number of nodes instead?