I want to make sure that I am using all the resources (i.e. memory) in the cluster for my stateful partitioned service. However, in ApplicationManifest.xml, I need to set the number of partitions:
<Parameter Name="MyService_PartitionCount" DefaultValue="5" />
How can I set this value to the number of nodes available in the cluster? Or at least to a certain ratio of it?
The only way to do this would be to represent your app and service via ARM and then use a shared parameter to populate both the partition count and VM count.
There is no specific hint that can be used to indicate that you want a number of partitions equal to the number of nodes, and even if there was then it would not be able to be able to change during runtime as the number of nodes changed.
Generally SF recommends that the choice of the number of partitions be a separate resource/scale calculation. 2, 3