Changed calculation of default setting for shard_size to improve chances of accuracy