ID range adjustment
The automatic adjustment of allocated IDs is done by reserving high-end bits in an ID to identify a part of the ID range. The number of bits that are reserved controls the size of the usable ID range and the maximum value that is possible.
IDs in FTM are stored in an 8-byte integer value, which is 64 bits. The most significant bit is reserved to indicate the sign, positive or negative, of the number and is not used to avoid confusion.
- Number of instances to manage
- You want to manage 4 instances to start with. Managing 4 instances uses 2 bits of the ID. However, you might want to manage up to 8 instances in the future. You can build in a contingency to manage up to 8 instances by using 3 bits of the ID. The bits that are used for the number of instances are shown as i in the following table.
- Number of partitions to manage
- You want to manage 16 partitions, which use 4 bits of the ID. If you are certain that you do not want to use 32 partitions in the future, do not add any bits as a contingency. The bits that are used for the number of partitions are shown as p in the following table.
In this example, 1 bit is reserved for the sign and 7 bits are reserved for the instance and partition identification. Therefore, 56 bits remain for the ID range (256 – 1), allowing 72,057,594,037,927,935 IDs in total. In simple terms, that number of IDs is 72 quadrillion (US) or 72,000 billion (EU). The bits that are used for the ID are shown as id in the following table.
63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | ... | 02 | 01 | 00 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sign bit | i | i | i | p | p | p | p | id | id | id | ... | id | id | id |
Give careful consideration to how you balance the requirements between the number of instances and partitions and the resulting supported ID range.