 +    return 0;
 +}
 +
++static void
++slotsmgrtLazyReleaseMicroseconds(long long usecs) {
++    long long deadline = ustime() + usecs;
++    while (slotsmgrtLazyReleaseStep(50)) {
++        if (ustime() >= deadline) {
++            return;
++        }
++    }
++}
++
++static struct {
++    long long ops;
++    int step;
++} lazy_release_stat = {
++    .ops = 0,
++    .step = 1,
++};
++
++void
++slotsmgrtLazyReleaseCleanup() {
++    long long ops = lazy_release_stat.ops;
++    if (ops > 100) {
++        lazy_release_stat.step = 1 + 2000 / ops;
++    } else {
++        lazy_release_stat.step = 20;
++        slotsmgrtLazyReleaseMicroseconds(500);
++    }
++    lazy_release_stat.ops = 0;
++}
++
++void
++slotsmgrtLazyReleaseIncrementally() {
++    slotsmgrtLazyReleaseStep(lazy_release_stat.step);
++    lazy_release_stat.ops ++;
++}
++
++/* *
++ * SLOTSMGRT-LAZY-RELEASE $microseconds
++ * */
 +void
 +slotsmgrtLazyReleaseCommand(client *c) {
 +    if (c->argc != 1 && c->argc != 2) {
 +        addReplyError(c, "wrong number of arguments for SLOTSMGRT-LAZY-RELEASE");
 +        return;
 +    }
-+    long long step = 1;
++    long long usecs = 1;
 +    if (c->argc != 1) {
-+        if (getLongLongFromObject(c->argv[1], &step) != C_OK ||
-+                !(step >= 0 && step <= INT_MAX)) {
-+            addReplyErrorFormat(c, "invalid value of step (%s)",
++        if (getLongLongFromObject(c->argv[1], &usecs) != C_OK ||
++                !(usecs >= 0 && usecs <= INT_MAX)) {
++            addReplyErrorFormat(c, "invalid value of usecs (%s)",
 +                    (char *)c->argv[1]->ptr);
 +            return;
 +        }
 +    }
-+    while (step != 0 && slotsmgrtLazyReleaseIncrementally()) { step --; }
++    if (usecs != 0) {
++        slotsmgrtLazyReleaseMicroseconds(usecs);
++    }
 +
 +    list *ll = server.slotsmgrt_lazy_release;
 +

+}
+
+static void
+lazyReleaseIteratorNext(lazyReleaseIterator *it) {
+    robj *val = it->val;
+    serverAssert(val != NULL);
+
+    const int step = 100;
+
+    if (val->type == OBJ_LIST) {
+        if (listTypeLength(val) <= step * 2) {
+            decrRefCount(val);
+            it->val = NULL;
+        } else {

+        releaseSlotsmgrtAsyncClient(i, ac->batched_iter != NULL ?
+                "interrupted: migration timeout" : "interrupted: idle timeout");
+    }
+}
+
+static int
