From our experience such issue with write performance was usually caused by a fragmented freelist. In this case `mdb_page_alloc` will search for large consecutive piece of free space (indicated by the `num` argument) on a large freelist which does however only contain small consecutive blocks of free space. You can check the status of the freelist using `mdb_stat -ff`.

regards,

Steffen Michels

On 24/04/2023 14:37, Wang Zhiyong wrote:
I found the time blocking is in the `mdb_cursor_put` operation on line 3570 of the file https://github.com/LMDB/lmdb/blob/mdb.master/libraries/liblmdb/mdb.c

When the size of data is several hundred KB,`mdb_cursor_put` may block for several tens of seconds.

Just put one key,It takes so long.