mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:19:22 +08:00
meilisearch: add io limit
This commit is contained in:
@@ -360,6 +360,7 @@
|
||||
xrdp = { enable = true; hostname = "vps7.chn.moe"; };
|
||||
vaultwarden.enable = true;
|
||||
vaultwarden-proxy.enable = true;
|
||||
meilisearch.ioLimitDevice = "/dev/mapper/root";
|
||||
};
|
||||
};})
|
||||
];
|
||||
|
||||
@@ -11,6 +11,7 @@ inputs:
|
||||
};}));
|
||||
default = {};
|
||||
};
|
||||
ioLimitDevice = mkOption { type = types.nullOr types.nonEmptyStr; default = null; };
|
||||
};
|
||||
config =
|
||||
let
|
||||
@@ -60,7 +61,15 @@ inputs:
|
||||
IOWeight = 1;
|
||||
Nice = 19;
|
||||
Slice = "-.slice";
|
||||
};
|
||||
}
|
||||
// (if meilisearch.ioLimitDevice != null then
|
||||
{
|
||||
IOReadBandwidthMax = "${meilisearch.ioLimitDevice} 20M";
|
||||
IOWriteBandwidthMax = "${meilisearch.ioLimitDevice} 20M";
|
||||
# iostat -dx 1
|
||||
IOReadIOPSMax = "${meilisearch.ioLimitDevice} 100";
|
||||
IOWriteIOPSMax = "${meilisearch.ioLimitDevice} 100";
|
||||
} else {});
|
||||
};
|
||||
})
|
||||
(attrsToList meilisearch.instances));
|
||||
|
||||
Reference in New Issue
Block a user