Slow map operations perfomance

This explainer video for CRUD operations gives a good overview of the process, but defragmentation happens continuously as-is to reclaim storage, so it’s not the problem. What you should focus on is the disk IO associated with writes. and how you could optimize it.

When using a Map data type, you have the putItems method, which allows you to do multiple key-value updates in a single write operation. Similarly, you can combine multiple operations on the same record into a single transaction (using the operate command). A record transaction can perform multiple operations, update multiple bins, or elements in a Map or List with a single record access.

If you are updating constantly in a very write-heavy workload, you can optimize the updates to a Map by grouping multiple key-value updates into a single putItems operation. However, if you have a high read to write ratio, I wouldn’t worry about the disk IO of the updates, and definitely not defragmentation.