FairCom Server supports an option to use a worker thread to sort the keys read from the data file. The rebuild thread reads records from the data file and constructs key values, which it passes to the sort thread using an inter-thread queue. After all the key values have been passed to the sort thread, the sort thread sorts the key values and passes them back to the rebuild thread in a second queue.
This option is enabled by specifying MAX_REBUILD_QUEUE <max_queue_size> in ctsrvr.cfg with a positive value. The value is a number in bytes indicating the maximum size of the queue used to pass the keys to the worker thread. MAX_REBUILD_QUEUE defaults to 100 MB. A 64-bit server has a limit of 4 TB - 1 for this setting, and a 32-bit server has a limit of 4 GB - 1 for this setting.
For example, in one test comparing V10 rebuild performance with its defaults (16,000 bytes of SORT_MEMORY and no MAX_REBUILD_QUEUE support) to this optimized rebuild available in V11, rebuilding a 17 GB data file completed in an average of 1,816 seconds, and the optimized rebuild completed in an average of 623 seconds, which is 66% faster (about 1/3 the time of the original rebuild).
<maximum_queue_size> is interpreted as bytes by default, or it can be specified with a suffix of KB, MB, or GB (e.g., 10 MB).