1. A method for data storage, comprising: receiving data items associated with respective logical addresses for storage in a memory that includes multiple memory units; obtaining respective estimates of a performance characteristic for the multiple memory units; based on the estimates, adapting a mapping that maps the logical addresses to respective physical storage locations in the multiple memory units, so as to balance the performance characteristic across the memory units; and storing the data items in the physical storage locations in accordance with the adapted mapping.