OPTIMIZE command uses spark.databricks.delta.optimize.maxThreads threads for compaction.
OPTIMIZE command can be executed using OPTIMIZE SQL command.
Delta Lake Documentation
To improve query speed, Delta Lake on Databricks supports the ability to optimize the layout of data stored in cloud storage. Delta Lake on Databricks supports two layout algorithms: bin-packing and Z-Ordering.
bin-packing is exactly this
Learn more in the Optimize Demo.